Curriculum·G305 Reading Contracts Fluently·about 34 min

Read who controls it: owner, upgrade, and mint

By the end of this lesson you can

  • Explain that a contract's control powers, owner, upgrade, mint, withdraw, are stated on-chain for any reader
  • Describe how Meerkat Finance's own upgradeable proxy let its deployer move about 31 million dollars of deposits
  • Reason that the right to upgrade, mint, or withdraw is the right to take everything the contract holds
  • Read a contract for who controls it before trusting it with value

Graduate · enrolled learners

This lesson opens with Meerkat Finance, March 2021.

What happened
Meerkat Finance was a yield vault on BNB Chain, and about a day after it launched, roughly 31 million dollars of user deposits were drained. The mechanism was not a subtle exploit: the vault's own contracts were upgradeable through a proxy, and the party controlling that proxy could replace the vault's logic and move user funds wherever they wished. So the power to take everything was written into the contract from the very start, present at deployment and visible on-chain to anyone who read how the proxy and its admin were configured. Whether the drain was an outside compromise of the controlling key or the team itself, the outcome was identical and the capability was the same: a single controller with the right to upgrade held the right to take the deposits. Nothing had to be broken; the control was there to be used, and a reader who looked at who could upgrade the vault would have seen, before depositing, that one party could rewrite the contract and walk away with the funds.
The decision point
A contract's control powers, who owns it, who can upgrade it, who can mint its tokens, who can withdraw its funds, are written into the contract and visible on-chain, so the single most protective thing a person can do before trusting a contract with value is read who controls it, because the right to upgrade, mint, or withdraw is the right to take everything it holds. Meerkat Finance is the case: its vault was upgradeable through a proxy, so whoever controlled that proxy could replace the logic and move user deposits, and about 31 million dollars left a day after launch through a power that was present and readable from the start. This is the opening lesson of reading contracts fluently, and the highest-leverage one: you do not need to understand every line to see the control structure, you need to find the owner, the upgrade admin, and the mint and withdraw permissions, and ask what those roles can do to your money. A contract where one unknown party can upgrade the logic, mint unlimited tokens, or withdraw the pooled funds is a contract that can take everything from you at that party's discretion, whatever its interface promises, and that fact is on-chain to be read. So the discipline is to read for control before trusting: identify who holds the powerful roles, judge whether that control is constrained (a multisig, a timelock, renounced) or absolute and anonymous, and treat a contract whose controller can take the funds as a contract that might, because Meerkat is what a readable, unconstrained control power becomes when the person who held it decided to use it, and the loss fell on everyone who deposited without looking.
Recorded loss
$31,000,000

What you will be able to answer

  • How was Meerkat Finance drained (March 2021)?
  • Where are a contract's control powers recorded?
  • What does the right to upgrade, mint, or withdraw amount to?
  • How to read a contract for control before depositing

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.

Terms used here

Sources and review

Confidence high·Volatility low·Reviewed 2026-09-17·Owner unassigned

Contested

The roughly 31 million dollar figure is the approximate value of user deposits drained; reports vary slightly and some funds were later addressed. The lesson uses the readable-control mechanism, not a precise figure.

Accounts differ on whether Meerkat was an outside compromise of the controlling key or an inside job by the team; the lesson's point holds either way, because the capability, one party able to upgrade the vault and move funds, was the same and was readable on-chain before anyone deposited.