QuickSwap and StellaSwap contest - ch13fd357r0y3r's results

A concentrated liquidity DEX with dynamic fees.

General Information

Platform: Code4rena

Start Date: 26/09/2022

Pot Size: $50,000 USDC

Total HM: 13

Participants: 113

Period: 5 days

Judge: 0xean

Total Solo HM: 6

Id: 166

League: ETH

QuickSwap and StellaSwap

Findings Distribution

Researcher Performance

Rank: 80/113

Findings: 1

Award: $35.48

🌟 Selected for report: 0

🚀 Solo Findings: 0

Awards

35.4829 USDC - $35.48

Labels

bug
duplicate
2 (Med Risk)

External Links

Lines of code

https://github.com/code-423n4/2022-09-quickswap/blob/15ea643c85ed936a92d2676a7aabf739b210af39/src/core/contracts/AlgebraPoolDeployer.sol#L44 https://github.com/code-423n4/2022-09-quickswap/blob/15ea643c85ed936a92d2676a7aabf739b210af39/src/core/contracts/AlgebraPool.sol#L193

Vulnerability details

When The Algebra deployer deploys the new Pool, It does not initialize the function initialize() to set the Price and tick value. This forms an attack vector where an attacker can initialize the price with an arbitrary amount when a new Pool is deployed.

Impact

Anyone can initialize the price and initialize the DataStorageOperator with tick value

Proof of Concept

  1. AlgebraDeployer Deploys a new Pool.
  2. Attacker Watches for new Deployment of Pool Contract in mempool.
  3. After Successful Deployment, the Attacker initializes the initialize() function with his preferred price.

Tools Used

Manual Analysis

Initialize it in the deployer contract

pool.intialize(PRICE);
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