Skip to content
Audit finding Intermediate

BondOracleAdapter can fetch price from inefficient Pool on Aerodrome

The BondOracleAdapter's getPool function selects a pool based on tick spacing without considering fee structure or trading activity, allowing an attacker to create a low-fee, tight-tick-spacing pool that the adapter might choose. This could lead to a skewed price oracle, enabling price manipulation.

0x52 Follow with 0xadrii, ZeroTrust and 2 others

Originally disclosed on Sherlock

Source: https://github.com/sherlock-audit/2024-12-plaza-finance-judging/issues/931

Found by

0x52, 0xadrii, ZeroTrust, bretzel, zxriptor

Summary

The BondOracleAdapter's getPool function can select an inefficient pool, leading to inappropriate price feeds. An attacker can create a pool with an extremely low fee and inefficient tick spacing, which the adapter might prioritize, leading to a skewed price oracle.

Root Cause

The getPool function in BondOracleAdapter.sol iterates through an array of tick spacings (spacing) without considering the expected trading activity or fee structure for a Bond/USD pair that is a volatile pool. It prioritizes pools with tighter tick spacing, even if they are inefficient. The documentation (no link provided in the original prompt) states:

Concentrated Liquidity Tick Spacing In Velodrome's concentrated liquidity pools, the concept of tick spacing is used. This refers to the minimum price movement between liquidity ranges.

Stable token pools use a price range boundary of 0.5% (tick space 50) for tokens like USDC, DAI, LUSD.

Volatile token pools use a price range boundary of 2% (tick space 200) for tokens like OP and WETH.

For highly correlated tokens like stable coins and liquid staked tokens, a price range boundary of 0.01% (tick space 1) is available.

For emerging tokens like AERO and VELO, a price range boundary of 20% (tick space 2000) is available to reduce liquidity pool re-balance needs.

The lack of a fee check, allows an attacker to create a pool with a very low fee that the adapter might select, further distorting the price feed.

Internal Pre-conditions

N/A

External Pre-conditions

  1. An attacker must deploy a Concentrated Liquidity pool on the same dexFactory with the same bondToken and liquidityToken, but with an inefficient tick spacing (e.g., 1).

Attack Path

  1. The attacker deploys a pool with a very tight tick spacing (e.g., 1). This pool is likely inefficient for a Bond/USD pair.
  2. When the adapter is initialized or fetches the price, the getPool function is called.

3.The getPool function iterates through the spacing array and finds the attacker's pool. Because it prioritizes tighter tick spacing and lacks a fee check, it selects the attacker's inefficient pool. 4.The adapter now uses the inefficient pool for price information. This pool is susceptible to manipulation due to low liquidity (people don't want to lp in this pool).

Impact

If this feeds is till retains inside Pool.sol, the protocol and its users rely on a distorted market price for bond token. The attacker can manipulate the price in their inefficient pool.

PoC

N/A

Mitigation

Modify the getPool function to prioritize pools based on expected trading behavior and fee structure for the Bond/USD pair. Consider factors like typical trading volume and volatility when selecting a suitable tick spacing. For example, start with more reasonable tick spacing.

Discussion

sherlock-admin2

The protocol team fixed this issue in the following PRs/commits: https://github.com/Convexity-Research/plaza-evm/pull/168

The original report as published on Sherlock, by 0x52. Images and videos are our own copies; raw HTML is shown as text. View it on Sherlock.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Impact

If the feed remains in Pool.sol, the protocol and its users could rely on a distorted market price for the bond token, and the attacker could manipulate the price in their inefficient pool.

What the attacker needed

Attacker can deploy a pool on the same dexFactory; Pool uses same bondToken and liquidityToken; Pool has inefficient tick spacing (e.g., 1)

The fix

The getPool function should be modified to prioritise pools based on expected trading behaviour and fee structure for the Bond/USD pair, for example by starting with more reasonable tick spacing.

How it was found

  1. The attacker deploys a pool with a very tight tick spacing (e.g., 1).
  2. When the adapter is initialized or fetches the price, the getPool function is called.
  3. The getPool function iterates through the spacing array and finds the attacker's pool.
  4. Because it prioritizes tighter tick spacing and lacks a fee check, it selects the attacker's inefficient pool.
  5. The adapter now uses the inefficient pool for price information.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

A price oracle is a service that provides the current price of an asset. This report says the oracle picks a trading pool based only on a setting called tick spacing, which controls the smallest price change. An attacker can create a pool with a very small tick spacing and low fees, and the oracle might use that pool, which has low liquidity and is easy to manipulate.

More by 0x52

View all

211 more disclosed reports, best first.

More from Plaza Finance

View all

The newest disclosed reports for this program.

Similar reports

Same bug class and techniques, clearest first.