Platform: Code4rena
Start Date: 10/05/2022
Pot Size: $50,000 USDC
Total HM: 13
Participants: 100
Period: 5 days
Judge: HardlyDifficult
Total Solo HM: 1
Id: 122
League: ETH
Rank: 87/100
Findings: 1
Award: $30.09
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: IllIllI
Also found by: 0v3rf10w, 0x1f8b, 0x4non, 0xDjango, 0xNazgul, 0xf15ers, 0xkatana, 0xsanson, Bludya, BowTiedWardens, CertoraInc, Cityscape, DavidGialdi, FSchmoede, Fitraldys, Funen, Hawkeye, Kenshin, MadWookie, MaratCerby, MiloTruck, Picodes, RagePit, Tadashi, TerrierLover, TomFrenchBlockchain, VAD37, WatchPug, Waze, _Adam, antonttc, bobirichman, catchup, defsec, delfin454000, djxploit, ellahi, fatherOfBlocks, gzeon, hake, hansfriese, hickuphh3, horsefacts, ignacio, joestakey, jonatascm, mics, minhquanym, oyc_109, pmerkleplant, rfa, robee, rotcivegaf, samruna, shung, sikorico, simon135, z3s
30.0884 USDC - $30.09
Custom error from solidity 0.8.4 are cheaper than revert strings, custom error are defined using the error
statement can use insideand outside the contract.
source https://blog.soliditylang.org/2021/04/21/custom-errors/
POC : https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L167 https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L168 https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L169 https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L170 https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L171 https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L211 https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L214 https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L217 https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L220 https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L224 https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L228 https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L263 https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L269 https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L272 https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L307 https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L323 https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L328 https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L329 https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L330 https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L353 https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L353 https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L436 https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L437 https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L438 https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L456 https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/CallyNft.sol#L15 https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/CallyNft.sol#L16 https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/CallyNft.sol#L36 https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/CallyNft.sol#L42
i suggest replacing revert error strings with custom error.