Backed Protocol contest - PPrieditis's results

Protocol for peer to peer NFT-Backed Loans.

General Information

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

Backed Protocol

Findings Distribution

Researcher Performance

Rank: 40/47

Findings: 1

Award: $52.26

🌟 Selected for report: 0

🚀 Solo Findings: 0

Awards

52.2631 USDC - $52.26

Labels

bug
QA (Quality Assurance)
sponsor acknowledged

External Links

Title: Replace magic number 1e18 with a constant

Impact

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

AuditHub

A portfolio for auditors, a security profile for protocols, a hub for web3 security.

Built bymalatrax © 2024

Auditors

Browse

Contests

Browse

Get in touch

ContactTwitter