Skip to content Search Apps Documentation Source Content Run Reset Eval Playground File Folder Download Copy Actions State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.

pool package

Overview

Package pool is Mimir's two-sided pool prediction market, settled by an AI oracle: the gno.land port of contracts/MimirPoolErc20.sol. Stakes are mUSD (gno.land/r/.../musd, 6 decimals).

Model

  • A market has two sides, A and B (YES / NO). The creator opens it with a stake on one side. Anyone, the creator included, can then stake on either side until LockSeconds before the deadline. Stakes by the same address add up per side.
  • After the deadline the oracle proposes A, B, DRAW or UNRESOLVABLE. A participant can dispute within the dispute window by posting DisputeBond; the arbiter then rules. The bond comes back if the ruling changes the verdict and goes to the platform otherwise. An undisputed proposal is finalized by anyone.
  • Escape hatch: ResolutionGraceSeconds after the deadline (or after the proposal or dispute), anyone can refund the market in full. From that moment the oracle and the arbiter can no longer rule.
  • Fees: every stake pays an entry fee, fees.EntryBps(caller) of the amount (0.5% by default, less with a signed ticket); the rest is staked. The entry fee is kept on refunds. Winnings pay no fee, except copy trades: a stake made with a referrer pays ReferrerFeeBps of its net profit to the referrer and CopyFeeBps to the platform.
  • Payout: a winner gets their stake back plus a pro-rata share of the losing side, rounded down (dust stays in the realm). If either side is empty, or on DRAW / UNRESOLVABLE, everyone gets their stake back.
  • Settlement only records the outcome. Each staker is then paid by Claim(id), or by anyone through ClaimFor(id, user).
  • Roles: owner, arbiter (rules disputes), oracle (may never also be owner, arbiter or fee recipient), fee recipient, and an optional audit agent that may dispute. Ownership, oracle and fee-recipient changes are timelocked; the owner can revoke the oracle at once, veto a proposal to the arbiter, cap stakes, set an early lock and pause.
  • Pause stops new markets and stakes AND settlement and winners' payouts; refunds are still paid, and RefundExpired while paused refunds instead of honouring a proposal.

Differences from the EVM contract, all from the transport:

  • Amounts are mUSD units in int64; MinStake, DisputeBond and caps are in those units. The caller approves this realm on mUSD first; Adena sends the approve and the call in one transaction, so there are no *WithPermit variants.
  • mUSD has no blacklist and no callbacks, so a payout cannot be refused and cannot re-enter: payouts are sent directly (no parked withdrawals, no gas stipend, no reentrancy lock).
  • Times are block-time unix seconds.

Function

ExecuteOracle

func ExecuteOracle(cur realm)
Ask AI Claude ChatGPT

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/g12dcsmwccgdxasqde2eumua88tlrkw83kqf6tcz/pool" -func "ExecuteOracle" -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "onyx-1" -remote "https://rpc.onyx.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.onyx.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/g12dcsmwccgdxasqde2eumua88tlrkw83kqf6tcz/pool" -func "ExecuteOracle" -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "onyx-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.onyx.testnets.gno.land" call.tx
  

Gno Expression Evaluator

Evaluate any read-only Gno expression against gno.land/r/g12dcsmwccgdxasqde2eumua88tlrkw83kqf6tcz/pool, for example a function call with arguments.