Platform: Code4rena
Start Date: 29/04/2022
Pot Size: $22,000 USDC
Total HM: 6
Participants: 40
Period: 3 days
Judge: Justin Goro
Total Solo HM: 2
Id: 114
League: ETH
Rank: 5/40
Findings: 2
Award: $1,441.50
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: unforgiven
Also found by: 0x1f8b
1413.6415 USDC - $1,413.64
Lack of require in redeemToken could produce token loses.
In the method redeemToken the user set the expected _redeemAmount
, it will compute the expected shares to burn
, and after it, it will transfer the amout according the _redeemAmount
argument. Because of precision it's possible that a small _redeemAmount will be computed as 0 shares in _tokenToShares
method, and if this happens, it will burn 0 shares and transfer tokens to the user.
Add require(_shares > 0, "AaveV3YS/shares-gt-zero");
before burn.
#0 - PierrickGT
2022-05-02T22:00:51Z
This is a valid concern but as stated by the warden, the amount withdrawn would be extremely small.
For example, if we assume that $100,000,000 is stored in the yield source, a user would be able to use this exploit by withdrawing 0.0000000000001
tokens.
Since this amount is more than negligible, it wouldn't make sense for a user to attack the contract this way since they would definitely pay more in gas fees.
For the reasons above, I've disputed the issue.
#1 - gititGoro
2022-05-19T02:32:24Z
🌟 Selected for report: IllIllI
Also found by: 0v3rf10w, 0x1f8b, 0x4non, 0xDjango, 0xf15ers, 0xkatana, 242, Dravee, GimelSec, MaratCerby, Tadashi, TrungOre, WatchPug, defsec, fatherOfBlocks, gzeon, hake, horsefacts, joestakey, miguelmtzinf, pauliax, pedroais, peritoflores, rotcivegaf, simon135, slywaters, tabish, throttle, z3s
27.8625 USDC - $27.86
immutable
keyword for the following variables:aToken
at AaveV3YieldSource.sol#L127rewardsController
at AaveV3YieldSource.sol#L130poolAddressesProviderRegistry
at AaveV3YieldSource.sol#L130bool
in claimRewards#0 - PierrickGT
2022-05-02T21:37:00Z