Conditional Token Framework overview
The Conditional Token Framework (CTF) defines how Kuest splits USDC into binary outcome tokens, merges them back into collateral, and finally redeems the winning side once an event is resolved. We run the exact same contracts that power production markets, but every example here targets Polygon Amoy so you can test settlement flows without spending mainnet funds.CTF contracts are ERC-1155 compatible. Every outcome token is deterministically derived from
(collateral, conditionId, indexSet) so builders can re-create balances locally and never lose sync with the on-chain state.Core components
- ConditionalTokens — ERC-1155 implementation that mints/burns outcome positions.
- Position IDs — Keccak hash over the collateral and collection IDs; used anywhere balances need to be tracked or signed.
- Fixed Product Market Maker (FPMM) — Facilitates trading of outcome tokens while keeping the invariant
x * y = kper market pair. - Resolution oracle — Publishes the winning outcome so the ConditionalTokens contract can release collateral.
Lifecycle at a glance
Throughout these docs you will find Amoy-specific examples for splitting, merging, redeeming, and deploying helper contracts so you can run dry runs that closely resemble production.