Timeswap contest - mert_eren's results

Like Uniswap, but for lending & borrowing.

General Information

Platform: Code4rena

Start Date: 20/01/2023

Pot Size: $90,500 USDC

Total HM: 10

Participants: 59

Period: 7 days

Judge: Picodes

Total Solo HM: 4

Id: 206

League: ETH

Timeswap

Findings Distribution

Researcher Performance

Rank: 20/59

Findings: 2

Award: $278.10

🌟 Selected for report: 0

🚀 Solo Findings: 0

Findings Information

🌟 Selected for report: RaymondFam

Also found by: Rolezn, SaeedAlipoor01988, kaden, mert_eren, nadin, pavankv, rbserver

Labels

bug
2 (Med Risk)
downgraded by judge
satisfactory
edited-by-warden
duplicate-247

Awards

212.7503 USDC - $212.75

External Links

Lines of code

https://github.com/code-423n4/2023-01-timeswap/blob/ef4c84fb8535aad8abd6b67cc45d994337ec4514/packages/v2-option/src/TimeswapV2Option.sol#L109-L194

Vulnerability details

Impact

Proof of Concept

There is no barrier for using rebase tokens as option in system. So it can be used a rebase token for option contract by someone. Option contract user balances and total balances records is stabil just change with update(mint,collect,burn,swap) functions. However rebased tokens like ampleforth change balance of users(so option contract too) in periods and this will change contract balance without recorded.After rebase if total supply of coin increase, there will be some token will stuck.If total supply decrease there is recorded more token than contract has and this may effects some people cant take their money and see unexpected reverts from this contract.

Tools Used

there should be a block or warning for using of rebase tokens.Another way is, special mechanism for changing record with contract balance for this type of tokens.

#0 - c4-judge

2023-02-02T21:21:44Z

Picodes changed the severity to 2 (Med Risk)

#1 - c4-judge

2023-02-02T21:23:04Z

Picodes marked the issue as duplicate of #52

#2 - c4-judge

2023-02-12T22:37:36Z

Picodes 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