F-2025-0003·snapshot-balance-manipulation

TreasuryBTC::claimRewards can be manipulated due to balanceOf()

Acknowledgedrafflelotteryvrf
TL;DR

Reward claims use live NXL balances at claim time rather than snapshot balances, allowing the same NXL tokens to be transferred between addresses and used to claim the same rewards multiple times.

Severity
CRITICAL
Impact
HIGH
Likelihood
HIGH
Method
MManual review
CAT.
Complexity
LOW
Exploitability
HIGH
02Section · Description

Description

Reward claim in TreasuryBTC::claimRewards and TreasuryBTC::claimMultipleRewards is calculated using live balances at claim time instead of using the NXL token balance at the snapshot creation time. The same NXL tokens can be transferred across different addresses and used to claim rewards multiple times for the same snapshot, draining protocol funds.

Vulnerable Scenario:

The following steps help understand the issue:

  • Address A with NXL token balance calls TreasuryBTC::claimRewards and successfully claims tokens.
  • Address A sends his NXL balance to another address B. Address B calls TreasuryBTC::claimRewards. This will also work because the function uses live balances of an address.
  • An attacker can repeat this multiple times to drain contract stablecoin balance.
03Section · Impact

Impact

Drain of protocol funds.

04Section · Recommendation

Recommendation

Make use of user NXL token balance at the snapshot creation time using ERC20Snapshot:

solidity
balanceOfAt(user, snapshotId)
totalSupplyAt(snapshotId)
05Section · Resolution

Resolution

Nexalo: Claim rewards system removed.

Zealynx: We recommend to follow recommendation instead of removing chore feature.

F-2025-0003

oog
zealynx

Smart Contract Security Digest

Monthly exploit breakdowns, audit checklists, and DeFi security research — straight to your inbox

© 2026 Zealynx