Skip to content
Business logic Audit finding Intermediate

Minting yield tokens single sided can be impossible if CURVE_V2 dexId is used on redemptions

A user can withdraw from a single-sided yield strategy using a CURVE_V2 swap through the same pool the strategy uses, which causes the trading module to revoke the strategy's token allowance. This permanently blocks all future deposits into the strategy.

mstpr-brainbot Follow

Originally disclosed on Sherlock

Source: https://github.com/sherlock-audit/2025-06-notional-exponent-judging/issues/320

Found by

mstpr-brainbot

Summary

In single-sided yield strategies, both underlying tokens of the pool have infinite allowance set on the pool contract. When a user chooses to withdraw, they can withdraw with both tokens and then sell the underlying tokens for the "asset".

If the user selects CURVE_V2 and sets the swap pool to be the same pool that the strategy is currently LP'ing into, then the TRADING_MODULE will revoke the token allowances (set to 0) for security. This breaks the strategy, as it will no longer have the required token allowance to deposit into the yield strategy, effectively making deposits impossible.

Root Cause

Let's go through an example with explanations. Assume the yield strategy's yield token is the Convex crvUSD-USDC LP token and the asset is USDC.

First, when the strategy is deployed, both USDC and crvUSD will be infinitely approved to the pool to mint LP tokens: https://github.com/sherlock-audit/2025-06-notional-exponent/blob/82c87105f6b32bb362d7523356f235b5b07509f9/notional-v4/src/single-sided-lp/CurveConvex2Token.sol#L169-L178

Now, say Alice comes and wants to withdraw her shares double-sided to crvUSD and USDC and then sells the USDC for crvUSD in the same pool: https://github.com/sherlock-audit/2025-06-notional-exponent/blob/82c87105f6b32bb362d7523356f235b5b07509f9/notional-v4/src/single-sided-lp/AbstractSingleSidedLP.sol#L163-L178

As we can see, the tokens received will be sold to the "asset" token, and since the asset is USDC, the USDC withdrawn from the LP will be skipped and only crvUSD will be sold to USDC: https://github.com/sherlock-audit/2025-06-notional-exponent/blob/82c87105f6b32bb362d7523356f235b5b07509f9/notional-v4/src/single-sided-lp/AbstractSingleSidedLP.sol#L223-L251

However, as we can see above, dexId is not forced. The user can pick CURVE_V2 and set the pool to be the same pool the strategy is depositing into: https://github.com/notional-finance/leveraged-vaults/blob/7e0abc3e118db0abb20c7521c6f53f1762fdf562/contracts/trading/adapters/CurveV2Adapter.sol#L42-L63

If that's the case, crvUSD will be swapped to USDC in the same pool, and after the TRADING_MODULE finishes swapping, it revokes the allowance of the sellToken, which in this case is USDC: https://github.com/notional-finance/leveraged-vaults/blob/7e0abc3e118db0abb20c7521c6f53f1762fdf562/contracts/trading/TradingUtils.sol#L54-L57

Now, the user will receive their USDC and a successful withdrawal but what happened is that the yield strategy now has zero allowance on the yield token (the Curve pool), which means no user can deposit into the strategy anymore. It’s permanently blocked because the strategy is always expected to have infinite allowance, but now has none.

Internal Pre-conditions

  1. "asset" token is one of the curve lp tokens (very possible)

External Pre-conditions

None needed

Attack Path

  1. Exit position double sided with redemption trade using the same curve pool

Impact

Strategy deposits are permanently blocked due to lack of allowance for "asset" token to pool.

PoC

No response

Mitigation

Do not allow CURVE_V2 if "asset" token trade.pool is the same. For CURVE_V2 multiple swaps it could be a problem to check each pool but I guess thats not the case since the router has the one doing the swaps not the strategy.

Discussion

sherlock-admin2

The protocol team fixed this issue in the following PRs/commits: https://github.com/notional-finance/notional-v4/pull/32

The original report as published on Sherlock, by mstpr-brainbot. 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

Root cause

The trading module revokes the sell token's allowance after a swap, and the user can select the same pool as the strategy, causing the strategy's infinite allowance to be set to zero.

Impact

Strategy deposits are permanently blocked because the required allowance is gone.

What the attacker needed

Asset token is a Curve LP token; user withdraws with CURVE_V2 using the same pool

The fix

The protocol team fixed this issue by preventing CURVE_V2 swaps when the pool is the same as the strategy's pool.

How it was found

  1. Deploy the strategy, which sets infinite allowance for both tokens on the pool.
  2. User withdraws double-sided and sells one token for the asset using CURVE_V2 with the same pool.
  3. The trading module swaps and then revokes the sell token's allowance.
  4. The strategy's allowance becomes zero, blocking future deposits.

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 yield strategy lets people deposit tokens to earn interest. To work, it needs permission to move those tokens into a pool. This report shows that a user can accidentally remove that permission by choosing a particular swap option during withdrawal, so no one can deposit afterwards.

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.

More by mstpr-brainbot

View all

43 more disclosed reports, best first.

More from Notional Exponent

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.