Donating (and syncing) tokens to an Aerodrome allows to bypass exposure limits
An attacker can bypass exposure limits by donating tokens to an Aerodrome pool they control, inflating the collateral value of their LP tokens without losing capital. This allows them to exceed the exposure limits set by a creditor.
Source: https://github.com/sherlock-audit/2024-04-arcadia-pricing-module-judging/issues/17
Found by
zzykxx
Summary
An attacker can bypass the exposure limits by donating tokens to an Aerodrome pool in which he owns ~100% of the liquidity, this will inflate reserves which will increase the value of the collateral and the attacker won't lose capital because he owns ~100% of the liquidity.
Vulnerability Detail
Attack scenario:
- Create a new Aerodrome pool, let's suppose an STG/WETH pool
- Provide liquidity to the pool and mint LPs, let's suppose we mint ~1000$ worth of liquidity
- Deposit the LP in an Arcadia account, the collateral is worth ~1000$
- Send STG and WETH directly to the Aerodrome pool, let's suppose we send ~500_000$ worth of tokens
- Call sync() on the Aerodrome pool
- The pool reserves are increased and the collateral is now worth ~501_000$
By doing this an attacker can bypass exposure limits. Note that Arcadia allows the use of any volatile Aerodrome pool LPs as collateral, as long as the underlying tokens are allowed.
Impact
An attacker can bypass the exposure limits set by a creditor.
Code Snippet
Tool used
Manual Review
Recommendation
Discussion
sherlock-admin4
1 comment(s) were left on this issue during the judging contest.
shealtielanz commented:
dup of #018
Thomas-Smets
Valid, think it is not a duplicate of 18 tho
sherlock-admin3
The protocol team fixed this issue in the following PRs/commits: https://github.com/arcadia-finance/accounts-v2/pull/201
midori-fuse
I understand that the escalation phase is over, and I fully accept that the result cannot be changed further. However I do think this is a dupe of #18 for the following reasons.
Essentially both attacks involve opening a new Aerodrome pool, and increasing the LP position's underlying worth using fees. When you donate your assets into the pool, it has the same effect as when you swap back and forth within the pool (whatever stays in the pool gets counted as fees). Therefore the two issues are a dupe because:
- While the root causes can be considered different, the differences lie in the Aerodrome pool, not the Arcadia pricing module. What enabled this attack within the pricing module are the same: fees are always applied directly and fully without capping.
- I can't identify a fix that would fix one problem but without fixing the other.
- Note that the sponsor making the same PR isn't a factor, there may still be a fix that separates these two issues that we failed to identify.
Am I missing anything? Is there a difference in root cause/impact/fix that makes the two issues different?
We shall still respect the current/final judgement regardless. Even if the "ideal" result is different from currently, it was fully on us to not have examined the issues diligently in the 48-hour escalation period that we were given.
sherlock-admin2
The Lead Senior Watson signed off on the fix.
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
Root cause
Likely the pricing module does not cap or verify the source of fees when calculating the value of Aerodrome LP tokens, allowing donations to artificially inflate reserves.
Impact
An attacker can bypass the exposure limits set by a creditor.
What the attacker needed
Ability to create an Aerodrome pool; Sufficient capital to donate tokens; Arcadia account accepting the LP as collateral
The fix
The protocol team fixed this issue in a pull request.
How it was found
- Create a new Aerodrome pool (e.g., STG/WETH).
- Provide liquidity to the pool and mint LP tokens worth about $1000.
- Deposit the LP tokens in an Arcadia account as collateral.
- Send a large amount of STG and WETH directly to the Aerodrome pool (e.g., $500,000).
- Call sync() on the Aerodrome pool to update reserves.
- The collateral value increases to about $501,000, bypassing exposure limits.
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.
Exposure limits are caps on how much a lender will accept as collateral. The attacker creates a pool, puts in a small amount of liquidity, deposits the pool tokens as collateral, then sends a large amount of tokens directly to the pool and calls sync() to update its reserves. This makes the collateral appear much more valuable, so the attacker can borrow more than the limit allows, but they still own almost all the pool so they don't really lose the donated tokens.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.