const TimelockSeconds
TimelockSeconds delays ownership, oracle and fee-recipient changes.
Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.
Package mimir holds the pure helpers Mimir's market realms share: stake history checkpoints (settlement cutoffs) and ...
Package mimir holds the pure helpers Mimir's market realms share: stake history checkpoints (settlement cutoffs) and overflow-safe arithmetic.
TimelockSeconds delays ownership, oracle and fee-recipient changes.
Add returns a+b, panicking on overflow, so a sum of stakes can never wrap.
Escape makes user text safe to place in gnoweb markdown: it cannot open links, images, HTML or headings.
FormatUSD renders 6-decimal units as a dollar amount with two decimals, rounded down.
MulDiv returns floor(a*b/d) without overflowing the 128-bit product. It panics on negative inputs, a zero divisor or a result above int64.
Quote returns s as a JSON string literal.
NewRoles validates the initial roles as the EVM constructors did.
Amounts are cumulative net deposits on each side, and the copied part of each.
History is an append-only list of checkpoints in time order. Deposits in the same second coalesce into one checkpoint. Settlement never scans all deposits.
1type Roles struct {
2 Owner address
3 Arbiter address
4 AuditAgent address
5 Oracle address
6 FeeRecipient address
7 PendingOwner address
8 PendingOwnerEta int64
9 PendingOracle address
10 PendingOracleEta int64
11 PendingFeeRecipient address
12 PendingFeeEta int64
13 Paused bool
14 MaxAccountStake int64
15 MaxMarketStake int64
16}Roles holds a market realm's roles, pause flag and guarded-launch caps, and enforces the same rules the EVM contracts do:
Every method takes the caller and the block time from the realm, which owns the Roles value.
CheckCaps panics when an account's stake or a market's total is over its cap.
RevokeOracle is the emergency stop: the oracle loses its power at once.
SetAuditAgent appoints the reviewer that may dispute with a bond; "" disables it.
SetCaps sets guarded launch caps in mUSD units (0 = none). They only gate new positions.