Reproduced Exploit
Burve: ERC4626ViewAdjustor charges 110 stETH for a 100 nominal deposit
Burve's adjustor is supposed to turn a nominal value into the real LST amount and back. toReal calls convertToAssets and toNominal calls convertToShares. At 1 stETH = 1.1 ETH, a 100 nominal deposit is charged 110 stETH instead of 90.909090909090909090 stETH. The position is credited only the fair a…
Loss
19.090909090909090910 stETH overcharged and left uncredited
Chain
Ethereum
Category
logic
Date
Apr 2025
Source
AuditVault
EVM Playground
Source-level debugger — step opcodes and Solidity in sync
The attack is replayed in an in-browser EVM preloaded with the exact dumped fork state. The execution tree shows every call; step by Solidity line or by opcode across all depths — source, Stack, Memory, Storage, Balances (native / ERC-20 / NFT), Transient storage and Return value stay in sync. Click a tree node, opcode, or source line to jump. Query opens a search over the trace: previous and next writes, balance changes and calls, breakpoints, and a diff of everything that changed between two steps. No backend, no live RPC.
Source & credit. Reproduction of a public audit finding curated by AuditVault — the original finding: 56951-h-2-incorrect-implementation-of-erc4626viewadjustor-sherlock. Standalone Foundry PoC and full write-up: 56951-h-2-incorrect-implementation-of-erc4626viewadjustor-sherlock_exp in the
evm-hack-registrymirror.
Vulnerability classes:
vuln/logic/wrong-condition·vuln/logic/price-calculation
Key info#
| Field | Value |
|---|---|
| Loss | 19.090909090909090910 stETH overcharged and left uncredited |
| Vulnerable contract | ERC4626ViewAdjustor.toReal |
| Attacker EOA | 0x1111111111111111111111111111111111111111 (the depositor) |
| Attack contract | Exploit |
| Attack tx | Exploit.run() |
| Chain / block / date | Ethereum model · block 0 · 2025-04 |
| Compiler | solc 0.8.27, cancun, via IR |
| Bug class | toReal calls convertToAssets and toNominal calls convertToShares |
TL;DR#
Burve's adjustor is supposed to turn a nominal value into the real LST amount and back. toReal calls convertToAssets and toNominal calls convertToShares. At 1 stETH = 1.1 ETH, a 100 nominal deposit is charged 110 stETH instead of 90.909090909090909090 stETH. The position is credited only the fair amount. The other 19.090909090909090910 stETH sits uncredited. Swapping the two ERC-4626 calls charges the fair amount.
Background#
Sherlock's April 2025 Burve contest, issue 113 (H-2). The report's example is a pool of stETH and WETH where 1 stETH = 1.1 WETH. Alice adds 100 of value and should post 100/1.1 stETH. toReal uses convertToAssets, so the pool asks for 110 stETH. The team fixed the pair in itos-finance/Burve commit c14995d.
The vulnerable code#
function toReal(address token, uint256 nominal, bool) external view returns (uint256) {
return getVault(token).convertToAssets(nominal); // @> VULN: toReal must be convertToShares
}
toNominal has the opposite mistake and calls convertToShares. The recommended change swaps the two calls.
- return getVault(token).convertToShares(real);
+ return getVault(token).convertToAssets(real);
- return getVault(token).convertToAssets(nominal);
+ return getVault(token).convertToShares(nominal);
Root cause#
Nominal means the underlying value. Real means the vault shares. convertToAssets prices shares as assets, so feeding it a nominal amount inflates the share count by the share price. convertToShares is the inverse and is what toReal needs.
Preconditions#
- The LST vault reports 1.1 assets per share. This run uses 1100 assets per 1000 shares.
- A multi-token pool prices one side with
ERC4626ViewAdjustor.toReal. - The depositor can pay the inflated amount. This run funds exactly 110 stETH.
Attack walkthrough#
- The depositor adds 100 nominal value.
- The pool calls
toReal. convertToAssets(100)returns 110 stETH.- The pool pulls 110 stETH.
- The position is credited
100 * 1000 / 1100= 90.909090909090909090 stETH. - The uncredited 19.090909090909090910 stETH remains in the surplus holder.
Diagrams#
Impact#
The depositor pays 110 stETH and is credited 90.909090909090909090 stETH. The difference, 19.090909090909090910 stETH, is no longer theirs. Other LPs, or the protocol, hold that surplus. The control adjustor, which calls convertToShares, charges only the fair amount.
Remediation#
Swap the bodies. toNominal must call convertToAssets. toReal must call convertToShares.
How to reproduce#
cd 56951-h-2-incorrect-implementation-of-erc4626viewadjustor-sherlock_exp
forge test -vv
test_exploit_depositor_overpays_19_steth asserts the 110 charge, the fair credit, and the surplus. test_control_convertToShares_charges_fair asserts the swapped function. Captured output is output.txt.
Sources#
- AuditVault finding: https://github.com/Auditware/AuditVault/blob/main/findings/56951-h-2-incorrect-implementation-of-erc4626viewadjustor-sherlock.md
- Sherlock judging issue 113: https://github.com/sherlock-audit/2025-04-burve-judging/issues/113
- Audited code: https://github.com/sherlock-audit/2025-04-burve/blob/44cba36e2a0c3cd7b6999459bf7746db92f8cc0a/Burve/src/integrations/adjustor/E4626ViewAdjustor.sol#L29-L71
- Fix: https://github.com/itos-finance/Burve/commit/c14995d806cdabc20bfedb094d585ed7b8668c8c
Sources & further analysis#
Reproductions & code
- Standalone PoC + full trace: 56951-h-2-incorrect-implementation-of-erc4626viewadjustor-sherlock_exp (evm-hack-registry mirror).
- AuditVault finding: 56951-h-2-incorrect-implementation-of-erc4626viewadjustor-sherlock.
Alerts & third-party analyses
These dashboards index community alerts tweets, post-mortems, and independent write-ups. Reach them through the protocol name above to cross-check this reproduction against other analyses.