Forgotten Runes Warrior Guild contest - RoiEvenHaim's results

16,000 Warrior NFTs sold in a phased Dutch Auction.

General Information

Platform: Code4rena

Start Date: 03/05/2022

Pot Size: $30,000 USDC

Total HM: 6

Participants: 93

Period: 3 days

Judge: gzeon

Id: 118

League: ETH

Forgotten Runes

Findings Distribution

Researcher Performance

Rank: 93/93

Findings: 1

Award: $15.45

🌟 Selected for report: 0

🚀 Solo Findings: 0

Hello, You can save some gas in the code by using unchecked ( because the contract is written in solidity 0.8.0 automatically there is a use in safe math and its cost more gas then using unchecked). You can use my suggestion in lines: 152 - because no one has 2^256 ether to cause an overflow. 153 - the max amount of warriors is much less then 2^256 and there is a require for that in lines 136, 137. 154 - same as 153 there is a limit for the amount of warriors can be sold. 162 - I think its chipper to make an unchecked function for increase by 1 and then call it instead of using ++. 193 - same as 162. 219 - same as 153 there is a limit for the amount of warriors can be sold. 220 - I think its chipper to make an unchecked function for increase by 1 and then call it instead of using ++. 248 - same as 153 there is a limit for the amount of warriors can be claimed. 259 - I think its chipper to make an unchecked function for increase by 1 and then call it instead of using ++. 284 - you can use unchecked because those numbers are numbers you know and they are const so the result will not cause an overflow or underflow. 288 - same as 284. 289 - same as 284. 355 - same as 162 379 - same as 152 because no one can pay 2^256 so no one will be refund by 2^256. 389 - "finalprice" is a const and danuminted has a limit so it will no overflow or underflow. 390 - same as 379. Thanks.

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