Platform: Code4rena
Start Date: 03/11/2022
Pot Size: $115,500 USDC
Total HM: 17
Participants: 120
Period: 7 days
Judge: LSDan
Total Solo HM: 1
Id: 174
League: ETH
Rank: 106/120
Findings: 1
Award: $49.23
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: IllIllI
Also found by: 0x1f8b, 0xRajkumar, Awesome, Aymen0909, B2, Bnke0x0, Deivitto, Diana, JC, Metatron, Rahoz, RaymondFam, RedOneN, ReyAdmirado, Rolezn, Saintcode_, TomJ, __141345__, ajtra, aphak5010, brgltd, c3phas, ch0bu, chrisdior4, cryptonue, durianSausage, emrekocak, erictee, exolorkistis, gogo, karanctf, lukris02, martin, me_na0mi, oyc_109, peanuts, rotcivegaf, saneryee, seyni, tnevler, zaskoh
49.2315 USDC - $49.23
Use a solidity version of at least 0.8.10 to have external calls skip contract existence checks if the external call has a return value
Including all files in the scope.
MODIFIER
 WITH FUNCTION
Modifiers make code more elegant, but cost more than normal functions.
Instances include:
contracts/modules/credit/LineOfCredit.sol:78
contracts/modules/credit/LineOfCredit.sol:83
contracts/modules/credit/LineOfCredit.sol:88
contracts/modules/credit/LineOfCredit.sol:98
contracts/modules/interest-rate/InterestRateCredit.sol:25
contracts/utils/MutualConsent.sol:31
require
 statement on top in the functionInstances include:
contracts/modules/credit/LineOfCredit.sol:259
Saves 6 gas per instance if using assembly to check for address(0)
e.g.
assembly { Â if iszero(_addr) { Â mstore(0x00, "zero address") Â revert(0x00, 0x20) Â } }
Instances include:
contracts/modules/credit/LineOfCredit.sol:445
contracts/modules/factories/LineFactory.sol:27
contracts/modules/factories/LineFactory.sol:30
contracts/modules/factories/LineFactory.sol:33
contracts/modules/factories/LineFactory.sol:141
contracts/modules/factories/LineFactory.sol:146
contracts/utils/LineLib.sol:42
contracts/utils/LineLib.sol:67
contracts/utils/LineLib.sol:81
contracts/utils/SpigotLib.sol:189
contracts/utils/SpigotLib.sol:201
Use selfbalance() instead of address(this).balance when getting your contract's balance of ETH to save gas.
Instances include:
contracts/utils/LineLib.sol:84
#0 - c4-judge
2022-11-17T22:51:37Z
dmvt marked the issue as grade-b