PoolTogether - Timenov's results

General Information

Platform: Code4rena

Start Date: 04/03/2024

Pot Size: $36,500 USDC

Total HM: 9

Participants: 80

Period: 7 days

Judge: hansfriese

Total Solo HM: 2

Id: 332

League: ETH

PoolTogether

Findings Distribution

Researcher Performance

Rank: 9/80

Findings: 1

Award: $616.93

🌟 Selected for report: 0

🚀 Solo Findings: 0

Findings Information

🌟 Selected for report: carrotsmuggler

Also found by: 0xabhay, Omik, Timenov

Labels

bug
2 (Med Risk)
satisfactory
sufficient quality report
:robot:_17_group
duplicate-51

Awards

616.9286 USDC - $616.93

External Links

Lines of code

https://github.com/code-423n4/2024-03-pooltogether/blob/480d58b9e8611c13587f28811864aea138a0021a/pt-v5-vault/src/PrizeVault.sol#L540

Vulnerability details

Impact

The depositWithPermit function will not work as expected if the _asset does not support the permit functionality.

Proof of Concept

Some tokens(for example WETH and stETH) do not have a permit function and others(for example DAI) utilizes a permit function that deviates from the reference implementation.

This means that the permit will execute, but the allowance will not be correct, resulting in unexpected behaviour. The tokens above are widely used so it is likely for them to be the _asset of the vault. Also there are more tokens that have the same issues.

Tools Used

Manual Review

Consider adding a validation after the permit to check if the allowance is correct and revert with a message if not.

    require(_asset.allowance(_owner, address(this)) >= _assets, "Allowance with permit failed.");

Assessed type

Error

#0 - c4-pre-sort

2024-03-12T00:59:17Z

raymondfam marked the issue as sufficient quality report

#1 - c4-pre-sort

2024-03-12T00:59:23Z

raymondfam marked the issue as duplicate of #17

#2 - c4-pre-sort

2024-03-13T05:14:34Z

raymondfam marked the issue as duplicate of #51

#3 - c4-judge

2024-03-15T08:11:59Z

hansfriese marked the issue as satisfactory

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