Skip to content
Business logic Write-up Intermediate

Escaping the Dark Forest

A smart contract allowed anyone to mint tokens for free and then burn them to withdraw all Ether held in the contract. An attacker could have stolen over 25,000 Ether, worth about $9.6 million at the time.

samczsun.com

Published on samczsun.com

I was about to wrap up for the night when I decided to take another look at some smart contracts.

The author, on samczsun.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 contract's burn function allowed anyone to burn tokens they had minted for free and receive Ether in return, without proper checks.

Impact

An attacker could have stolen all ~25,000 Ether (about $9.6 million) from the contract, but the researchers rescued the funds by working with the Lien team and a mining pool to execute a private transaction.

What the attacker needed

Access to the vulnerable contract; ability to send transactions

The fix

The text does not state how the vulnerability was fixed, but the funds were withdrawn by the Lien team after the rescue.

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.

This is about a bug in a smart contract, which is code that runs on a blockchain and can hold money. The bug let anyone create tokens out of thin air and then trade them back for the real money stored in the contract. The researchers had to act fast because other attackers watch for such bugs and could steal the money first.

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.