PoolTogether micro contest #1 - pauliax's results

A protocol for no loss prize savings on Ethereum

General Information

Platform: Code4rena

Start Date: 29/07/2021

Pot Size: $20,000 USDC

Total HM: 8

Participants: 12

Period: 3 days

Judge: LSDan

Total Solo HM: 2

Id: 24

League: ETH

PoolTogether

Findings Distribution

Researcher Performance

Rank: 5/12

Findings: 4

Award: $1,606.53

🌟 Selected for report: 2

🚀 Solo Findings: 0

Findings Information

🌟 Selected for report: cmichel

Also found by: hickuphh3, jonah1005, pauliax

Labels

bug
duplicate
3 (High Risk)
SwappableYieldSource

Awards

565.8571 USDC - $565.86

External Links

Handle

pauliax

Vulnerability details

Impact

function redeemToken sends tokens to the msg.sender by using safeTransferFrom: _depositToken.safeTransferFrom(address(this), msg.sender, redeemableBalance); For safeTransferFrom to work it needs to have an enough approval. In this case, obviously this contract does not approve every msg.sender for redeemableBalance, so I expect this function to fail in practice. When the sender is address(this) it is best to use safeTransfer function: _depositToken.safeTransfer(msg.sender, redeemableBalance);

#0 - PierrickGT

2021-08-06T16:16:20Z

#1 - 0xean

2021-08-24T16:39:11Z

duplicate of #61

Findings Information

🌟 Selected for report: 0xRajeev

Also found by: cmichel, pauliax, shw

Labels

bug
duplicate
2 (Med Risk)
mStableYieldSource
SwappableYieldSource

Awards

169.7571 USDC - $169.76

External Links

Handle

pauliax

Vulnerability details

Impact

function approveMax uses safeApprove. This function only works if the current approval is 0. Consider clearing previous approval ( safeApprove(0) ) before setting the max value again. The same issue can happen with SwappableYieldSource if, for example, source A is set but later changed to source B (_setYieldSource) and later you want to set source A again. safeApprove should fail as A already has approval. I think it would also make sense to clear approval of the old yield source when _setYieldSource is invoked as this old source becomes inactive so you don't want it to still have the approval to transfer the tokens.

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