Reproduced Exploit

Aria — stRWIP is always minted for RWIP in a 1:1 ratio

1. burnTicket always mints stRWIP equal to the ticket's RWIP amount (1:1). 2. unstake redeems stRWIP at the live exchange rate balance / supply. 3. After rewards inflate the rate, stake → burnTicket → unstake yields more RWIP than deposited. 4. An attacker loops this while honest stakers hold share…

May 2025Otherlogic3 min read

Chain

Other

Category

logic

Date

May 2025

Source

AuditVault

EVM Playground

Source-level debugger — step opcodes and Solidity in sync

evm-hack-analyzer

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. No backend, no live RPC.

Loading fork state…

Source & credit. Reproduction of a public audit finding curated by AuditVault — the original finding: 63676-h-01-strwip-is-always-minted-for-rwip-in-a-11-ratio-pashov-a. Standalone Foundry PoC and full write-up: 63676-h-01-strwip-is-always-minted-for-rwip-in-a-11-ratio-pashov-a_exp in the evm-hack-registry mirror.


Vulnerability classes: vuln/logic/reward-calculation · reward-theft · reward-accounting

Reproduction: a self-contained Foundry PoC that compiles & runs in an isolated project with only forge-std — no fork, no RPC, no anvil_state. Full trace: output.txt. PoC: test/63676-h-01-strwip-is-always-minted-for-rwip-in-a-11-ratio-pashov-a_exp.sol.

AuditVault taxonomy: severity/high · sector/staking · sector/vault · platform/pashov · reward-calculation · reward-theft · reward-accounting · timestamp-dependence


Key info#

ImpactHIGH — attacker steals staking rewards belonging to honest stakers
ProtocolAria (RWIP / stRWIP staking)
Vulnerable codeRWIPStaking.burnTicket — mints stRWIP 1:1 with ticket RWIP
Bug classFixed-ratio share mint vs variable-rate redeem
FindingPashov Aria security review 2025-05-12 · #63676
ReportPashov Aria review
SourceAuditVault
StatusAudit finding — fixed in PR 51. Reproduced as a reduced local synthetic.
Compiler^0.8.24 (PoC)

TL;DR#

  1. burnTicket always mints stRWIP equal to the ticket's RWIP amount (1:1).
  2. unstake redeems stRWIP at the live exchange rate balance / supply.
  3. After rewards inflate the rate, stake → burnTicket → unstake yields more RWIP than deposited.
  4. An attacker loops this while honest stakers hold shares and drains their rewards.

The vulnerable code#

SOLIDITY
function burnTicket(uint256 id) external {
    Ticket storage t = tickets[id];
    require(t.owner == msg.sender, "owner");
    require(!t.burned, "burned");
    t.burned = true;
    stRWIP.mintShares(msg.sender, t.amount); // @> VULN: 1:1 mint instead of exchange rate
    // FIX: mint shares = amount * supply / assets (with virtual shares offset)
}

Root cause#

Share issuance ignores the current pool exchange rate. Redemption uses the rate, so newly issued shares capture a free slice of prior rewards.

Preconditions#

  • At least one honest staker has burned tickets and holds stRWIP.
  • Rewards (or donations) of RWIP sit in the staking contract.
  • Attacker can stake, burn tickets, and unstake (hold period set to 0 / elapsed in the real protocol).

Attack walkthrough#

  1. Alice stakes 1000 RWIP and burns her ticket → 1000 stRWIP.
  2. 500 RWIP rewards are deposited → rate > 1.
  3. Bob stakes his balance, burns at 1:1, unstakes at the inflated rate.
  4. Repeat; Bob extracts most of the 500 rewards; Alice is left with dust.

Diagrams#

flowchart TD A["Alice holds 1000 stRWIP"] --> B["500 RWIP rewards deposited"] B --> C["Rate rises above 1:1"] C --> D["Bob stake then burnTicket"] D --> E["VULN: mint stRWIP 1:1"] E --> F["Bob unstake at inflated rate"] F --> G["Bob extracts Alice rewards"]

Impact#

Honest stakers lose essentially all deposited rewards. RWIP staking becomes economically broken for long-term depositors.

Sources#


Sources & further analysis#

Reproductions & code

Alerts & third-party analyses

  • Web3Sec X hacked database: search.
  • Rekt leaderboard: search.
  • Solodit incident search: search.

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.