Timeswap contest - danb's results

Like Uniswap, but for lending & borrowing.

General Information

Platform: Code4rena

Start Date: 04/01/2022

Pot Size: $75,000 USDC

Total HM: 17

Participants: 33

Period: 7 days

Judge: 0xean

Total Solo HM: 14

Id: 74

League: ETH

Timeswap

Findings Distribution

Researcher Performance

Rank: 5/33

Findings: 3

Award: $2,145.59

🌟 Selected for report: 4

🚀 Solo Findings: 1

Findings Information

🌟 Selected for report: danb

Labels

bug
2 (Med Risk)
sponsor acknowledged

Awards

1703.8454 USDC - $1,703.85

External Links

Handle

danb

Vulnerability details

https://github.com/code-423n4/2022-01-timeswap/blob/main/Timeswap/Timeswap-V1-Convenience/contracts/libraries/Mint.sol#L141

when a user mints new liquidity, it the pair doesn't already exist, it deploys it.

deploying a new contract on ethereum is super expensive, especially when it's such a large contract like TimeswapPair, it can cost thousands of dollars.

https://medium.com/the-capital/how-much-does-it-cost-to-deploy-a-smart-contract-on-ethereum-11bcd64da1

Impact

user who try to mint liquidity on pair that doesn't exist will end up paying thousands of dollars.

If the pair doesn't exist, revert instead of deploying it. deploying a new contract should be the user's choice, since it's so expensive.

#0 - Mathepreneur

2022-01-18T16:26:46Z

We plan to have a better documentation to show this behavior.

#1 - 0xean

2022-01-25T16:15:04Z

Downgrading to med risk, this isn't an attack vector and is working as designed. Funds aren't being lost or compromised in any way.

The issue is with the design, which could be potentially improved.

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