Skip to content
Business logic Audit finding Intermediate

Holders length changing when distributing limit with limit could lead to case where new holders unfairly claim yield and yield is permanently frozen

The batch yield distribution function recalculates the holder list on every call, so holders who leave between batches shift the array indices. This can cause legitimate holders to be skipped, new holders to dilute pending rewards, and yield tokens already in the contract to become permanently locked.

silver_eth Follow

Originally disclosed on Immunefi

  • Disclosed after under an hour

52680 sc high holders length changing when distributing limit with limit could lead to case where new holders unfairly claim yield and yield is permanently frozen

Submitted on Aug 12th 2025 at 12:13:17 UTC by @silver_eth for Attackathon | Plume Network

Description

Brief / Intro

The distributeYieldWithLimit function fails to account for changes in the holder list during multi-batch yield distribution. Since the function recalculates the holder list and balances on each call, new holders can dilute existing allocations, while exiting holders may cause residual funds to be locked or distributions to skip legitimate recipients.

Vulnerability Details

The function assumes a static holder list between distribution batches, but the length of holders can change due to:

  • New holders being added → Dilutes shares for pending recipients, as there are more recipients to make use of shares.
  • Holders fully exiting via burn or transfer (balance = 0) → Shifts indices, causing skips or double distributions, e.g., holders might be shifted back in the holder list and the function would assume they have already claimed.

Impact Details

  • Holders can lose funds when shifted left in the holders array.
  • New holders will dilute rewards for previous holders whose batch hasn't hit yet.
  • If holders length reduces significantly, it could reach a point where startIndex >= endIndex causing the function to return and requiring a restart; however, on the next distribution the sender would have to send in new tokens meaning the yield tokens already in the contract could be locked.

References

https://github.com/immunefi-team/attackathon-plume-network/blob/580cc6d61b08a728bd98f11b9a2140b84f41c802/arc/src/ArcToken.sol#L466-L555

Proof of Concept

{% stepper %} {% step %}

Scenario setup

Assume there are currently 20 holders, and yield is distributed for the first 10. {% endstep %}

{% step %}

Change in holders

Before the next yield distribution, 2 of the users (e.g., at index 1 and 2) who have already claimed exit (they transfer all their tokens to another user who has claimed yield). {% endstep %}

{% step %}

Next distribution call

When the next distributeYieldWithLimit is called, it will do so with startIndex = 11, but since users at 1 and 2 have exited, the users who were at indices 11 and 12 have now shifted to 9 and 10. {% endstep %}

{% step %}

Result

As a result, those two users will be excluded from the rewards (they shifted positions and were skipped by the distribution logic). {% endstep %} {% endstepper %}

The original report as published on Immunefi, by silver_eth. Images and videos are our own copies; raw HTML is shown as text. View it on Immunefi.

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 function assumes the holder list is static between batches and uses stored indices that become invalid when holders are added or removed.

Impact

Holders could lose funds when shifted in the array, new holders could dilute pending rewards, and yield tokens already in the contract could be permanently locked.

What the attacker needed

Multiple yield distribution batches; holders join or exit between batches

How it was found

  1. Set up 20 holders and distribute yield to the first 10.
  2. Two already-paid holders at indices 1 and 2 exit by transferring all tokens to another paid user.
  3. Call the next distribution with startIndex 11, but the users formerly at 11 and 12 have shifted to 9 and 10.
  4. Those two users are skipped and excluded from the rewards.

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 contract pays out rewards to a list of holders in several batches. Between batches, people can join or leave, which changes the list order. The code assumes the list never changes, so it pays the wrong people or skips some, and money can get stuck.

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.

More by silver_eth

View all

8 more disclosed reports, best first.

More from Plume Network

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.