Vader Protocol contest - gzeon's results

Liquidity Protocol anchored by Native Stablecoin with Slip-Based Fees AMM, IL protection and Synthetics.

General Information

Platform: Code4rena

Start Date: 09/11/2021

Pot Size: $75,000 USDC

Total HM: 57

Participants: 27

Period: 7 days

Judge: alcueca

Total Solo HM: 49

Id: 52

League: ETH

Vader Protocol

Findings Distribution

Researcher Performance

Rank: 6/27

Findings: 4

Award: $3,549.86

🌟 Selected for report: 5

πŸš€ Solo Findings: 2

Findings Information

🌟 Selected for report: gzeon

Labels

bug
3 (High Risk)
VaderRouterV2

Awards

1619.075 USDC - $1,619.07

External Links

Handle

gzeon

Vulnerability details

Impact

Vader reimburse user IL immediately when user withdraw from the pool (VaderRouterV2.sol:L227), an attacker can therefore manipulate the pool balance causing a high IL, remove liquidity and restore the pool balance such that he will receive a larger IL reimbursement.

Proof of Concept

Let's assume our attacker own 100% of FOO-VADER

  1. Attacker add 100 FOO and 100 VADER to the Pool
  2. wait some block, or 1 year for max IL protection
  3. In 1 transaction, attacker
    • Swap 9900 FOO to 99 Vader
    • Pool now have 10000 FOO and 1 VADER
    • By VaderMath.sol:L84 the loss is 100*1/10000+100-2 = 98.01 VADER
    • Remove liquidity and receive 10000 FOO and 99.01 VADER
    • Restore the pool balance
  4. Such that the attacker will gain 98.01 VADER without risk

The profit is constrained by gas cost, pool fee, % of pool controlled by the attacker and % of IL protection.

Use twap price to determine P1 in VaderMath.sol:L84 when calculating IL to reduce risk of manipulation

#0 - SamSteinGG

2021-11-25T12:28:41Z

Duplicate of #2

#1 - alcueca

2021-12-10T15:00:22Z

Doesn't seem like a duplicate to me, @SamSteinGG?

#2 - SamSteinGG

2021-12-16T11:48:59Z

@alcueca The stated trade cannot occur as trades are inherently limited by the CLP design of the protocol to one third of the available pair liquidity. As such, the illustrated pair would actually result in almost zero units retrieved back.

Findings Information

🌟 Selected for report: gzeon

Labels

bug
3 (High Risk)
GovernorAlpha

Awards

1619.075 USDC - $1,619.07

External Links

Handle

gzeon

Vulnerability details

Impact

Since veto ensure none of the actions in proposal being vetoed point to the contract (GovernorAlpha.sol:L562), a malicious proposal can be designed to have an action that point to governance and therefore effectively cannot be vetoed.

Proof of Concept

For any attacker who want to launch a governance attack using a malicious proposal, they simply need to add an action that point to governance that does nothing (or anything).

Some other design can be proposal are vetoable whenever the differential is less than x%, even if it involves governance change, s.t. council can veto most malicious proposal while it is still possible to change council given high enough vote differential.

#0 - SamSteinGG

2021-11-20T06:55:50Z

Duplicate of #61

#1 - alcueca

2021-12-10T14:52:42Z

Not a duplicate

#2 - MrToph

2022-03-22T15:01:46Z

Duplicate of #167

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