Skip to content
Business logic Audit finding Beginner

Any ArcToken admin can block the setting/update of the purchase token indefinitely.

Any ArcToken admin can enable a token sale, which makes the enabledTokens set non-empty and prevents the contract owner from setting or updating the purchase token. This can render the purchase functionality inoperable indefinitely.

avoloder Follow

Originally disclosed on Immunefi

  • Disclosed after under an hour

50340 sc medium any arctoken admin can block the setting update of the purchase token indefinitely

Description

Brief / Intro

Any token admin can easily block setting the purchase token in ArcTokenPurchase.sol.

Vulnerability Details

ArcTokenPurchase.sol allows token admins to enable their token sales by calling enableToken(), which adds the token to the enabledTokens enumerable set. When the owner of ArcTokenPurchase.sol wants to set or update the purchase token (the token users use to buy ArcTokens), the contract checks whether there are any ongoing sales by verifying if the enabledTokens set is empty.

This enables a malicious (or careless) arc token admin to grief the ArcTokenPurchase contract indefinitely by enabling a token sale (even with a very small amount), preventing the owner from setting or updating the purchase token. As a result the contract can become unusable:

  • If the purchase token has never been set, users cannot buy ArcToken.
  • If the purchase token needs to be updated later (e.g., regulatory reasons), it cannot be updated while any enabled token sale exists.
  • There is no emergency mechanism to cancel ongoing sales or otherwise clear enabledTokens.

Impact Details

Any arc token admin can grief ArcTokenPurchase.sol, preventing the contract owner from setting or updating the purchase token and rendering the purchase functionality inoperable.

Recommendation

{% stepper %} {% step %}

Prevent enabling tokens when purchase token is unset

Make it impossible to call enableToken() (or otherwise add to enabledTokens) if the purchase token has not been set. This prevents token admins from blocking the initial configuration. {% endstep %}

{% step %}

Introduce expiration for enabled tokens

Add an expiration time (or sale duration) for enabled token sales so that forgotten or intentionally long-lived listings cannot permanently block updates. For example, when enabling a token record the enable timestamp and enforce an automatic expiry after X days unless renewed. {% endstep %}

{% step %}

Add emergency mechanics to cancel sales

Introduce an emergency function (access-controlled to the contract owner or a multisig/governance role) that can cancel all ongoing sales or clear enabledTokens, allowing the purchase token to be updated when necessary (e.g., sanctions, regulatory changes). {% endstep %} {% endstepper %}

References

Proof of Concept

{% stepper %} {% step %}

Scenario #1

  1. ArcTokenPurchase.sol is deployed.
  2. An ArcToken admin enables their token with any amount.
  3. The contract owner cannot set the purchase token because enabledTokens is non-empty.
  4. Nobody can buy ArcToken because the purchase token hasn't been set.
  5. The contract is effectively dead/unusable. {% endstep %}

{% step %}

Scenario #2

  1. ArcTokenPurchase.sol is deployed.
  2. Purchase token is set.
  3. An ArcToken admin lists their token for sale at a very high price that nobody will buy.
  4. Time passes and the sale remains enabled.
  5. The purchase token needs to be updated (e.g., for compliance).
  6. It is not possible to update the purchase token due to the ongoing sale, blocking the necessary update. {% endstep %} {% endstepper %}

The original report as published on Immunefi, by avoloder. 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

The contract prevents setting the purchase token whenever any token sale is enabled, and there is no mechanism to cancel or expire enabled sales.

Impact

Any arc token admin can grief ArcTokenPurchase.sol, preventing the contract owner from setting or updating the purchase token and rendering the purchase functionality inoperable.

What the attacker needed

Attacker is an ArcToken admin; contract deployed

The fix

The contract should prevent enabling tokens when the purchase token is unset, add expiration for enabled tokens, and include an emergency function to cancel sales.

How it was found

  1. Deploy ArcTokenPurchase.sol.
  2. An ArcToken admin enables their token with any amount.
  3. The contract owner cannot set the purchase token because enabledTokens is non-empty.
  4. Nobody can buy ArcToken because the purchase token hasn't been set.
  5. The contract is effectively dead/unusable.

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 admin can start a sale, and the contract checks if any sales are active before allowing the owner to change which token people use to buy. Because there is no way to cancel sales, the owner is stuck and users cannot buy anything.

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 avoloder

View all

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