Platform: Code4rena
Start Date: 13/05/2022
Pot Size: $30,000 USDC
Total HM: 8
Participants: 65
Period: 3 days
Judge: hickuphh3
Total Solo HM: 1
Id: 125
League: ETH
Rank: 57/65
Findings: 1
Award: $23.46
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: IllIllI
Also found by: 0v3rf10w, 0x1f8b, 0x4non, 0xNazgul, 0xf15ers, 0xkatana, 0xliumin, Cityscape, Dravee, Fitraldys, Funen, GimelSec, Hawkeye, JC, MaratCerby, SooYa, StErMi, Tomio, WatchPug, Waze, bobirichman, defsec, delfin454000, fatherOfBlocks, hake, hansfriese, hickuphh3, ignacio, joestakey, kebabsec, mics, mtz, oyc_109, robee, rotcivegaf, samruna, sikorico, simon135, z3s
23.4569 USDC - $23.46
Missing zero check
Description: https://github.com/sturdyfi/code4rena-may-2022/blob/main/contracts/protocol/vault/YieldManager.sol#L124 https://github.com/sturdyfi/code4rena-may-2022/blob/main/contracts/protocol/vault/YieldManager.sol#L132 On line 124 and 312, the amount is not validated before the exchange is called. If the amount is zero no need to exchange.
Mitigation: require(_amount != 0,"...");