Skip to content
Business logic Audit finding Intermediate

Malicious users can honeypot other users by transferring out ERC20 and ERC721 tokens right before sale

The escrow contract allows the club owner to transfer out ERC20 and ERC721 tokens at any time, even after a sale is initiated. A malicious seller can watch the mempool and remove valuable tokens just before the buyer's transaction completes, leaving the buyer with an empty club.

0x52 Follow with 0xAsen, 0xRobocop and 8 others

Originally disclosed on Sherlock

Source: https://github.com/sherlock-audit/2023-04-footium-judging/issues/291

Found by

0x52, 0xAsen, 0xRobocop, BAHOZ, Dug, J4de, ast3ros, igingu, kiki_dev, sashik_eth, shogoki

Summary

Since the club and escrow are separate and tokens can be transferred at any time by the owner, it allows malicious users to honeypot victims.

Vulnerability Detail

Tokens can be transferred out of the escrow by the owner of the club at anytime. This includes right before (or even in the same block) that the club is sold. This allows users to easily honeypot victims when selling clubs:

  1. User A owns Club 1
  2. Club 1 has players worth 5 ETH
  3. User A lists Club 1 for 2.5 ETH
  4. User B buys Club 1
  5. User A sees the transaction in the mempool and quickly transfers all the players out
  6. User A maintains all their players and User B now has an empty club

Impact

Malicious users can honeypot other users

Code Snippet

https://github.com/sherlock-audit/2023-04-footium/blob/main/footium-eth-shareable/contracts/FootiumEscrow.sol#L105-L111

https://github.com/sherlock-audit/2023-04-footium/blob/main/footium-eth-shareable/contracts/FootiumEscrow.sol#L120-L126

Tool used

Manual Review

Recommendation

Club/escrow system needs a redesign

The original report as published on Sherlock, by 0x52. Images and videos are our own copies; raw HTML is shown as text. View it on Sherlock.

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 escrow contract does not lock or restrict token transfers once a sale is pending, allowing the owner to move assets at any time.

Impact

A buyer could receive an empty club after paying for it, losing the expected value of the tokens.

What the attacker needed

Seller owns a club with valuable tokens; seller lists the club for sale; buyer purchases the club; seller monitors mempool and acts quickly

The fix

The club/escrow system should be redesigned to prevent token transfers once a sale is pending, for example by locking the escrow during the sale.

How it was found

  1. User A owns Club 1 with players worth 5 ETH.
  2. User A lists Club 1 for 2.5 ETH.
  3. User B buys Club 1.
  4. User A sees the transaction in the mempool and quickly transfers all the players out.
  5. User A keeps the players and User B gets an empty club.

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.

When you buy something online, you expect to get what you paid for. Here, the seller could take back the valuable items (players) just before the sale finished, so the buyer paid for an empty club. This is called a honeypot because the sale looks attractive but is a trap.

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 0x52

View all

211 more disclosed reports, best first.

More from Footium

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.