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.
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:
- User A owns Club 1
- Club 1 has players worth 5 ETH
- User A lists Club 1 for 2.5 ETH
- User B buys Club 1
- User A sees the transaction in the mempool and quickly transfers all the players out
- User A maintains all their players and User B now has an empty club
Impact
Malicious users can honeypot other users
Code Snippet
Tool used
Manual Review
Recommendation
Club/escrow system needs a redesign
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
- User A owns Club 1 with players worth 5 ETH.
- User A lists Club 1 for 2.5 ETH.
- User B buys Club 1.
- User A sees the transaction in the mempool and quickly transfers all the players out.
- 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.