bunker.finance contest - Funen's results

The easiest way to borrow against your NFTs.

General Information

Platform: Code4rena

Start Date: 03/05/2022

Pot Size: $50,000 USDC

Total HM: 4

Participants: 46

Period: 5 days

Judge: gzeon

Total Solo HM: 2

Id: 117

League: ETH

bunker.finance

Findings Distribution

Researcher Performance

Rank: 27/46

Findings: 2

Award: $141.14

🌟 Selected for report: 0

πŸš€ Solo Findings: 0

Awards

93.5794 USDC - $93.58

Labels

bug
QA (Quality Assurance)

External Links

Low

  1. Title : Warning missing override identifier can make compiler eror

This means if you inherit the ERC1155Enumerable.sol contract into Cnft.sol, you can write your own function and mark it as override since it’s overriding the base totalsupply() & tokensByAccounts() function. If you forget to add the override the compiler will said

TypeError: Overriding function is missing "override" specifier.

and this could be into error to compile the contract

##Tool Used Remix, Manual Review

##Recommended Mitigation

add override

Awards

47.5594 USDC - $47.56

Labels

bug
G (Gas Optimization)

External Links

  1. Title : Saving gas by removing = 0

If a variable was not set/initialized, it is assumed to have default value to 0 this implementation was used for saving more gas by removing = 0

##TOOLS USED Remix, Manual Review

##Mitigation Step Remove = 0

##Occurances 1. CNft.sol#L49 2. CNft.sol#L97 3. CNft.sol#L119 4. CNft.sol#L175 5. UniswapV2PriceOracle.sol#L41 6. CEther.sol#L178

  1. Title : Using short reason string can be used for saving more gas

Every reason string takes at least 32 bytes. Use short reason strings that fits in 32 bytes or it will become more expensive.

##Tool Used Manual Review

##Occurances 1. CNft.sol#L24 2. CNft.sol#L25 3. CNft.sol#L52 4. CNft.sol#L100 5. CNft.sol#L124 6. CNft.sol#L148 7. CNft.sol#L208 8. CNft.sol#L209 9. /CNft.sol#L279

  1. Title : change uint256 i = 0 into uint256 i for saving more gas

https://github.com/bunkerfinance/bunker-protocol/blob/752126094691e7457d08fc62a6a5006df59bd2fe/contracts/Oracles/UniswapV2PriceOracle.sol#L42

using this implementation can saving more gas for each loops.

##Tool Used Manual Review & Remix

##Recommended Mitigation Change it

  1. Title : Unused SafeTransferFrom() can be removed for saving more gas

since this SafeTransferFrom() function was unused it can be deleted instead for saving more gas cause of recommendation of used safeBatchTransferFrom instead

##Tool Used Manual Review, Remix

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