Unable to support Curve Pool with Native ETH
The protocol rewrites the Curve pool's native ETH address to the zero address, but then tries to look up a withdraw request manager for that zero address, which does not exist. This causes withdrawals and liquidations to revert, potentially trapping user funds.
auditgpt Follow with touristS and xiaoming90
Originally disclosed on Sherlock
Source: https://github.com/sherlock-audit/2025-06-notional-exponent-judging/issues/717
Found by
auditgpt, touristS, xiaoming90
Summary
Root Cause
Internal Pre-conditions
External Pre-conditions
Attack Path
If any of the tokens of the Curve Pool are Native ETH (0xEEEEE...), the _rewriteAltETH() function at Lines 54 and 55 will rewrite the address from 0xEEEEE to 0x00000.
File: CurveConvex2Token.sol
39: constructor(
40: uint256 _maxPoolShare,
41: address _asset,
42: address _yieldToken,
43: uint256 _feeRate,
44: address _rewardManager,
45: DeploymentParams memory params,
46: IWithdrawRequestManager _withdrawRequestManager
47: ) AbstractSingleSidedLP(_maxPoolShare, _asset, _yieldToken, _feeRate, _rewardManager, 18, _withdrawRequestManager) {
48: CURVE_POOL_TOKEN = ERC20(params.poolToken);
49:
50: // We interact with curve pools directly so we never pass the token addresses back
51: // to the curve pools. The amounts are passed back based on indexes instead. Therefore
52: // we can rewrite the token addresses from ALT Eth (0xeeee...) back to (0x0000...) which
53: // is used by the vault internally to represent ETH.
54: TOKEN_1 = _rewriteAltETH(ICurvePool(params.pool).coins(0));
55: TOKEN_2 = _rewriteAltETH(ICurvePool(params.pool).coins(1));
Assume a Curve pool with the first token is Native ETH, while the second token is a normal ERC20 token (e.g., wstETH). In this case, calling the TOKENS() function will return:
- tokens[0] = 0x0000 (Native ETH)
- tokens[1] = 0xB82381A3fBD3FaFA77B3a7bE693342618240067b (wstETH)
File: CurveConvex2Token.sol
162: function TOKENS() internal view override returns (ERC20[] memory) {
163: ERC20[] memory tokens = new ERC20[](_NUM_TOKENS);
164: tokens[0] = ERC20(TOKEN_1);
165: tokens[1] = ERC20(TOKEN_2);
166: return tokens;
167: }
When computing the value of the Curve LP token, the getWithdrawRequestValue() function will attempt to loop through all tokens in Line 326 below.
File: AbstractSingleSidedLP.sol
319: function getWithdrawRequestValue(
320: address account,
321: address asset,
322: uint256 shares
323: ) external view returns (uint256 totalValue) {
324: ERC20[] memory tokens = TOKENS();
325:
326: for (uint256 i; i < tokens.length; i++) {
327: IWithdrawRequestManager manager = ADDRESS_REGISTRY.getWithdrawRequestManager(address(tokens[i]));
328: // This is called as a view function, not a delegate call so use the msg.sender to get
329: // the correct vault address
330: (bool hasRequest, uint256 value) = manager.getWithdrawRequestValue(msg.sender, account, asset, shares);
331: // Ensure that this is true so that we do not lose any value.
332: require(hasRequest);
333: totalValue += value;
334: }
335: }
In the first iteration, where tokens[0] = 0x0000 (Native ETH), it will execute the following code at Line 327:
IWithdrawRequestManager manager = ADDRESS_REGISTRY.getWithdrawRequestManager(address(tokens[i]));
IWithdrawRequestManager manager = ADDRESS_REGISTRY.getWithdrawRequestManager(address(0));
It will attempt to fetch the Withdraw Request Manager for Native ETH (0x0).
However, it will revert because there is no Withdraw Request Manager (WRM) for Native ETH. There is only WRM for Standard ERC20, but not Native ETH.
The BaseLPLib.hasPendingWithdrawals() function is also affected by the same issue when looping through all the tokens to obtain the WRM.
File: AbstractSingleSidedLP.sol
338: function hasPendingWithdrawals(address account) external view override returns (bool) {
339: ERC20[] memory tokens = TOKENS();
340: for (uint256 i; i < tokens.length; i++) {
341: IWithdrawRequestManager manager = ADDRESS_REGISTRY.getWithdrawRequestManager(address(tokens[i]));
342: if (address(manager) == address(0)) continue;
343: // This is called as a view function, not a delegate call so use the msg.sender to get
344: // the correct vault address
345: (WithdrawRequest memory w, /* */) = manager.getWithdrawRequest(msg.sender, account);
346: if (w.requestId != 0) return true;
347: }
348:
349: return false;
350: }
Same for BaseLPLib.initiateWithdraw(), BaseLPLib.finalizeAndRedeemWithdrawRequest(), BaseLPLib.tokenizeWithdrawRequest().
Impact
High. This issue is aggravated by the fact that the protocol is designed to handle depositing Native ETH to Curve pool, but the problem will surface during withdrawal and liquidation. In the worst-case scenario, users deposit funds into the protocol but are unable to withdraw them, resulting in their funds being stuck.
Additionally, core functionality is broken, as Curve Pool with Native ETH will not work with the protocol.
PoC
No response
Mitigation
No response
Discussion
sherlock-admin2
The protocol team fixed this issue in the following PRs/commits: https://github.com/notional-finance/notional-v4/pull/26/files
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
Users may be unable to withdraw their funds, and core functionality is broken for Curve pools with native ETH.
What the attacker needed
Curve pool with native ETH as one token
The fix
The protocol team fixed this issue in a pull request.
How it was found
- Deploy a Curve pool where one token is native ETH.
- The constructor rewrites the ETH address to zero.
- Call getWithdrawRequestValue, which loops over tokens and tries to get a manager for the zero address.
- The call reverts because no manager exists for zero.
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.
When a Curve pool uses real ETH, its address is written as a special placeholder. The protocol changes that placeholder to zero, but then later tries to find a manager for zero, which doesn't exist, so the transaction fails. This means users can't withdraw their money.
What is DoS?
A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.