Platform: Code4rena
Start Date: 20/01/2022
Pot Size: $50,000 USDC
Total HM: 3
Participants: 35
Period: 7 days
Judge: GalloDaSballo
Total Solo HM: 2
Id: 77
League: ETH
Rank: 29/35
Findings: 1
Award: $3.38
🌟 Selected for report: 1
🚀 Solo Findings: 0
🌟 Selected for report: sorrynotsorry
Also found by: 0v3rf10w, Dravee, Meta0xNull, WatchPug, byterocket, defsec, robee, sirhashalot, ye0lde
3.377 USDC - $3.38
sorrynotsorry
Gas cost will be higher due to long string inside require statements
require(this.totalSupply() > 0, "Exchange: INSUFFICIENT_LIQUIDITY"); require(_baseTokenQtyMin > 0 && _quoteTokenQtyMin > 0, "Exchange: MINS_MUST_BE_GREATER_THAN_ZERO"
Manual review
Usage of Custom Errors will reduce the gas cost where the require statements may refactored as condition checks.
#0 - GalloDaSballo
2022-02-07T01:35:12Z
Finding is valid, customErrors cost less and reduce revert case gas cost as well, also using below 32 char strings helps as well