Tigris Trade contest - Tointer's results

A multi-chain decentralized leveraged exchange featuring instant settlement and guaranteed price execution on 30+ pairs.

General Information

Platform: Code4rena

Start Date: 09/12/2022

Pot Size: $90,500 USDC

Total HM: 35

Participants: 84

Period: 7 days

Judge: GalloDaSballo

Total Solo HM: 12

Id: 192

League: ETH

Tigris Trade

Findings Distribution

Researcher Performance

Rank: 49/84

Findings: 2

Award: $147.12

🌟 Selected for report: 0

🚀 Solo Findings: 0

Findings Information

Labels

bug
3 (High Risk)
satisfactory
upgraded by judge
duplicate-462

Awards

133.3608 USDC - $133.36

External Links

Lines of code

https://github.com/code-423n4/2022-12-tigris/blob/588c84b7bb354d20cbca6034544c4faa46e6a80e/contracts/StableVault.sol#L44-L72

Vulnerability details

StableVault.sol can be used by anyone to change stables. This is basically AMM pool with x+y = const function and zero fees. It means that:

  1. Users are providing liquidity for nothing
  2. When users would want to withdraw, it's guaranteed that they would get worst token out of the list. This is because arbitrage bots would provide cheap stablecoins to contract while withdrawing all others. This means that users that want to rotate funds swiftly, would always leak value, trading temporarily cheap stablecoins to other assets.
  3. Balance of a whole system equals to stable token amount * cheapest stablecoin in the pool. If one depegs, all users would lose. And there is no compensation for that risk.

There are different approaches to fix it:

  1. Use Curve-like mechanism to compensate for higher risks and LPing
  2. Use only one stablecoin
  3. Ensure that one user could use only one one stablecoin. This would require manual rebalance of stablecoins from time to time.

#0 - GalloDaSballo

2022-12-20T01:30:38Z

Agree with lack of liquidity premium

We'd call this infinite leverage in curve lingo

#1 - c4-judge

2022-12-20T16:12:32Z

GalloDaSballo marked the issue as duplicate of #462

#2 - c4-judge

2022-12-20T16:13:16Z

GalloDaSballo changed the severity to 3 (High Risk)

#3 - c4-judge

2023-01-22T17:36:52Z

GalloDaSballo marked the issue as satisfactory

Awards

13.7578 USDC - $13.76

Labels

2 (Med Risk)
satisfactory
duplicate-533

External Links

Judge has assessed an item in Issue #351 as M risk. The relevant finding follows:

Stable Vault cannot accept tokens with more then 18 decimals because of this lines: https://github.com/code-423n4/2022-12-tigris/blob/588c84b7bb354d20cbca6034544c4faa46e6a80e/contracts/StableVault.sol#L49 https://github.com/code-423n4/2022-12-tigris/blob/588c84b7bb354d20cbca6034544c4faa46e6a80e/contracts/StableVault.sol#L67 Consider using different conversion formula. For example: amount * 1e18 / 10token.decimals() for deposit and amount * 10token.decimals() / 1e18 for withdraw

#0 - c4-judge

2023-01-22T20:09:34Z

GalloDaSballo marked the issue as duplicate of #533

#1 - c4-judge

2023-01-22T20:09:39Z

GalloDaSballo 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