Reproduced Exploit

Repay pulls claim-router assets instead of returning them

FundsRequesterConnector._repayTokenToClaimRouter looks up the earn claim router, raises its allowance, and then calls requestTokenFromClaimRouter. That call transfers tokens from the router to the blueprint.

Undated•Ethereum•logic•3 min read

Loss

A 30 WETH debt repay leaves 60 WETH on the blueprint. The claim router loses the 30 WETH that should have bee…

Chain

Ethereum

Category

logic

Date

Undated

Source

AuditVault

EVM Playground

Source-level debugger — step opcodes and Solidity in sync

evm-hack-analyzer

The attack replays in your browser. Step through it by Solidity line or by opcode.

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.

Loading fork state…

Source & credit. Reproduction of a public audit finding curated by AuditVault — the original finding: 51909-incorrect-function-call-leads-to-loss-of-claim-router-assets. Standalone Foundry PoC and full write-up: 51909-incorrect-function-call-leads-to-loss-of-claim-router-assets_exp in the evm-hack-registry mirror.


Vulnerability classes: vuln/logic/wrong-call · vuln/defi/claim-router

Key info#

FieldValue
LossA 30 WETH debt repay leaves 60 WETH on the blueprint. The claim router loses the 30 WETH that should have been sent to it
Vulnerable contractConnector._repayTokenToClaimRouter
Attacker EOA0x1111111111111111111111111111111111111111
Attack contractExploit at 0x15452ec016c4dc8c549e7fe6ff4b26324ea8b7a4
Attack txExploit.run()
Chain / block / dateEthereum model · block 0 · 1970-01
Compilersolc 0.8.27, cancun, via IR
Bug classRepay calls requestTokenFromClaimRouter instead of repayTokenToClaimRouter
flowchart TD A["Blueprint holds 30 WETH and owes 30 WETH"] --> B["repayConcreteDebt clears the debt"] B --> C["Allowance is raised as if the router would pull"] C --> D["VULN requestTokenFromClaimRouter pulls 30 more"] D --> E["Blueprint holds 60 WETH and the router holds 0"] B --> F["Control calls repayTokenToClaimRouter"] F --> G["Blueprint holds 0 and the router holds 60"]

TL;DR#

FundsRequesterConnector._repayTokenToClaimRouter looks up the earn claim router, raises its allowance, and then calls requestTokenFromClaimRouter. That call transfers tokens from the router to the blueprint.

The blueprint already holds the 30 WETH protection payout and owes 30 WETH. After the buggy repay the debt is 0, the router has lost its 30 WETH reserve, and the blueprint holds 60 WETH. The finding's proof supplies that 60 onward. The same repay that calls repayTokenToClaimRouter leaves the blueprint at 0 and the router at 60.

The finding has no month, so the date marker is 1970-01.

The vulnerable code#

SOLIDITY
function _repayTokenToClaimRouter(address claimRouter, address asset, uint256 amount) internal {
    amountWord = amount;
    _increaseAllowanceIfNecessary(claimRouter, asset, amount);
    allowanceWord = token.allowance(address(this), claimRouter);
    // @> VULN: repay calls request and pulls assets out of the claim router
    funds.requestTokenFromClaimRouter(asset, amount);
    heldAfter = token.balanceOf(address(this));
}

Impact#

The borrower clears a 30 WETH concrete debt and is credited 60 WETH. The claim router pays the extra 30 WETH. An honest repay would have delivered the blueprint's 30 WETH to the router.

How to reproduce#

BASH
cd 51909-incorrect-function-call-leads-to-loss-of-claim-router-assets_exp
forge test -vv

test_exploit_repay_credits_60 asserts a blueprint balance of 60 WETH, a cleared debt, and an empty router. test_control_repay_forwards_30 asserts the blueprint is left at 0 and the router holds 60 WETH.

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.