Platform: Code4rena
Start Date: 14/07/2022
Pot Size: $25,000 USDC
Total HM: 2
Participants: 63
Period: 3 days
Judge: PierrickGT
Total Solo HM: 1
Id: 147
League: ETH
Rank: 63/63
Findings: 1
Award: $16.87
π Selected for report: 0
π Solo Findings: 0
π Selected for report: IllIllI
Also found by: 0x1f8b, 0x29A, 0xKitsune, 0xNazgul, Aymen0909, Chom, Deivitto, ElKu, JC, JohnSmith, Kaiziron, Limbooo, MadWookie, Meera, ReyAdmirado, Rohan16, Sm4rty, SooYa, TomJ, Trumpero, Waze, __141345__, ajtra, ak1, antonttc, bulej93, c3phas, cRat1st0s, csanuragjain, defsec, durianSausage, fatherOfBlocks, gogo, hake, hickuphh3, ignacio, joestakey, karanctf, kyteg, m_Rassska, pashov, rajatbeladiya, rbserver, robee, rokinot, samruna, sashik_eth, simon135, tofunmi
16.8729 USDC - $16.87
0 is less gas efficient than !0 if you enable the optimizer at 10k AND youβre in a require statement. Detailed explanation with the opcodes https://twitter.com/gzeon/status/1485428085885640706
'Witch.sol', 254, ' require(auction_.start > 0, "Vault not under auction"); 'Witch.sol', 299, ' require(auction_.start > 0, "Vault not under auction"); 'Witch.sol', 357, ' require(auction_.start > 0, "Vault not under auction"); 'Witch.sol', 392, ' if (liquidatorCut > 0) { 'Witch.sol', 397, ' if (auctioneerCut > 0) { 'Witch.sol', 415, ' require(auction_.start > 0, "Vault not under auction");
Custom errors from Solidity 0.8.4 are cheaper than revert strings (cheaper deployment cost and runtime cost when the revert condition is met) while providing the same amount of information, as explained https://blog.soliditylang.org/2021/04/21/custom-errors/. Custom errors are defined using the error statement.
'Witch.sol', 83, ' require(param == "ladle", "Unrecognized"); 'Witch.sol', 101, ' require(initialOffer <= 1e18, "InitialOffer above 100%"); 'Witch.sol', 102, ' require(proportion <= 1e18, "Proportion above 100%"); 'Witch.sol', 103, ' require( 'Witch.sol', 107, ' require(proportion >= 0.01e18, "Proportion below 1%"); 'Witch.sol', 188, ' require(cauldron.level(vaultId) < 0, "Not undercollateralized"); 'Witch.sol', 199, ' require(limits_.sum <= limits_.max, "Collateral limit reached"); 'Witch.sol', 254, ' require(auction_.start > 0, "Vault not under auction"); 'Witch.sol', 255, ' require(cauldron.level(vaultId) >= 0, "Undercollateralized"); 'Witch.sol', 299, ' require(auction_.start > 0, "Vault not under auction"); 'Witch.sol', 312, ' require(liquidatorCut >= minInkOut, "Not enough bought"); 'Witch.sol', 327, ' require(baseJoin != IJoin(address(0)), "Join not found"); 'Witch.sol', 357, ' require(auction_.start > 0, "Vault not under auction"); 'Witch.sol', 364, ' require(liquidatorCut >= minInkOut, "Not enough bought"); 'Witch.sol', 394, ' require(ilkJoin != IJoin(address(0)), "Join not found"); 'Witch.sol', 415, ' require(auction_.start > 0, "Vault not under auction"); 'Witch.sol', 436, ' require(
'Witch.sol', 258, ' limits[auction_.ilkId][auction_.baseId].sum -= auction_.ink;