Docs/Getting started/Total Supply markets
Total Supply markets
Resolve a market from an ERC20 token's exact call-time total supply using Below or At least.
Observed supply#
The verified resolver calls totalSupply() on one ERC20 token at the exact moment a market check is executed.
A Total Supply Market asks whether the number of token units reported by an ERC20 contract is below or at least a chosen threshold. It does not estimate circulating supply, exclude treasury balances, or consult an offchain index. Minting, burning, rebasing, migrations, and any token-specific logic that changes totalSupply()can therefore become the market's event.
Condition and units#
| UI language | Contract operator | YES when |
|---|---|---|
| Below | LT / 0 | totalSupply() is strictly below the threshold. Equality is NO. |
| At least | GTE / 3 | totalSupply() is equal to or greater than the threshold. |
The creation interface reads name(), symbol(), decimals(), and the currenttotalSupply(). You enter a human token amount; the interface converts it to the token's smallest units before encoding the initializer. For a six-decimal token, 1,000,000.25 becomes 1000000250000.
Creation and settlement#
Choose token
Select the chain and ERC20 address. Predistate verifies readable token metadata and current supply.
Set condition
Choose Below or At least and enter the threshold in normal token units.
Choose timing
Before deadline can settle YES before the deadline. At deadline settles YES or NO from its first valid deadline-window read.
Create and trade
The same factory, collateral, outcome tokens, order book, fees, resolution, and redemption mechanics apply.
initialize(
address token,
uint256 threshold,
StateComparators.Operator operator // LT (0) or GTE (3)
)Security and interpretation#
- Only strict Below and inclusive At least are accepted by the verified implementation.
- Upgradeable, rebasing, pausable, or non-standard tokens may change behavior; that contract risk is part of the market.
- A successful call reports the token contract's value, which may differ from independently calculated circulating supply.
- A revert or malformed return is handled as a reader failure under the normal Before deadline or At deadline rules.