Skip to content
Business logic Audit finding Intermediate

Vault cannot be deployed properly for newer Curve pools

usmannk Follow

Originally disclosed on Sherlock

Source: https://github.com/sherlock-audit/2023-02-notional-judging/issues/22

Found by

usmannk

Summary

New Curve pools have a different ABI than the one that the vaults attempt to use. Not differentiating between the two will lead to silent failures when vaults are deployed for new pools.

Vulnerability Detail

During the deploy process the leveraged vault attempts to obtain the Curve pool's LP token address by calling CURVE_POOL.lp_token(). However, for new pools such as CRV/ETH (https://etherscan.io/address/0x8301ae4fc9c624d1d396cbdaa1ed877821d7c511#code), there is no lp_token member. Instead calling lp_token() will trigger the fallback function. For these pools, the token is obtained by calling token().

https://github.com/sherlock-audit/2023-02-notional/blob/main/leveraged-vaults/contracts/vaults/curve/mixins/CurvePoolMixin.sol#L25

Impact

The lp token's address will be set to the 0 address and later calls to functions such as totalSupply will fail, causing the vault to be in a stuck state.

Code Snippet

Tool used

Manual Review

Recommendation

Check the version of the target Curve pool and toggle called functions appropiately.

Discussion

jeffywu

Valid

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

What is known

A medium-severity business logic bug in Notional Update #4. Sherlock made it public on 30 March 2023. Found in the 52 audit contest (finding M-1).

About Business logic

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

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

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 usmannk

View all

14 more disclosed reports, best first.

More from Notional Update #4

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.