Per-topic topology
DebateTopicFactoryV3 selects the reserve implementation and creates one EIP-1167 market clone plus six topic-owned components:
- proposition and opposition
SideTokencontracts; - proposition and opposition
ConvictionVaultcontracts; and - proposition and opposition
ReserveRewardDistributorcontracts.
topicById, isTopic, and reserveKindOf. Implementation contracts are templates and must never be treated as live markets.
Reserve implementations
Shared behavior lives inTopicMarketBaseV3; only asset movement differs.
mUSDC supports EIP-2612, although the current UI uses ERC-20 approval.
Reversible curve
Each side token has a hard maximum supply of 21,000,000 and a curve ceiling of 20,790,000 tokens (99% of maximum supply). Buys mint and sells burn; a complete exit returns that side’s supply and curve-reserve contribution to zero. The reserve functionR(p, o, config) combines:
- logarithmic pressure for each side;
- overall topic heat;
- smoothed contrast between side supplies; and
- configurable pacing.
MarketConfig. Custom topics pass validated values. The resolved configuration and hash are immutable.
The Solidity field
depthWei is historical naming. In mUSDC markets it stores six-decimal reserve units, not wei.Fees and rewards
Every trade fee splits into creator, platform, and side-reward shares. The side-reward share moves to the traded side’s distributor and accrues per vault share. If that side has no stakers, its reward share goes to the platform so funds cannot become stranded. Market reserve, creator fees, and platform fees remain liabilities of the topic market. Reward assets are transferred to the distributor.isReserveSolvent() checks that the market balance covers all liabilities it still holds.
Conviction, arguments, and votes
- Staking transfers liquid side tokens into the matching vault.
- Vault shares remain one-for-one with staked token units.
- A factory-wide immutable cooldown controls withdrawal timing.
- Publishing requires stake on that side to meet
minCommentStake. - Voting power equals the staked balance on that side.
- Allocated votes cannot exceed unused voting power.
- Stake supporting active votes cannot be withdrawn.
- Deactivated posts remain available for vote removal so stake cannot become trapped.
