Skip to content
Business logic Audit finding Intermediate

ArcTokenPurchase Contract is a Token Holder and may be Yield Recipient.

The ArcTokenPurchase contract can hold ArcToken and therefore receive yield tokens during distributions, but it only has withdrawal functions for the purchase token and for unsold ArcTokens. If the yield token differs from the purchase token, those yield tokens become permanently stuck in the contract.

Finlooz4 Follow

Originally disclosed on Immunefi

  • Disclosed after under an hour

52075 sc medium arctokenpurchase contract is a token holder and may be yield recipient

Submitted on Aug 7th 2025 at 18:18:54 UTC by @Finlooz4 for Attackathon | Plume Network

Description

Brief/Intro

The ArcTokenPurchase contract can receive yield tokens when acting as an ArcToken holder. If the yield token differs from the purchase token, these tokens become permanently stuck since the contract lacks withdrawal functionality for arbitrary ERC20 tokens.

Vulnerability Details

The ArcToken contract's distributeYield function transfers yield tokens to holders, including the ArcTokenPurchase contract if it holds ArcToken tokens. The yield tokens sent to ArcTokenPurchase may be irretrievable because the contract only supports withdrawing the purchase token via withdrawPurchaseTokens. If the yield token (set via setYieldToken) differs from the purchase token (set via setPurchaseToken), there is no function to withdraw yield tokens, potentially locking them in the contract.

Relevant code excerpt:

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

Solidity
// ArcToken.sol - Yield Distribution
function distributeYield(uint256 amount) external onlyRole(YIELD_DISTRIBUTOR_ROLE) nonReentrant {
    ...
    for (uint256 i = 0; i < lastProcessedIndex; i++) {
        address holder = $.holders.at(i);
        if (!_isYieldAllowed(holder)) continue;
        ...
        yToken.safeTransfer(holder, share); // Tokens sent to ArcTokenPurchase
    }
    ...
}
Solidity
// ArcTokenPurchase.sol - Withdrawal Functions (Limited)
function withdrawPurchaseTokens(address to, uint256 amount) external ... {
    // Only withdraws purchaseToken (e.g., DAI)
    ps.purchaseToken.transfer(to, amount); 
}

function withdrawUnsoldArcTokens(...) external ... {
    // Only withdraws ArcTokens
    token.transfer(to, amount);
}

Impact Details

If the yield token (e.g., USDC) ≠ purchase token (e.g., DAI), USDC sent to ArcTokenPurchase during distributions becomes permanently inaccessible.

Proof of Concept

{% stepper %} {% step %}

Step 1 — Deploy contracts

Deploy ArcToken with a yield token (e.g., USDC) and ArcTokenPurchase with a different purchase token (e.g., DAI). {% endstep %}

{% step %}

Step 2 — Enable token sale

Enable token sale in ArcTokenPurchase using enableToken, transferring ArcToken tokens to it, making it a holder. {% endstep %}

{% step %}

Step 3 — Distribute yield

Call distributeYield in ArcToken to distribute yield tokens (USDC) to holders, including ArcTokenPurchase. {% endstep %}

{% step %}

Step 4 — Attempt withdrawal

Admin tries to withdraw USDC from ArcTokenPurchase but fails:

  • withdrawPurchaseTokens only handles the configured purchase token (e.g., DAI).
  • withdrawUnsoldArcTokens only handles ArcTokens. {% endstep %}

{% step %}

Step 5 — Result

USDC is permanently stuck in ArcTokenPurchase. {% endstep %} {% endstepper %}

References

The original report as published on Immunefi, by Finlooz4. 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 contract only implements withdrawal functions for the purchase token and for ArcTokens, with no generic ERC20 rescue function for other tokens it may receive.

Impact

Yield tokens could be permanently locked in the contract when the yield token differs from the purchase token, which the report rates as a temporary freezing of funds.

What the attacker needed

Yield token differs from purchase token; ArcTokenPurchase holds ArcTokens; yield distribution runs

How it was found

  1. Deploy ArcToken with a yield token and ArcTokenPurchase with a different purchase token.
  2. Enable the token sale in ArcTokenPurchase, transferring ArcTokens to it so it becomes a holder.
  3. Call distributeYield on ArcToken so yield tokens are sent to holders, including ArcTokenPurchase.
  4. Try to withdraw the yield tokens from ArcTokenPurchase; the available functions only handle the purchase token and ArcTokens.
  5. The yield tokens remain stuck in ArcTokenPurchase.

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 smart contract can own tokens like a person can. This contract was set up to hold two kinds of tokens, but it only has a way to send out one of them. If it receives the other kind, nobody can move it out, so it is lost inside the contract forever.

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 Finlooz4

View all

2 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.