Curriculum·G305 Reading Contracts Fluently·about 34 min
Read the transfer and burn functions for hidden behavior
By the end of this lesson you can
- →Explain that a token's transfer, burn, fee, and blacklist functions can do far more than move balances
- →Describe how a public burn function that could burn from the liquidity pool let value be extracted from SafeMoon
- →Reason that honeypots and traps live in a token's transfer-path functions, readable before trusting it
- →Read a token's transfer and burn logic for hidden behavior that harms holders or traders
Graduate · enrolled learners
This lesson opens with SafeMoon, March 2023.
- What happened
- A SafeMoon contract upgrade left a public burn function that let anyone burn tokens from the liquidity pool's address, not just from their own balance. Burning tokens out of the pool shrank the token side of the pool while the paired value stayed, which artificially inflated the token's price, and an attacker used that to buy and then extract about 8.9 million dollars of value from the pool, much of which was later negotiated back. The harmful capability was not hidden in obscure math; it was a function in the token's own transfer-and-burn logic that could act on an address other than the caller's, readable by anyone who looked at what the burn function actually did and whose balance it could reduce. The token did far more than move balances between holders: one of its functions could reach into the pool and destroy its tokens, and that behavior, sitting in plain sight in the contract, was the whole exploit.
- The decision point
- A token contract is not just a ledger that moves balances; its transfer, burn, fee, and blacklist functions can do far more, take a cut of every transfer, burn tokens from arbitrary addresses, freeze chosen wallets, or mint new supply, and these behaviors are written in the token's own code for a reader to find, so reading them is how you see a trap before it springs. SafeMoon is the case: an upgrade left a public burn function that could burn tokens from the liquidity pool, and burning the pool's tokens inflated the price and let an attacker extract about 8.9 million dollars, all through a capability that was readable in the transfer-and-burn logic. This is the second reading skill of the course, and it targets where token traps live: not in the parts that look scary but in the everyday-sounding functions, transfer, burn, fee logic, that a casual user never inspects. A token whose transfer function skims a fee, whose burn can destroy someone else's balance, whose code can blacklist a wallet from selling (a honeypot), or whose owner can mint at will, can harm holders and traders in ways the token's name and interface never suggest, and the only way to know is to read what those functions do and to whom. So the discipline is to read a token's transfer-path functions specifically, asking what each does beyond moving the caller's own balance, whose balance it can affect, what it takes, and who can trigger it, because a token is a program and its dangerous behavior is a readable part of that program, and SafeMoon is what a public function reaching into the pool becomes when a trader trusts the token without reading the function that could reach into the pool.
- Recorded loss
- $8,900,000
What you will be able to answer
- →What did the flawed SafeMoon burn function allow (March 2023)?
- →What can a token's transfer/burn/fee/blacklist functions do?
- →Where do token honeypots and traps live?
- →How to read a token for hidden behavior
Orientation and Year One are open: anyone can read them without an account. From Year Two onward the lessons are for enrolled learners, because progress through the later years only means anything if it is tracked against a record.
It is free. We do not sell the list and there is nothing to buy at the end of it.
Sources and review
Confidence high·Volatility low·Reviewed 2026-09-17·Owner unassigned
Contested
The roughly 8.9 million dollar figure is the approximate value extracted through the burn-and-buy sequence; much of it was later negotiated back, so the net loss was smaller. The lesson uses the readable-transfer-path mechanism, not a precise net figure.
The SafeMoon contract and its history are complex and were the subject of separate legal proceedings; this lesson uses only the readable public-burn behavior, which is the transferable point, not the broader disputes around the project.
