Reproduced Exploit
ULTI: a fixed early-bird price reverts deposits after a 250 token swap
For one day after launch, deposit sizes the ULTI added as liquidity from 1e18 / INITIAL_RATIO instead of the pool spot. INITIAL_RATIO is 1e15, so the price is 1000 and the launch pool matches it. A 250 token swap then pays the caller 2e35 ULTI and drops spot to 64 percent of that price. The 1 perce…
Loss
Deposits revert for the early-bird day. The swap extracts 2e35 ULTI and the 10 token deposit is refused
Chain
Ethereum
Category
logic
Date
Nov 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: 43914-h-03-dos-on-deposits-during-the-early-bird-period-pashov-aud. Standalone Foundry PoC and full write-up: 43914-h-03-dos-on-deposits-during-the-early-bird-period-pashov-aud_exp in the
evm-hack-registrymirror.
Vulnerability classes:
vuln/logic/price-calculation·vuln/defi/slippage
Key info#
| Field | Value |
|---|---|
| Loss | Deposits revert for the early-bird day. The swap extracts 2e35 ULTI and the 10 token deposit is refused |
| Vulnerable contract | Ulti.deposit |
| Attacker EOA | 0x1111111111111111111111111111111111111111 |
| Attack contract | Exploit |
| Attack tx | Exploit.run() |
| Chain / block / date | Ethereum model · block 0 · 2024-11 |
| Compiler | solc 0.8.27, cancun, via IR |
| Bug class | depositPrice stays 1e18 / INITIAL_RATIO while spot moves past the 1 percent slippage band |
TL;DR#
For one day after launch, deposit sizes the ULTI added as liquidity from 1e18 / INITIAL_RATIO instead of the pool spot. INITIAL_RATIO is 1e15, so the price is 1000 and the launch pool matches it. A 250 token swap then pays the caller 2e35 ULTI and drops spot to 64 percent of that price. The 1 percent MAX_ADD_LP_SLIPPAGE_BPS check reverts the following 10 token deposit, and those input tokens are not taken. Pricing the same deposit from the live reserves lets it add liquidity.
Background#
Pashov Audit Group's November 2024 ULTI review, published 11 December 2024. During EARLY_BIRD_PRICE_DURATION the deposit price is the initial pool ratio. Liquidity adds revert when desired amounts differ from spot by more than MAX_ADD_LP_SLIPPAGE_BPS.
The vulnerable code#
// @> VULN: early-bird depositPrice is the launch ratio, so a moved spot fails the slippage check
uint256 depositPrice = 1e18 / INITIAL_RATIO;
if (block.timestamp >= launchTimestamp + EARLY_BIRD_PRICE_DURATION) {
depositPrice = pool.spotUltiPerInput() / 1e18;
}
ultiForLP is inputTokenForLP * 1e18 / depositPrice. After the swap the pool's ULTI-per-input is no longer that fixed ratio, so addLiquidity hits Price slippage check.
Root cause#
The early-bird branch ignores reserves. The slippage check still compares the resulting ULTI amount with the live pool, so any spot move beyond 100 bps bricks deposits until the day ends.
Preconditions#
launchTimestampis this block, so the call is inside the early-bird day. No time warp is required.- The pool starts at 1000 input and 1e36 ULTI, matching
INITIAL_RATIO. MAX_ADD_LP_SLIPPAGE_BPSis 100. The attacker can swap before the deposit.
Attack walkthrough#
- Spot starts at the launch ratio.
- Swap 250 input. The pool pays
2e35ULTI. Spot falls by more than 1 percent. - The early-bird check is still true, so
depositPricestays 1000. - A 10 token deposit is quoted from that fixed price and
addLiquidityreverts. - The caller still holds the 10 input tokens and the 2e35 ULTI from the swap.
- The control sizes
ultiForLPfrominputReserve / ultiReserveand the same deposit adds liquidity.
Diagrams#
Impact#
While the early-bird window is open, a single swap past the slippage band makes deposit revert for every caller. The attacker keeps the 2e35 ULTI bought in that swap. Honest deposits cannot enter at the launch price.
Remediation#
During the early-bird window, set depositPrice from the pool's current reserves the same way the fixed contract does: 1e18 * inputReserve / ultiReserve.
How to reproduce#
cd 43914-h-03-dos-on-deposits-during-the-early-bird-period-pashov-aud_exp
forge test -vv
test_exploit_early_bird_deposit_reverts_after_swap asserts the deposit call fails, the swap output is 2e35, and the 10 input tokens stay with the caller. test_control_spot_price_deposit_succeeds_after_swap asserts the spot-priced deposit adds liquidity. Captured output is output.txt.
Sources#
- AuditVault finding: https://github.com/Auditware/AuditVault/blob/main/findings/43914-h-03-dos-on-deposits-during-the-early-bird-period-pashov-aud.md
- Pashov review: https://github.com/pashov/audits/blob/master/team/md/ULTI-security-review-November.md
Sources & further analysis#
Reproductions & code
- Standalone PoC + full trace: 43914-h-03-dos-on-deposits-during-the-early-bird-period-pashov-aud_exp (evm-hack-registry mirror).
- AuditVault finding: 43914-h-03-dos-on-deposits-during-the-early-bird-period-pashov-aud.
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.