Platform: Code4rena
Start Date: 14/06/2022
Pot Size: $50,000 USDC
Total HM: 19
Participants: 99
Period: 5 days
Judge: HardlyDifficult
Total Solo HM: 4
Id: 136
League: ETH
Rank: 36/99
Findings: 4
Award: $175.61
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: hyh
Also found by: 0x29A, 0xNineDec, 0xf15ers, 0xkowloon, GreyArt, IllIllI, KIntern, Kenshin, Lambda, WatchPug, Wayne, berndartmueller, byterocket, cccz, codexploder, horsefacts, kenzo, obront, obtarian, oyc_109, peritoflores, rajatbeladiya, rfa, saian, unforgiven, zer0dot
11.084 USDC - $11.08
https://github.com/code-423n4/2022-06-infinity/blob/main/contracts/core/InfinityExchange.sol#L1229 https://github.com/code-423n4/2022-06-infinity/blob/main/contracts/staking/InfinityStaker.sol#L345
InfinityExchange.sol and InfinityStaker.sol contain a function rescueETH
(InfinityExchange.sol#L1229 and InfinityStaker.sol#L345) to rescue any ETH that is accidentally sent to the contract.
However, these functions do not have an amount
parameter and just send msg.value
to the destination
, i.e. the amount that was just sent to the function. Rescuing accidentally sent ETH is therefore not possible with these functions.
Add an amount
parameter to rescueETH
.
#0 - nneverlander
2022-06-22T11:18:08Z
Duplicate
#1 - HardlyDifficult
2022-07-10T14:59:13Z
🌟 Selected for report: horsefacts
Also found by: 0x29A, GimelSec, GreyArt, Lambda, Ruhum, antonttc, berndartmueller, byterocket, cccz, codexploder, dipp, oyc_109, unforgiven
84.0967 USDC - $84.10
Judge has assessed an item in Issue #129 High risk. The relevant finding follows:
InfinityExchange.sol#L326 and InfinityExchange.sol#L362: When a user pays too much ETH, the additional cost is not reimbursed (in contrast to ERC20 transfers, where this is not possible). Consider reimbursing the user (like other NFT marketplaces, e.g. Rarible) when he pays too much ETH.
#0 - HardlyDifficult
2022-07-14T01:19:45Z
🌟 Selected for report: joestakey
Also found by: 0x1f8b, 0x29A, 0x52, 0xDjango, 0xNazgul, 0xNineDec, 0xf15ers, 0xkowloon, 0xmint, 8olidity, BowTiedWardens, Chom, Cityscape, Czar102, ElKu, FSchmoede, Funen, GimelSec, GreyArt, IllIllI, KIntern, Kaiziron, Kenshin, Lambda, MadWookie, MiloTruck, PPrieditis, Picodes, Ruhum, Sm4rty, StErMi, TerrierLover, TomJ, Treasure-Seeker, VAD37, WatchPug, Wayne, _Adam, a12jmx, abhinavmir, antonttc, apostle0x01, asutorufos, berndartmueller, cccz, cloudjunky, codexploder, cryptphi, csanuragjain, defsec, delfin454000, fatherOfBlocks, georgypetrov, hake, hansfriese, horsefacts, hyh, k, kenta, nxrblsrpr, oyc_109, peritoflores, rajatbeladiya, reassor, rfa, robee, sach1r0, saian, samruna, shenwilly, simon135, sorrynotsorry, sseefried, throttle, unforgiven, wagmi, zzzitron
49.2143 USDC - $49.21
address(0)
has to be added as a valid currency, otherwise isOrderValid
will fail. Consider hardcoding address(0)
as a valid currency, because it always is for sell orders according to the rest of the contractisNonceValid
will fail, even when the nonce would be valid, because userMinOrderNonce[user]
is 0 initially. Therefore, the check nonce > userMinOrderNonce[user]
fails. Consider handling this case of an uninitialized userMinOrderNonce[user]
or documenting this requirement explicitly.verifyMatchOrders
"checks if the given complication can execute this order", which is not done. Consider updating the description to reflect the real behavior.amount > vestedTwelveMonths
can and should never happen because of InfinityStaker.sol#L123, where it is checked that the sum of the vested tokens is larger than or equal to amount
. The code can therefore be removed or a revert
(when the function is used from other places in the future) could be added.#0 - nneverlander
2022-06-23T12:36:16Z
Thanks
#1 - HardlyDifficult
2022-07-14T01:19:27Z
Moved the last item to #368
🌟 Selected for report: IllIllI
Also found by: 0v3rf10w, 0x1f8b, 0x29A, 0xAsm0d3us, 0xDjango, 0xKitsune, 0xNazgul, 0xf15ers, 0xkatana, 0xkowloon, BowTiedWardens, Chom, ElKu, FSchmoede, Funen, GimelSec, Kaiziron, Kenshin, Lambda, MadWookie, MiloTruck, PPrieditis, Picodes, PwnedNoMore, StErMi, Tadashi, TerrierLover, TomJ, Tomio, Wayne, Waze, _Adam, antonttc, apostle0x01, asutorufos, c3phas, codexploder, defsec, delfin454000, fatherOfBlocks, hake, hansfriese, hyh, joestakey, k, kenta, oyc_109, peritoflores, reassor, rfa, robee, sach1r0, simon135, slywaters, zer0dot
31.2172 USDC - $31.22
ecrecover
. See https://twitter.com/alexberegszaszi/status/1534461421454606336 for an extensive discussion.unchecked
because there is already a check for underflow before the statements.#0 - nneverlander
2022-06-23T12:37:00Z
Thanks