Skip to content
Business logic Audit finding Beginner

ArcoTokenPurchase::PurchaseMade Event Mislabels Payment Amount as “pricePaid” Instead Of Unit Price

The PurchaseMade event in ArcTokenPurchase names a field pricePaid, which suggests a per-token unit price, but the contract emits the total payment amount in that field. Integrators and analytics tools that consume the event could misinterpret the value and display or record incorrect token prices.

Paludo0x Follow

Originally disclosed on Immunefi

Informational View original
  • Disclosed after under an hour

50887 sc insight arcotokenpurchase purchasemade event mislabels payment amount as pricepaid instead of unit price

Submitted on Jul 29th 2025 at 11:15:52 UTC by @Paludo0x for Attackathon | Plume Network

Summary

The PurchaseMade event in ArcTokenPurchase is defined with a field named pricePaid, which by its name suggests a per-token (unit) price. In the implementation, however, the contract emits the total payment amount as pricePaid. This naming/value mismatch can mislead integrators, analytics tools, and UIs that consume the event and expect a unit price.

{% hint style="info" %} This is an informational/insight issue: it does not cause direct loss of funds, but can cause incorrect reporting or UI display of token prices. {% endhint %}

Vulnerability Details

The PurchaseMade event signature:

  • buyer
  • tokenContract
  • amount — base units of ArcToken bought
  • pricePaid — misleadingly named (implies unit price)

In the buy() implementation the event is emitted as:

  • arcTokensBaseUnitsToBuy → correctly used for amount (number of base units bought)
  • _purchaseAmount → passed into pricePaid, but _purchaseAmount is the total spent (not a per-token price)

This mismatch means consumers may interpret pricePaid as the per-token price when it actually contains total payment.

Impact Details

  • Severity: Low (no direct loss of funds).
  • Impact: Misinterpretation of on-chain sales data — faulty price history, misleading UI or analytics.
  • Affects: Any integration or analytics system that consumes the PurchaseMade event and expects pricePaid to be a unit price.

{% hint style="warning" %} Integrations relying on this event to display unit price may show incorrect prices (e.g., dividing/not dividing by token amount incorrectly). This can mislead users or analytics, but not cause funds loss. {% endhint %}

Proof of Concept

<details> <summary>Relevant faulty code snippet (click to expand)</summary>

{% code title="ArcTokenPurchase.sol (snippet)" %}

Solidity
// Event signature
event PurchaseMade(
    address indexed buyer,
    address indexed tokenContract,
    uint256 amount,      // base units of ArcToken bought
    uint256 pricePaid    // misleadingly named
);

// Emission in buy()
emit PurchaseMade(
    msg.sender,
    _tokenContract,
    arcTokensBaseUnitsToBuy,  // correct: number of base units
    _purchaseAmount           // incorrect: total spent, not unit price
);

{% endcode %}

</details>

Recommendations

  • Rename the event field to reflect its true meaning (e.g., totalPaid, amountPaid, or paymentAmount), or
  • Emit both values: the unit price and the total paid (ensure correct units and precision), or
  • Add documentation/comments clarifying that pricePaid is the total payment and not the per-token price.

Choose one of the above approaches to avoid ambiguity for downstream consumers.

References

The original report as published on Immunefi, by Paludo0x. 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 event field was named pricePaid while the code passes the total purchase amount, creating a mismatch between the field name and its value.

Impact

Integrations relying on the event may display or record incorrect token prices, misleading users or analytics, but the issue does not cause loss of funds.

What the attacker needed

None

The fix

The event field should be renamed to reflect the total payment, or both unit price and total paid should be emitted, or documentation should clarify the meaning.

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 announce things that happen by emitting an 'event', which other programs read to update dashboards or price histories. Here the event has a field called pricePaid, which sounds like the price of one token, but the contract actually puts the total amount spent there. Anyone reading that field as a unit price would show the wrong price, though no money is lost.

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 Paludo0x

View all

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