Reproduced Exploit
Level Money: initiateRedeem pays a victim's stETH collateral to any caller
initiateRedeem accepts an order whose benefactor and beneficiary are chosen by the caller. A user who has approved the minter for lvlUSD can be named as benefactor. Bob sets himself as beneficiary. The call pulls 50 lvlUSD from the victim and sends 50 stETH collateral to Bob. Requiring order.benefa…
Loss
50 stETH moved from the minting contract to Bob. The victim's 50 lvlUSD is taken with it
Chain
Ethereum
Category
access-control
Date
Sep 2024
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: 42043-mint-initiateredeem-and-redeem-lack-access-control-cantina-n. Standalone Foundry PoC and full write-up: 42043-mint-initiateredeem-and-redeem-lack-access-control-cantina-n_exp in the
evm-hack-registrymirror.
Vulnerability classes:
vuln/access-control/missing-auth·vuln/logic/missing-check
Key info#
| Field | Value |
|---|---|
| Loss | 50 stETH moved from the minting contract to Bob. The victim's 50 lvlUSD is taken with it |
| Vulnerable contract | LevelMinting.initiateRedeem |
| Attacker EOA | 0x1111111111111111111111111111111111111111 |
| Attack contract | Exploit |
| Attack tx | Exploit.run() |
| Chain / block / date | Ethereum model · block 0 · 2024-09 |
| Compiler | solc 0.8.27, cancun, via IR |
| Bug class | Redeem order uses benefactor and beneficiary with no check that the caller is the benefactor |
TL;DR#
initiateRedeem accepts an order whose benefactor and beneficiary are chosen by the caller. A user who has approved the minter for lvlUSD can be named as benefactor. Bob sets himself as beneficiary. The call pulls 50 lvlUSD from the victim and sends 50 stETH collateral to Bob. Requiring order.benefactor == msg.sender reverts that order and leaves both balances in place.
Background#
Cantina's September 2024 Level Money review, reported by Delvir0. The published proof sets the redeemer-role check off, then calls initiateRedeem with benefactor equal to the address that received lvlUSD and beneficiary equal to the attacker. The recommended fix, confirmed in commit 5afc1851, is that order.benefactor must be msg.sender.
The vulnerable code#
function initiateRedeem(Order calldata order) external {
require(order.order_type == OrderType.REDEEM, "type");
// @> VULN: lvlUSD is taken from order.benefactor, not msg.sender, and collateral is paid to order.beneficiary
lvlusd.transferFrom(order.benefactor, address(this), order.lvlusd_amount);
collateral.transfer(order.beneficiary, order.collateral_amount);
}
The only gate is the order type. transferFrom spends the benefactor's existing approval. transfer pays collateral_amount to beneficiary.
Root cause#
The order struct carries both the account that supplies lvlUSD and the account that receives collateral, and the function trusts both fields. An approval to the minter is enough. The caller does not have to be the benefactor.
Preconditions#
- The victim holds 50 lvlUSD and has approved
LevelMintingfor at least that amount. - The minting contract holds 50 stETH collateral.
- Bob can call
initiateRedeem. In the report this is the configuration where the redeemer-role check is not enforced.
Attack walkthrough#
- Bob builds a REDEEM order with nonce 3, the victim as benefactor, and himself as beneficiary. Both amounts are 50.
initiateRedeemchecks the order type and nothing else.- 50 lvlUSD is pulled from the victim.
- 50 stETH is transferred to Bob.
- The victim's lvlUSD balance is 0 and the collateral pool is empty.
- The control uses the same order shape against a minting contract that requires
benefactor == msg.sender. The theft reverts. A self-redeem by the token holder still pays that holder 50 stETH.
Diagrams#
Sources & further analysis#
Reproductions & code
- Standalone PoC + full trace: 42043-mint-initiateredeem-and-redeem-lack-access-control-cantina-n_exp (evm-hack-registry mirror).
- AuditVault finding: 42043-mint-initiateredeem-and-redeem-lack-access-control-cantina-n.
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.