Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.signalium.site/llms.txt

Use this file to discover all available pages before exploring further.

TL;DR

  • Bettors get 80% of the yield earned on their stakes during the market’s life. Protocol gets 20% plus the 1% bet fee.
  • The split is snapshotted once at resolve/void. Late inflows from delayed Gimo claims accrue 100% to the protocol — early and late claimers get identical per-share payouts.
  • A reserve floor (default 50%) keeps half the treasury liquid so claims never wait on Gimo’s 3-day unbonding window.

The full flow

bet (msg.value)                                     resolve()
  │  fee = 1%                                          │
  │  ▼                                                 ▼
  │  collectedFees                                     pull liquid from treasury
  │                                                    snapshot yieldEarned = balance − (fees + notional)
  ▼                                                    bettorsYieldShare = 80% of yieldEarned
forward stake to Treasury                              protocolYieldShare = 20%
  │                                                    │
  │  operator.deployIdle(adapter, X)                   ▼
  ▼                                                    claim()
GimoAdapter.deposit{value: X}                          payout = winningStake / winningPool
  │                                                            × (notional + bettorsYieldShare)

Gimo.stake(referrer)         time → rate appreciates
                                                       withdrawHouse()
                                                         sweep fees + 20% yield + late inflows
                                                         to factory.feeRecipient

What “yield” means here

yieldEarned = balance − (collectedFees + yesPool + noPool)
At resolve time the market has already pulled all liquid funds back from the Treasury. The notional pool (yesPool + noPool) is what bettors collectively put in after fees. Anything above that is yield earned by Gimo’s st0G rate appreciation while the funds were staked. If balance ≤ expected, yieldEarned = 0 (the rate didn’t move, or the operator never deployed anything). The split is just 0 / 0.

Why a one-shot snapshot

Gimo unstakes have a ~3 day unbonding window. If a market resolves before all funds have made it back to the Treasury, the operator (or anyone, via pullFromTreasury()) can pull late liquidity in. Without the snapshot, that late liquidity would shift the per-share payout — early claimers would get less than late ones. Instead:
  1. resolve() recalls whatever’s liquid right now and locks bettorsYieldShare.
  2. Subsequent pullFromTreasury() calls bring in more native, but the bettors’ commitment is already fixed.
  3. The extra native lands in the protocol’s house bucket and is sweepable via withdrawHouse().

The reserve floor

The Treasury enforces idleAfter ≥ totalAssets × reserveBps / BPS on every deployIdle call. Default reserveBps = 5000 (50%). With this floor, half the float is always immediately recallable, so a winning side that needs the full pool can be paid even if the rest is mid-unbond in Gimo. The floor is owner-settable; the protocol can dial it down once a per-market keeper exists to pre-unstake before resolution.

Walked example

Two bettors place 1 ether each (one YES, one NO). 1% fee leaves 0.99 each in the pool, totalling 1.98 ether notional. The operator deploys 0.8 ether to Gimo at rate 1.0. After three days, Gimo’s rate is 1.1 (10% appreciation), so the adapter’s totalAssets() reports 0.88 ether. Operator unstakes, waits the unbonding window, claims back into the Treasury. At resolve, balance = 0.02 fees + 1.98 notional + 0.08 yield = 2.08. With PROTOCOL_YIELD_BPS = 2000:
  • yieldEarned = 0.08
  • bettorsYieldShare = 0.064
  • protocolYieldShare = 0.016
If YES wins, the sole YES bettor (Alice) claims:
payout = (0.99 / 0.99) × (1.98 + 0.064) = 2.044 ether
withdrawHouse() then sweeps 0.02 fees + 0.016 protocol yield = 0.036 ether to the factory’s fee recipient. This exact scenario is covered by test_full_flow_winner_claims_with_yield_split in the contracts test suite.