Ethereum
Validation gap

Asterix's $39.7K Loss and How Olympix Would Have Prevented It

Loss
Loss
Exploit date
June 7, 2026

At 19:56 UTC on June 7, 2026, a freshly funded wallet started deploying contracts against Asterix, an NFT liquidity project whose ASTX token runs on the DN404 hybrid standard. Five hours and 242 transactions later, the attacker's wallets held 24.34 ETH taken out of ASTX's Uniswap v4 pool, about $39,700 at the price just before the first transaction.

The bug wasn't Asterix's invention. It sat in an early version of DN404 that Asterix had built on, and the same weakness had just been used against Flooring Protocol, whose losses passed $900,000 according to Cryptopolitan. Asterix inherited the flaw along with every other line of the token code it forked, and it paid for that inheritance within a day of the first attack.

Tokens That Are Also NFTs

DN404 pairs a fungible token with an NFT collection one to one. Holding a whole ASTX token means holding an Asterix NFT, buying one mints the NFT to the buyer, and selling one burns it. That gives collectibles the divisibility and liquidity of an ERC-20, which is why NFT liquidity platforms like Flooring and its forks adopted the standard.

Keeping the two sides in sync takes bookkeeping ordinary tokens never need. The contract tracks which NFT IDs each address owns, who's approved to move which ID, and how a token balance maps onto that set of IDs. To save gas, DN404 packs much of this into compact storage maps indexed by arithmetic on the token ID. That arithmetic is where ASTX broke.

An Approval That Trusted Any ID

Asterix explained the root cause itself. According to its disclosure, reported by Coinlive, the exploit affected the ASTX token contract and stemmed from an early DN404 version that lacked checks restricting token IDs during approval operations.

SlowMist's founder, Yu Xian, described the mechanics the same day. According to ChainCatcher's report, he said the Asterix attack matched the attacks on Flooring Protocol and BMP the day before, with operations that shift high NFT IDs overflowing and being reused, and that the attacker appeared to be hunting for vulnerabilities shared by every project on the same code.

The verified ASTX source on Etherscan shows both halves of that description. The internal approval function looks up the owner of the requested ID and writes the approval without ever checking that the ID exists:

function _approveNFT(address spender, uint256 id, address msgSender)
    internal
    virtual
    returns (address)
{
    DN404Storage storage $ = _getDN404Storage();

    address owner = $.aliasToAddress[_get($.oo, _ownershipIndex(id))];

    if (msgSender != owner) {
        if (!$.operatorApprovals[owner][msgSender]) {
            revert ApprovalCallerNotOwnerNorApproved();
        }
    }

    $.tokenApprovals[id] = spender;

    return owner;
}

The owner lookup goes through a helper that doubles the ID with a left shift:

function _ownershipIndex(uint256 i) private pure returns (uint256) {
    return i << 1;
}

Shifts in Solidity don't revert when bits fall off the top. For any ID at or above 2^255, the shift drops the highest bit and the index lands on the slot of a much smaller ID. A caller can therefore name an ID that doesn't exist, have the contract read the owner of a real NFT in its place, pass the ownership check as that owner, and leave an approval stored under the oversized ID. The ownership map and the approval map stop agreeing about which token is which. It's the same kind of bookkeeping failure that reports on Flooring described as ghost ownership.

Five Hours of Repeat Transactions

The on-chain record matches what Asterix and Yu Xian described. The attacking wallet, 0x7a95...2328, was funded on June 6 and made two small trades through Uniswap's Universal Router that day. At 19:56 UTC on June 7, about 4 a.m. on June 8 in the GMT+8 time zone Asterix used for its alert, it sent the first of 242 transactions that each deployed a fresh helper contract.

Every helper ran the same loop dozens of times inside a single transaction. In the first one, the helper cycled single ASTX tokens through the Uniswap v4 PoolManager and pulled out roughly 0.013 ETH on each pass, minting and burning ASTX along the way. At the end of the transaction it wrapped the proceeds and sent 1.19 WETH to a second wallet, 0x2dE4...8b70, plus 0.05 ETH back to the deployer.

