Skip to content
Business logic Write-up Advanced

The Art of the Phantom Deposit: a study on vulnerabilities in crypto exchanges

The report describes a vulnerability where cryptocurrency exchanges may credit deposits based on failed internal transactions that appear as incoming transfers. An attacker can deploy a smart contract that attempts an Ether transfer to an exchange's deposit address but intentionally reverts the internal call, leaving the main transaction successful and potentially tricking the exchange into crediting the account without actual funds.

silviosaturnowk Follow

Published on medium.com

This report analyzes a critical vulnerability in cryptocurrency exchanges arising from the mishandling of internal transaction failures within the blockchain. By reverse-engineering a smart contract used in a known attack, I demonstrate how an attacker can create the illusion of Ether (ETH) deposits without…

Silvio S., on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the exchange's deposit system only checks for the presence of an incoming transaction to a deposit address without verifying that the internal transfer actually succeeded and the funds were received.

Impact

The exchange could credit the attacker's account with Ether that was never received, leading to financial loss if the attacker withdraws assets; the report notes this is an active real-world attack.

What the attacker needed

Attacker can deploy a smart contract; exchange credits based on incoming transaction presence

The fix

Exchanges should verify the transaction status, confirm the wallet balance increase, and analyse internal transaction traces to ensure funds were actually transferred.

How it was found

  1. Deploy the FailingInternalTransfer contract and fund it with Ether.
  2. Call attemptEtherTransfer with the exchange's deposit address and desired amount.
  3. The contract executes a low-level call to internalTransfer, which attempts to send Ether to the exchange.
  4. internalTransfer intentionally reverts after the transfer attempt, causing the internal transaction to fail.
  5. The main transaction completes successfully, and the failed internal transaction appears in the trace.

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 write-up has not been written yet. The Original tab links to the source.

When you send cryptocurrency, the transaction can involve multiple steps called internal transactions. If a step fails but the overall transaction still shows as successful, an exchange might mistakenly think you sent funds when you didn't. This report shows how a malicious contract can create such a fake deposit.

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.

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.