PoolTogether Aave v3 contest - 0x1f8b's results

A protocol for no loss prize savings on Ethereum.

General Information

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

PoolTogether

Findings Distribution

Researcher Performance

Rank: 5/40

Findings: 2

Award: $1,441.50

🌟 Selected for report: 0

🚀 Solo Findings: 0

Findings Information

🌟 Selected for report: unforgiven

Also found by: 0x1f8b

Labels

bug
duplicate
2 (Med Risk)
sponsor disputed

Awards

1413.6415 USDC - $1,413.64

External Links

Lines of code

https://github.com/pooltogether/aave-v3-yield-source/blob/e63d1b0e396a5bce89f093630c282ca1c6627e44/contracts/AaveV3YieldSource.sol#L255

Vulnerability details

Impact

Lack of require in redeemToken could produce token loses.

Proof of Concept

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

Awards

27.8625 USDC - $27.86

Labels

bug
G (Gas Optimization)
sponsor confirmed

External Links

  1. Gas saving using immutable. It's possible to avoid storage access a save gas using immutable keyword for the following variables:
  1. Remove returns because always returns the same value.
AuditHub

A portfolio for auditors, a security profile for protocols, a hub for web3 security.

Built bymalatrax © 2024

Auditors

Browse

Contests

Browse

Get in touch

ContactTwitter