The payouts shrank as the pool drained. By the last helper, at 01:11 UTC on June 8, the transfer was worth less than 0.01 WETH. Across all 242 transactions, 22.51 WETH reached the collection wallet and 1.84 ETH went back to the deployer, for 24.34 ETH in total. Asterix put the figure at about 30 ETH, and news reports rounded the loss to about $40,000. The deployer's last move came on July 13, when it sent 1.28 ETH on to another address.

BlockSec's Phalcon team was among the first to tie the attack back to Flooring, saying the Flooring attack had essentially been run back on Asterix because the project was forked from DN404 and BT404.

No Patch Available

The ASTX contract couldn't be fixed in place. According to Asterix, the token contract is immutable, so the vulnerable code couldn't be patched. The team told users to stop interacting with the existing pool and token and said it planned a migration to a secure token. In its first statement on X, Asterix said it was investigating and would publish a full post-mortem once its analysis was complete. As of November 25, 2026, no such post-mortem had appeared in public reporting.

Immutability cuts both ways here. It's what lets holders trust a token contract nobody can quietly change, and it's also why an inherited bug in a forked standard stays live until everyone has moved to something new.

Forks Inherit Everything

Forking a well-known standard is a reasonable choice. The code has been read by more people and run in production by other teams. A fork also carries every assumption the original made, including the ones nobody has tested yet, and a missing bound in a shared standard is shared by every project that runs it. Once Flooring's version failed in public, Asterix's identical lines were a known target, and the attacker went looking for exactly that.

How Olympix Would Have Caught the Wrapping ID

Olympix reads a contract as states, transitions and entry points, and infers the invariants it depends on from the code and its context. For ASTX, the state is the ownership and approval bookkeeping that keeps tokens and NFTs in sync. The transitions are approvals, transfers, mints and burns, all reachable through the mirror NFT contract. The engine maps every path into that bookkeeping and narrows from all paths to the feasible ones, then to the ones that touch an invariant.

The invariant DN404 depends on is one every holder assumes. An approval for one token ID must only ever affect that token ID, and no sequence of calls should leave the ownership map and the approval map disagreeing about who controls an NFT.

Static analysis would have surfaced the signal in _approveNFT: a caller-supplied ID flowing into an unchecked left shift and a packed-storage lookup, with no existence or range check before the write to tokenApprovals. That marker would have pointed the engine at the approval paths that deserved the closest look.

BugPoCer starts from an invariant and searches for a sequence of state changes that breaks it. Had the Asterix team run it on the forked token, the search would have tried approvals with IDs at the top of the uint256 range, followed by the transfers and swaps those approvals unlock. BugPoCer would have returned that sequence as a counterexample, with the minimal conditions that trigger it and a generated Forge test that reproduces it. That test would have been the June 7 drain, produced in development instead of on mainnet.

The run would have mattered even though Asterix didn't write the vulnerable lines. Forked code becomes the fork's code the moment it's deployed, and Olympix runs at every merge and before release, on inherited code the same as new code. A bound on the ID before the ownership lookup would have closed the path.

Treat a Fork as Your Own Code

Asterix's lesson reaches well past DN404. Any team building on another protocol's contracts takes on that code's assumptions along with its features, and when one fork gets hit, every sibling running the same lines becomes the next search target. To see how Olympix maps the invariants in the code you've forked as well as the code you've written, and returns a working counterexample for each one that breaks, book a technical walkthrough.

On-Chain References

First exploit tx: 0x09c7...7d81

Last exploit tx: 0x2679...b3cb

Attacker (deployer): 0x7a95...2328

Proceeds wallet: 0x2dE4...8b70

ASTX token (DN404): 0x0000...Ff39

ASTX mirror NFT: 0x0000...cc72

Uniswap v4 PoolManager: 0x0000...8A90

See what Olympix finds on your own code

Send us a repo that's already been audited, and we'll run Olympix at the same commit and show you what comes back.