Platform: Code4rena
Start Date: 05/04/2022
Pot Size: $30,000 USDC
Total HM: 10
Participants: 47
Period: 3 days
Judge: gzeon
Total Solo HM: 4
Id: 106
League: ETH
Rank: 40/47
Findings: 1
Award: $52.26
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: IllIllI
Also found by: 0v3rf10w, 0x1f8b, 0xDjango, 0xkatana, BouSalman, CertoraInc, Dravee, FSchmoede, Hawkeye, Kenshin, Meta0xNull, PPrieditis, Ruhum, TerrierLover, VAD37, WatchPug, berndartmueller, csanuragjain, hake, horsefacts, hubble, m9800, rayn, reassor, robee, samruna, securerodd, shenwilly, sorrynotsorry, t11s, teryanarmen, tintin, z3s
52.2631 USDC - $52.26
Magic Numbers obscure the purpose of the function and unnecessarily lead to potential error if the constants are changed during development.
Create a new constant: uint256 public constant ROUNDING_PRECISION_MULTIPLIER = 1e18;
and replace code: https://github.com/code-423n4/2022-04-backed/blob/main/contracts/NFTLoanFacilitator.sol#L384-L385 * (perAnumInterestRate * 1e18 / 365 days) / 1e21 // SCALAR * 1e18 with: * (perAnumInterestRate * ROUNDING_PRECISION_MULTIPLIER / 365 days) / SCALAR * ROUNDING_PRECISION_MULTIPLIER
#0 - wilsoncusack
2022-04-06T15:27:47Z
adds some gas but maybe worth it
#1 - wilsoncusack
2022-04-15T16:19:07Z
adds a lot of gas, won't do