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.
- 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
- Report ID: #52075
- Report Type: Smart Contract
- Report severity: Medium
- Target: https://github.com/immunefi-team/attackathon-plume-network/blob/main/arc/src/ArcToken.sol
- Impacts: Temporary freezing of funds for at least 1 hour
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:
// 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
}
...
}
// 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:
withdrawPurchaseTokensonly handles the configured purchase token (e.g., DAI).withdrawUnsoldArcTokensonly handles ArcTokens. {% endstep %}
{% step %}
Step 5 — Result
USDC is permanently stuck in ArcTokenPurchase.
{% 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 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
- Deploy ArcToken with a yield token and ArcTokenPurchase with a different purchase token.
- Enable the token sale in ArcTokenPurchase, transferring ArcTokens to it so it becomes a holder.
- Call distributeYield on ArcToken so yield tokens are sent to holders, including ArcTokenPurchase.
- Try to withdraw the yield tokens from ArcTokenPurchase; the available functions only handle the purchase token and ArcTokens.
- 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.