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: 78/99
Findings: 1
Award: $49.01
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 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.0062 USDC - $49.01
require
in getRageQuitAmounts
does nothingLine 93 is
require(totalStaked >= 0, 'nothing staked to rage quit');
This will never fail since totalStaked
is a uint256
. It should be
require(totalStaked > 0, 'nothing staked to rage quit');
However, this bug has no effect on the rageQuit
function. The user and the treasury would have 0 tokens transferred to them and an event RageQuit(msg.sender, 0, 0)
would be emmitted which has no ill effects.
destination
for InfinityExchange.rescueETH
Functoin rescueETH should have an additional line:
function rescueETH(address destination) external payable onlyOwner { require(destination != address(0)); (bool sent, ) = destination.call{value: msg.value}(''); require(sent, 'failed'); }
One wouldn't want to accidentally send the ETH to nowhere.
#0 - HardlyDifficult
2022-07-11T00:12:10Z