Arctoken theft beyond unclaimed yield during distribution
The yield distribution function processes holders in chunks using their current balances without a snapshot, so an attacker with two accounts can move tokens between chunks and be paid twice for the same tokens. This lets the attacker receive more yield than the configured total amount.
- Disclosed after under an hour
52254 sc high arctoken theft beyond unclaimed yield during distribution
Submitted on Aug 9th 2025 at 05:30:38 UTC by @Blobism for Attackathon | Plume Network
- Report ID: #52254
- Report Type: Smart Contract
- Report severity: High
- Target: https://github.com/immunefi-team/attackathon-plume-network/blob/main/arc/src/ArcToken.sol
- Impacts: Direct theft of any user funds, whether at-rest or in-motion, other than unclaimed yield
Description
Brief / Intro
An attacker controlling multiple accounts with ArcToken holdings can transfer tokens between their accounts in between calls to distributeYieldWithLimit. Because the distribution function uses current balances (no snapshot) and processes holders in chunks, the attacker can be paid twice for the same underlying tokens — once in an earlier chunk from account A, then again in a later chunk after moving the tokens to account B — causing yield distributed to exceed the intended totalAmount.
Vulnerability Details
The distributeYieldWithLimit method distributes yield in chunks to avoid gas exhaustion. It accepts a start index and a max number of holders (batchSize) to process for a given chunk. The implementation queries each holder's balance at the time of processing and uses that to compute their share, but it does not snapshot balances at the start of the distribution run or otherwise prevent balance changes between chunks.
Relevant excerpt:
{% code title="ArcToken.sol (excerpt)" %}
function distributeYieldWithLimit(
uint256 totalAmount,
uint256 startIndex,
uint256 maxHolders
)
external
onlyRole(YIELD_DISTRIBUTOR_ROLE)
nonReentrant
returns (uint256 nextIndex, uint256 totalHolders, uint256 amountDistributed)
{
// ...
for (uint256 i = 0; i < batchSize; i++) {
uint256 holderIndex = startIndex + i;
address holder = $.holders.at(holderIndex);
if (!_isYieldAllowed(holder)) {
continue;
}
uint256 holderBalance = balanceOf(holder); // <----- no balances snapshot
if (holderBalance > 0) {
uint256 share = (totalAmount * holderBalance) / effectiveTotalSupply;
if (share > 0) {
yToken.safeTransfer(holder, share);
amountDistributed += share;
}
}
}
// ...
}
{% endcode %}
Because effectiveTotalSupply and holder balances can change between chunks, an attacker can manipulate holdings between chunk calls to be counted multiple times.
Impact Details
- Expected behavior: distribute up to
totalAmountamong holders, proportional to their holdings at the moment of distribution. - Actual issue: by transferring tokens between attacker-controlled accounts that are processed in different chunks, the attacker can be counted multiple times and receive more yield than intended. This results in direct theft of tokens beyond the configured distribution amount.
Proof of Concept
{% stepper %} {% step %}
Setup: Two attacker accounts at different holder indices
- Attacker controls Account A (early index, e.g., index 50) and Account B (later index, e.g., index 150).
- The attacker places most of their ArcToken holdings in Account A initially. {% endstep %}
{% step %}
Distributor processes first chunk
- The yield distributor calls
distributeYieldWithLimitwithmaxHolders = 100for holders 0–99. - Account A (index 50) receives its calculated share based on its large balance at that time. {% endstep %}
{% step %}
Attacker moves tokens between chunks
- Immediately after the first chunk is processed, the attacker transfers most tokens from Account A to Account B.
- No snapshot or guard prevents this transfer from affecting later chunks. {% endstep %}
{% step %}
Distributor processes second chunk
- The yield distributor calls
distributeYieldWithLimitagain for holders 100–199. - Account B (index 150) now has the large balance and receives its share, effectively double-counting the same underlying tokens. {% endstep %} {% endstepper %}
As a result, more yield is distributed than the totalAmount provided to the distribution call sequence, enabling theft beyond intended limits.
References
{% hint style="danger" %} Severity: High — an attacker controlling multiple accounts can directly extract funds beyond the configured distribution by transferring tokens between chunks during a multi-call distribution. {% endhint %}
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The distribution function reads live balances per chunk instead of using a snapshot taken at the start of the distribution run.
Impact
An attacker controlling multiple accounts could extract yield beyond the configured totalAmount, resulting in direct theft of tokens.
What the attacker needed
Control of two accounts with token holdings; accounts at different holder indices; distribution run split into multiple chunks
How it was found
- The attacker holds most tokens in an early-index account.
- The distributor processes the first chunk, paying that account.
- The attacker moves the tokens to a later-index account.
- The distributor processes the second chunk, paying the later account for the same tokens.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A token contract pays out yield to holders in several batches. It checks each holder's balance only when that holder's batch is processed, not when the payout run starts. Someone with two accounts can move tokens from the first account to the second after the first batch, so the same tokens earn a payout in both batches.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.