Skip to content

Commit

Permalink
Report for issue #399 updated by cryptonue
Browse files Browse the repository at this point in the history
  • Loading branch information
code423n4 committed Nov 10, 2022
1 parent 4e84aff commit 529e1d1
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions data/cryptonue-G.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,27 @@ File: LineFactory.sol
13: uint8 constant MAX_SPLIT = 100; // max % to take
14: uint32 constant defaultMinCRatio = 3000; // 30.00% minimum collateral ratio
```

# INTERNAL FUNCTIONS ONLY CALLED ONCE CAN BE INLINED TO SAVE GAS

Not inlining costs 20 to 40 gas because of two extra JUMP instructions and additional stack operations needed for function calls.

```solidity
File: LineOfCredit.sol
167: function _updateOutstandingDebt()
168: internal
169: returns (uint256 principal, uint256 interest)
170: {
File: InterestRateCredit.sol
42: function _accrueInterest(
43: bytes32 id,
44: uint256 drawnBalance,
45: uint256 facilityBalance
46: ) internal returns (uint256) {
File: MutualConsent.sol
38: function _mutualConsent(address _signerOne, address _signerTwo) internal returns(bool) {
```

0 comments on commit 529e1d1

Please sign in to comment.