const StOpen, StActive, StResolved, StCancelled, StProposed, StDisputed
Claim states.
Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.
Package vs is Mimir's VS (duel) market, settled by an AI oracle: the gno.land port of contracts/MimirV3Erc20.sol. Sta...
Package vs is Mimir's VS (duel) market, settled by an AI oracle: the gno.land port of contracts/MimirV3Erc20.sol. Stakes are mUSD.
A creator opens a claim with a stake on their position. Challengers take the other side, each once, up to the claim's maxChallengers (at most 100):
After the deadline the oracle proposes CREATOR, CHALLENGERS, DRAW or UNRESOLVABLE with a confidence and the hash of its evidence. A participant may dispute within the dispute window by posting DisputeBond; the arbiter rules. An undisputed proposal is finalized by anyone. Settlement pays every participant in the same transaction. Draws, unresolvable questions and claims nobody challenged before the cutoff refund every stake.
Fees: an entry fee on every stake that opens or joins a claim (fees.EntryBps, 0.5% by default), kept on refunds. No fee on winnings, except copy trades: ReferrerFeeBps of the profit to the referrer and CopyFeeBps to the platform.
Private claims: only wallets the creator invites may challenge. Market data and transactions stay public.
Differences from the EVM contract come from the transport, as in the pool realm: mUSD with an approve in the same transaction (no permit variants), payouts sent directly (mUSD cannot refuse or re-enter), block-time seconds. SetInvited takes a comma-separated address list.
Claim states.
Winner sides.
1const (
2 MaxChallengers = 100
3 MaxPoolMultiple = int64(5)
4 // MinStake is the smallest gross stake that opens or joins a claim: 0.1 mUSD.
5 MinStake = int64(100_000)
6 DisputeBond = int64(2_000_000)
7 DefaultPayoutBps = int64(20_000) // 2x
8 // Fixed odds pay at most 10x.
9 MaxPayoutBps = int64(100_000)
10 MaxDeadlineAhead = int64(365 * 24 * 60 * 60)
11 MaxEntryBps = int64(100)
12 // Anti-sniping: no new challenges in the final seconds before the deadline.
13 ChallengeLockSeconds = int64(60)
14 ReferrerFeeBps = int64(100)
15 CopyFeeBps = int64(100)
16 ResolutionGraceSeconds = int64(7 * 24 * 60 * 60)
17 MinLiveDisputeWindow = int64(24 * 60 * 60)
18 TestnetDisputeWindow = int64(10 * 60)
19)CancelClaim refunds the creator of a claim nobody has challenged yet.
ChallengeClaim takes the counter position with `stakeAmount` mUSD (less the entry fee).
ChallengersJSON lists a claim's challengers in the order they joined.
ClaimFees pays the caller's accrued fees (entry fees, copy fees, forfeited bonds).
ClaimsJSON lists claims newest first: `offset` skips that many from the newest.
1func CreateClaim(cur realm,
2 question, creatorPosition, counterPosition, resolutionURL string,
3 deadline, stakeAmount int64,
4 category string, parentID int64,
5 marketType, oddsMode string, challengerPayoutBps int64,
6 handicapLine, settlementRule string, maxChallengers int,
7 isPrivate bool, referrer string) int64CreateClaim opens a claim with `stakeAmount` mUSD (less the entry fee) on the creator's position. oddsMode is "pool" or "fixed"; challengerPayoutBps applies to fixed odds (below 10000 means the 2x default). maxChallengers 0 means the maximum. referrer is the copied basket's creator, or "".
CreateRematch opens a new claim inheriting its terms from a parent. The caller is the creator and pays the stake. The parent's referrer carries over only to the parent's own creator.
DisputeResolution escalates a proposed verdict to the arbiter by posting DisputeBond. The bond comes back if the arbiter changes the verdict and is forfeited otherwise. Open to the creator, challengers, the audit agent and the arbiter.
EligibleTotals are the creator's and the challengers' stakes that compete under the settlement cutoff.
FeeStats: accrued, claimed and outstanding fees. Outstanding is always covered by the realm's balance.
FinalizeResolution settles an undisputed proposal once its window has closed. Anyone may call it.
PlatformStats: claims opened, claims resolved.
RefundExpired is the escape hatch, open to anyone once the grace has passed:
ResolveClaimWithCutoff is the oracle's verdict on an active claim. With a dispute window it is a proposal; only stakes made strictly before `cutoff` (0 = all) compete, later ones are refunded.
ResolveDisputeWithCutoff is the arbiter's final word on a disputed claim.
SetAuditAgent appoints the reviewer that may dispute with a bond; "" disables it.
SetInvited grants or revokes wallets on a private claim, up to MaxChallengers per call, as a comma-separated list. Revocation only blocks future entry. Rematches have their own empty list.
SetLockAt closes a claim to new challengers early, by its creator or the owner. Only ever earlier.
VetoProposal sends a proposal the owner believes wrong to the arbiter, inside the window. No bond; if the arbiter never rules, RefundExpired refunds.
1type Claim struct {
2 ID int64
3 Creator address
4 Question string
5 CreatorPosition string
6 CounterPosition string
7 ResolutionURL string
8 CreatorStake int64
9 TotalChallengerStake int64
10 ReservedCreatorLiability int64
11 Deadline int64
12 State int
13 WinnerSide int
14 ResolutionSummary string
15 Confidence int
16 Category string
17 ParentID int64
18 CreatedAt int64
19 MarketType string // binary | moneyline | spread | total | prop | custom
20 OddsMode string // pool | fixed
21 ChallengerPayoutBps int64 // fixed odds, e.g. 20000 = 2x
22 HandicapLine string
23 SettlementRule string
24 MaxChallengers int
25 IsPrivate bool
26 EvidenceHash string
27 Referrer address // the creator's referrer
28 EntryFees int64
29 SettlementCutoff int64
30 LockAt int64
31 Proposal Proposal
32
33 challengers []*Challenger
34 joined avl.Tree // address -> true
35 invited avl.Tree // address -> bool
36}