Non atomic yield distribution may lead to theft of yield
The yield distribution function processes holders in separate chunks, allowing an attacker to transfer tokens between addresses after one address has been credited, so the same tokens earn yield twice. This lets the attacker steal yield that should have gone to other holders.
- Disclosed after under an hour
50507 sc high non atomic yield distribution may lead to theft of yield
Submitted on Jul 25th 2025 at 15:04:50 UTC by @a16 for Attackathon | Plume Network
- Report ID: #50507
- Report Type: Smart Contract
- Report severity: High
- Target: https://github.com/immunefi-team/attackathon-plume-network/blob/main/arc/src/ArcToken.sol
- Impacts:
- Theft of unclaimed yield
Description
Brief/Intro
The function distributeYieldWithLimit() allows the Yield Distributor to distribute the yield in a non-atomic way. This allows for users to transfer Arc Tokens to other addresses between the calls, doubling their yield for the same token balance.
Vulnerability Details
distributeYieldWithLimit() rewards Arc Token holders based on their Arc Token balance, distributing yield proportional to their shares.
When yield distribution is divided into separate transactions using distributeYieldWithLimit(), incorrect yield distribution can occur if Arc Token balances change between calls. This can happen due to benign transfers or malicious actions.
A malicious actor who already received their fair share during an earlier distributeYieldWithLimit() call can transfer their Arc Tokens to a different address that has not yet been processed; when that later address is processed, it will be credited again for the transferred balance. Additionally, if the Yield Token has an intrinsic callback (e.g., ERC-777), the same problem might occur even for an atomic distributeYield() call, because transfers lack a nonReentrant modifier.
Impact Details
Malicious users can multiply their yields by a factor proportional to the number of distributeYieldWithLimit() calls (or distribution chunks), effectively stealing yield that should have gone to others.
Proof of Concept
Consider this scenario:
- Address A (attacker) is among the first entries in the
holdersarray and has 100 Arc Tokens. - Address B (also attacker-controlled) appears later in the
holdersarray (for example, in the second third if there are 1000 addresses) and has 1 Wei of Arc Tokens.
{% stepper %} {% step %}
First step
The Yield Distributor calls distributeYieldWithLimit() for the first third of holders. It iterates over address A and transfers yield proportional to A's 100 Arc Token balance.
{% endstep %}
{% step %}
Second step
The attacker immediately transfers 100 Arc Tokens from address A to address B. {% endstep %}
{% step %}
Third step
The Yield Distributor calls distributeYieldWithLimit() for the second third of holders. It iterates over address B and transfers yield proportional to B's current 100 Arc Token balance. The transaction does not revert.
{% endstep %}
{% step %}
Fourth step
The Yield Distributor calls distributeYieldWithLimit() for the final third of holders. This transaction reverts (or at minimum results in an incorrect final distribution) because addresses A and B combined have received more yield than they were entitled to.
{% endstep %}
{% endstepper %}
References:
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
Likely the yield distribution is split into multiple calls without a snapshot of balances, so token transfers between calls cause the same balance to be counted more than once.
Impact
An attacker could multiply their yield by the number of distribution chunks, stealing yield from other holders; the text also notes that if the yield token has a callback such as ERC-777, the same issue might occur even in an atomic distribution because transfers lack a nonReentrant modifier.
What the attacker needed
Attacker controls two addresses in holders array; yield distribution split into multiple calls; attacker can transfer tokens between calls
The fix
The distribution should use a fixed snapshot of balances taken before any payouts, or be made atomic with reentrancy protection on transfers.
How it was found
- The distributor calls distributeYieldWithLimit for the first third of holders, paying address A for its 100 tokens.
- The attacker transfers 100 tokens from address A to address B, which appears later in the holders array.
- The distributor calls distributeYieldWithLimit for the second third, paying address B for its new 100-token balance.
- The distributor calls distributeYieldWithLimit for the final third, which reverts or produces an incorrect distribution because A and B together received too much yield.
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.
Yield is a reward paid to people who hold tokens. The contract pays holders in batches, and between batches an attacker can move tokens to a second address that has not been paid yet. That second address then gets paid again for the same tokens, so the attacker takes more than their fair share.
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.