Crypto exploits

XLootStaking exploit analysis

LootBot's xLOOT staking contract computed NFT reward payouts before marking them redeemed, so the attacker submitted the same seven owned xLOOT IDs 155 times each in one `redeem` call. The staking contract paid out 6.21 ETH gross, per DeFiHackLabs and the attack transaction; DefimonAlerts reported the attacker's net loss figure as "$9600" after the Balancer flash loan was repaid.

David

Security ·

Reported loss
$10K
Occurred
Logged

Logged as “2026-04-15: Duplicate Xloot Redemption on XLootStaking”.

Analysis3 min read

LootBot runs an NFT layer, xLOOT, on top of its $LOOT staking: besides points for staked $LOOT, each owned xLOOT token earns a share of the ETH collected into the staking contract's epochs. Every claim, staking points or xLOOT share, goes through one entry point on the Staking contract behind the proxy at 0x9d87Ff196646A99BDdb16876066aA863900118b4, verified on Etherscan as Staking, an OpenZeppelin-based upgradeable implementation at 0xf3A3648bB1Da9D3aeA107da77E6f5bA9Cf313127.

The order of operations in _redeemable

redeem(uint256[] xloots) calls an internal _redeemLoot, which first runs the view function _redeemable to total everything an account can claim, records the claim (nextRedeem for each id and the user's last-redeemed epoch) and then pays that total in one call. For the NFT side, _redeemable loops over the caller-supplied xloots array. For each id it checks ownerOf(id) == account and, if the stored nextRedeem[id] is behind the contract's current epoch, adds every epoch's epn (ETH owed per xLOOT) from nextRedeem[id] up to the present. _redeemLoot then loops over the same array a second time and sets nextRedeem[id] to the current epoch, but by then _redeemable has already finished running. Neither loop checks whether an id appears more than once. An array holding the same token seven times gets that token's unclaimed epochs added to claimable seven times, because every pass reads the same stale nextRedeem[id] before any of them write it.

One call, 1,085 redemptions

The attacker, 0xAcDc…8630, owned seven xLOOT tokens, IDs 128, 144, 145, 195, 49, 51 and 52, that had not been redeemed since the previous epoch. From a throwaway contract, 0xd8A9…CF4d:

  1. Flash-borrow 2.1 WETH from Balancer's vault and unwrap it to ETH.
  2. Send the 2.1 ETH to the staking proxy's receive(), which forces the pending epoch to commit early and sets its epn payout rate.
  3. Build an array of the seven owned IDs, each repeated 155 times, 1,085 entries in total, and call redeem with it.
  4. Collect the payout, which _redeemable has multiplied 155 times per token.
  5. Wrap enough ETH back into WETH to repay the flash loan plus its fee, return the seven xLOOT tokens to the attacker's own wallet, and sweep the remaining ETH out.

The attack transaction shows the staking proxy paying out 6.20983297318446132 ETH to the attack contract, the figure the DeFiHackLabs entry rounds to 6.21 ETH. After the contract repaid Balancer 2.1 ETH plus its fee, 4.10983297318446132 ETH reached the attacker's own address.

A smaller figure in the only independent writeup

A post from the alert account DefimonAlerts, the outside source the DeFiHackLabs entry itself points to, states the loss as "$9600" and describes the same root cause: _redeemable iterating the array with no check for a repeated ID, and nextRedeem written only after the whole array had been totaled. That dollar figure lines up with the attacker's net ETH after repaying the flash loan, not with the 6.21 ETH the staking contract actually paid out, which Etherscan prices at roughly $13,800 to $14,700 depending on which day's ETH rate is used. No source puts a dollar figure on the gross amount drained from the contract.

No patch as of this review

The proxy's transaction history still shows implementation 0xf3A3648bB1Da9D3aeA107da77E6f5bA9Cf313127, the one the exploit used, attached to a transaction from 18 days before this review, over six months after the attack. Staking and unstaking continue on the same contract. Nothing in the sources read, the DefimonAlerts post, the DeFiHackLabs entry or LootBot's own on-chain activity, mentions a pause, a bounty or a compensation plan.

The fix the code calls for is narrow: mark nextRedeem[id] for each entry as it is processed, inside the same loop that adds to claimable, instead of totaling the whole array first and writing the bookkeeping afterward. Rejecting an xloots array with a repeated ID outright would also close it.

The nearest comparison in Alphaday's exploit coverage is X7Finance, where claimRewards let a caller re-run the same per-NFT reward computation against a balance delta that had not yet been consumed, inflating the payout until a single owned NFT drained the pool. Both sit in the same family: an NFT claim function that totals a reward before the state meant to stop it being counted twice is actually written.

Sources read (8)