MarketJSON
func(id string) stringMarketJSON returns one market with its quote history.
- OID
- 0fbca8…5c03:3
MarketJSON details
MarketsJSON
func() stringMarketsJSON returns every market in creation order as one JSON array.
- OID
- 0fbca8…5c03:5
MarketsJSON details
PositionJSON
func(id string, owner .uverse.address) stringPositionJSON returns one open position; an empty one if the owner holds nothing there or has claimed.
- OID
- 0fbca8…5c03:6
PositionJSON details
PositionsJSON
func(owner .uverse.address) stringPositionsJSON returns the owner's open positions in market creation order. Claimed positions are gone; their record is in the Claimed events.
- OID
- 0fbca8…5c03:7
PositionsJSON details
RealmJSON
func() stringRealmJSON returns the roles, settings, limits and totals.
- OID
- 0fbca8…5c03:8
RealmJSON details
historyJSON
func(points []v2.QuotePoint) string- OID
- 0fbca8…5c03:9
historyJSON details
jsonString
func(value string) string- OID
- 0fbca8…5c03:10
jsonString details
scale
int64Value
1000000
maxInt64
int64Value
9223372036854775807
MaxFeePpm
int64Value
70000
MinPricePpm
int64Value
30000
MaxPricePpm
int64Value
970000
DisputeWindow
int64Value
86400
AbandonAfter
int64Value
5184000
minQuoteTTL
int64Value
300
maxQuoteTTL
int64Value
604800
maxMinSpread
int64Value
100000
maxHistory
untyped bigintValue
(96 <untyped> bigint)
StateOpen
untyped stringMarket states. A market moves between open and paused, from either to proposed, and from proposed to final. A cancelled proposal returns it to paused; abandonment takes an open or paused market to final (Void).
Value
"open"
StatePaused
untyped stringMarket states. A market moves between open and paused, from either to proposed, and from proposed to final. A cancelled proposal returns it to paused; abandonment takes an open or paused market to final (Void).
Value
"paused"
StateProposed
untyped stringMarket states. A market moves between open and paused, from either to proposed, and from proposed to final. A cancelled proposal returns it to paused; abandonment takes an open or paused market to final (Void).
Value
"proposed"
StateFinal
untyped stringMarket states. A market moves between open and paused, from either to proposed, and from proposed to final. A cancelled proposal returns it to paused; abandonment takes an open or paused market to final (Void).
Value
"final"
Market
typeAll amounts are integer ugnot. One million micro-shares is one share; a winning micro-share pays one ugnot (one whole share pays one GNOT).
Value
v2.Market
QuotePoint
typeQuotePoint records one published quote, in block-time order.
Value
v2.QuotePoint
Position
typePosition is an open holding. It is deleted when its holder claims, so the storage it used is released; the Claimed event keeps the record.
Value
v2.Position
marketRecord
typeValue
v2.marketRecord
Limits
typeLimits bound new purchases. They never affect claims.
Value
v2.Limits
administrator
.uverse.addressOriginCaller is used only at package initialization, to capture the deployer as the first holder of every role. Entry points use the live caller.
Value
<gnolang.StringValue>
pendingAdministrator
.uverse.addressOriginCaller is used only at package initialization, to capture the deployer as the first holder of every role. Entry points use the live caller.
Value
<zero>
quoter
.uverse.addressOriginCaller is used only at package initialization, to capture the deployer as the first holder of every role. Entry points use the live caller.
Value
<gnolang.StringValue>
pendingQuoter
.uverse.addressOriginCaller is used only at package initialization, to capture the deployer as the first holder of every role. Entry points use the live caller.
Value
<gnolang.StringValue>
guardian
.uverse.addressOriginCaller is used only at package initialization, to capture the deployer as the first holder of every role. Entry points use the live caller.
Value
<gnolang.StringValue>
pendingGuardian
.uverse.addressOriginCaller is used only at package initialization, to capture the deployer as the first holder of every role. Entry points use the live caller.
Value
<zero>
lister
.uverse.addressOriginCaller is used only at package initialization, to capture the deployer as the first holder of every role. Entry points use the live caller.
Value
<gnolang.StringValue>
pendingLister
.uverse.addressOriginCaller is used only at package initialization, to capture the deployer as the first holder of every role. Entry points use the live caller.
Value
<gnolang.StringValue>
listingOracle
.uverse.addressOriginCaller is used only at package initialization, to capture the deployer as the first holder of every role. Entry points use the live caller.
Value
<gnolang.StringValue>
listingTreasury
.uverse.addressOriginCaller is used only at package initialization, to capture the deployer as the first holder of every role. Entry points use the live caller.
Value
<gnolang.StringValue>
listingFeePpm
int64OriginCaller is used only at package initialization, to capture the deployer as the first holder of every role. Entry points use the live caller.
Value
40000
realmPaused
boolOriginCaller is used only at package initialization, to capture the deployer as the first holder of every role. Entry points use the live caller.
Value
false
quoteTTL
int64OriginCaller is used only at package initialization, to capture the deployer as the first holder of every role. Entry points use the live caller.
Value
86400
minSpreadPpm
int64OriginCaller is used only at package initialization, to capture the deployer as the first holder of every role. Entry points use the live caller.
Value
0
maxExposure
int64// micro-shares owed if every open market ends on its larger side
Value
200000000000
openExposure
int64OriginCaller is used only at package initialization, to capture the deployer as the first holder of every role. Entry points use the live caller.
Value
16046870
defaultLimits
v2.LimitsOriginCaller is used only at package initialization, to capture the deployer as the first holder of every role. Entry points use the live caller.
- OID
- 0fbca8…5c03:28
defaultLimits details
records
map[string]*v2.marketRecordOriginCaller is used only at package initialization, to capture the deployer as the first holder of every role. Entry points use the live caller.
- OID
- 0fbca8…5c03:30
records details
marketIDs
[]stringOriginCaller is used only at package initialization, to capture the deployer as the first holder of every role. Entry points use the live caller.
- OID
- 0fbca8…5c03:947
marketIDs details
totalHeldUgnot
int64// every market's escrow plus fees still held
Value
219000000
Administrator
func() .uverse.address- OID
- 0fbca8…5c03:33
Administrator details
Quoter
func() .uverse.address- OID
- 0fbca8…5c03:35
Quoter details
Guardian
func() .uverse.address- OID
- 0fbca8…5c03:36
Guardian details
Lister
func() .uverse.address- OID
- 0fbca8…5c03:37
Lister details
ProposeRole
func(role string, next .uverse.address)ProposeRole starts a two-step handover of "admin", "quoter", "guardian" or "lister". The proposed address accepts from its own direct call, so a mistyped address cannot take a role.
- OID
- 0fbca8…5c03:38
ProposeRole details
AcceptRole
func(role string)AcceptRole completes a handover started by ProposeRole.
- OID
- 0fbca8…5c03:39
AcceptRole details
RevokeRole
func(role string)RevokeRole empties the quoter, guardian or lister role at once, for a lost or stolen key. The administrator role can only be handed over.
- OID
- 0fbca8…5c03:40
RevokeRole details
SetSettings
func(quoteTTLSeconds int64, minimumSpreadPpm int64, maxExposureMicroShares int64)SetSettings changes the quote lifetime, the minimum spread and the realm-wide exposure cap. They apply to new quotes and purchases only.
- OID
- 0fbca8…5c03:41
SetSettings details
SetLimits
func(id string, maxTradeMicroShares int64, maxHolderMicroShares int64, maxSideMicroShares int64)SetLimits changes one market's purchase limits, or with id "" the limits new markets start with.
- OID
- 0fbca8…5c03:42
SetLimits details
SetListingTerms
func(oracle .uverse.address, treasury .uverse.address, feePpm int64)SetListingTerms fixes the oracle, treasury and fee rate every market listed by the lister must carry. A lister key can then only add markets on these terms; it can never choose who settles them or where their surplus goes.
- OID
- 0fbca8…5c03:43
SetListingTerms details
CreateMarket
func(id string, question string, rules string, conditionID string, yesTokenID string, noTokenID string, yesLabel string, noLabel string, tradingEndsAt int64, yesPricePpm int64, noPricePpm int64, feePpm int64, oracle .uverse.address, treasury .uverse.address, topic string)CreateMarket freezes every field used to match an external result, the fee rate, the oracle and the treasury. Nothing but the quote and the limits can change later. The administrator chooses the terms; the lister must use the listing terms.
- OID
- 0fbca8…5c03:44
CreateMarket details
SetQuote
func(id string, yesPricePpm int64, noPricePpm int64, expectedVersion int64)SetQuote publishes both prices while trading is open or paused. The quoter may sign it with a session key. expectedVersion refuses a quote made from a stale view. The same prices again only renew the quote's time, so the keeper can keep an unchanged quote from expiring without a new version.
- OID
- 0fbca8…5c03:45
SetQuote details
Pause
func(id string)Pause stops new purchases in one market, or with id "" in every market. The quoter (also with a session key), the guardian and the administrator can pause; only the administrator resumes. Claims are never paused.
- OID
- 0fbca8…5c03:46
Pause details
Resume
func(id string)Resume reopens one paused market, or with id "" lifts the realm-wide pause.
- OID
- 0fbca8…5c03:47
Resume details
Fund
func(id string)Fund adds reserve capital to one market. It backs that market's sales and returns to the market's treasury only after the market is final.
- OID
- 0fbca8…5c03:48
Fund details
Buy
func(id string, outcome string, microShares int64, expectedPricePpm int64)Buy creates a position after exact payment of cost plus fee, within the limits, and only while the market's escrow covers its larger side. expectedPricePpm is the price of the chosen outcome that the buyer reviewed. A buyer may sign with a session key: the position is always the account's.
- OID
- 0fbca8…5c03:49
Buy details
ProposeOutcome
func(id string, conditionID string, rulesHash string, yesTokenID string, noTokenID string, outcome string, evidenceHash string)ProposeOutcome records the oracle's Yes, No or Void with the market's entire source binding and an evidence hash. Trading stops at once. After the dispute window anyone can make it final; within it the guardian can cancel. A Polymarket 50-50 result is proposed as Void.
- OID
- 0fbca8…5c03:50
ProposeOutcome details
CancelProposal
func(id string)CancelProposal lets the guardian reject a proposed outcome within the dispute window. The market returns to paused; the oracle can propose again.
- OID
- 0fbca8…5c03:51
CancelProposal details
Finalize
func(id string)Finalize makes a proposed outcome final once the dispute window has passed. Anyone can call it.
- OID
- 0fbca8…5c03:52
Finalize details
VoidAbandoned
func(id string)VoidAbandoned voids a market that is still unsettled AbandonAfter trading ended. Anyone can call it; every holder then takes back what they paid.
- OID
- 0fbca8…5c03:53
VoidAbandoned details
settle
func(r *v2.marketRecord, outcome string)- OID
- 0fbca8…5c03:54
settle details
Claim
func(id string) int64Claim settles the caller's position in a final market and deletes it. On Yes or No each winning micro-share pays one ugnot; on Void the holder gets back the cost and the fee they paid. A losing position closes with zero.
- OID
- 0fbca8…5c03:55
Claim details
WithdrawSurplus
func(id string) int64WithdrawSurplus sends what a final market no longer owes anyone to its fixed treasury: the escrow above unclaimed payouts or refunds, and on Yes or No the fees. Anyone can call it; the destination was fixed at listing.
- OID
- 0fbca8…5c03:56
WithdrawSurplus details
Surplus
func(id string) (collateralUgnot int64, feesUgnot int64)Surplus returns what WithdrawSurplus would send now: collateral and fees. It is zero for a market that is not final.
- OID
- 0fbca8…5c03:57
Surplus details
owedCollateral
func(m v2.Market, outcome string) int64owedCollateral is what the escrow must still pay holders for an outcome.
- OID
- 0fbca8…5c03:58
owedCollateral details
owedFees
func(m v2.Market, outcome string) int64owedFees is what the fees must still return to holders: all of them on Void.
- OID
- 0fbca8…5c03:59
owedFees details
GetMarket
func(id string) v2.Market- OID
- 0fbca8…5c03:60
GetMarket details
GetPosition
func(id string, owner .uverse.address) v2.Position- OID
- 0fbca8…5c03:61
GetPosition details
IsPaused
func() bool- OID
- 0fbca8…5c03:62
IsPaused details
QuoteTTL
func() int64- OID
- 0fbca8…5c03:63
QuoteTTL details
Quote
func(id string, outcome string, microShares int64) (costUgnot int64, feeUgnot int64)Quote returns the exact cost and fee for buying microShares of an outcome at the current price. A buyer sends cost + fee.
- OID
- 0fbca8…5c03:64
Quote details
Fee
func(microShares int64, pricePpm int64, feePpm int64) int64Fee is the service fee in ugnot for microShares at pricePpm and rate feePpm: θ × shares × price × (1 − price) GNOT, rounded up to the ugnot. It is computed exactly as ceil(microShares × feePpm × price × (10^6 − price) / 10^18).
- OID
- 0fbca8…5c03:65
Fee details
ListMarkets
func() []v2.Market- OID
- 0fbca8…5c03:66
ListMarkets details
QuoteHistory
func(id string) []v2.QuotePointQuoteHistory returns a detached copy of the published quotes.
- OID
- 0fbca8…5c03:67
QuoteHistory details
BindingHash
func(question string, rules string) stringHash UTF-8 length-framed text, shared exactly with the backend source binding.
- OID
- 0fbca8…5c03:68
BindingHash details
caller
func(int, context .uverse.realm) .uverse.address- OID
- 0fbca8…5c03:69
caller details
assertUser
func(int, context .uverse.realm)- OID
- 0fbca8…5c03:70
assertUser details
assertOwnKey
func(int, context .uverse.realm)assertOwnKey also refuses a session key: listing, settings, roles, resuming and resolution need the account's own signature. Session keys may only quote, pause, buy and claim.
- OID
- 0fbca8…5c03:71
assertOwnKey details
assertNoSend
func()- OID
- 0fbca8…5c03:72
assertNoSend details
singleSend
func() int64- OID
- 0fbca8…5c03:73
singleSend details
assertBankCoverage
func(int, context .uverse.realm, required int64)- OID
- 0fbca8…5c03:74
assertBankCoverage details
mustMarket
func(id string) *v2.marketRecord- OID
- 0fbca8…5c03:75
mustMarket details
checkQuote
func(yesPricePpm int64, noPricePpm int64)checkQuote keeps each side inside the band and the pair at or above one GNOT plus the minimum spread, so buying both sides can never be a sure gain.
- OID
- 0fbca8…5c03:76
checkQuote details
outcomePrice
func(m v2.Market, outcome string) int64- OID
- 0fbca8…5c03:77
outcomePrice details
quoteCost
func(microShares int64, price int64) int64- OID
- 0fbca8…5c03:78
quoteCost details
checkedAdd
func(a int64, b int64) int64- OID
- 0fbca8…5c03:79
checkedAdd details
maximum
func(a int64, b int64) int64- OID
- 0fbca8…5c03:80
maximum details
require
func(ok bool, message string)- OID
- 0fbca8…5c03:81
require details
isHash
func(s string) bool- OID
- 0fbca8…5c03:82
isHash details
isSlug
func(s string) boolisSlug keeps market IDs safe in paths and links: lowercase letters, digits and single hyphens.
- OID
- 0fbca8…5c03:83
isSlug details
isTopic
func(s string) boolisTopic allows an empty topic or up to 24 letters and spaces, such as "Politics".
- OID
- 0fbca8…5c03:84
isTopic details
isLabel
func(s string) boolisLabel allows an outcome name of 1 to 48 bytes of printable UTF-8 without surrounding spaces or markup characters, such as "Yes" or "Los Angeles Dodgers".
- OID
- 0fbca8…5c03:85
isLabel details
isTokenID
func(s string) bool- OID
- 0fbca8…5c03:86
isTokenID details
decimal
func(value int64) string- OID
- 0fbca8…5c03:87
decimal details
appURL
untyped stringappURL is the exchange interface; the realm page links to it for trading.
Value
"https://the67.click"
pagePath
stringpagePath is this realm's gnoweb path, captured at deployment so links between its pages work on any chain and namespace.
Value
"/r/nym-sixseven067/markets/v2"
historyRows
untyped bigintValue
(10 <untyped> bigint)
Render
func(path string) stringRender draws the realm's public page on gnoweb: the market list at the root and one page per market at ":\<id>". It is informational; the app reads JSON.
- OID
- 0fbca8…5c03:89
Render details
renderIndex
func() string- OID
- 0fbca8…5c03:91
renderIndex details
renderMarket
func(r *v2.marketRecord) string- OID
- 0fbca8…5c03:92
renderMarket details
status
func(m v2.Market) string- OID
- 0fbca8…5c03:93
status details
outcomeName
func(m v2.Market, outcome string) stringoutcomeName is the outcome as the market names it: Yes and No are the first and second token, shown by their names fixed at listing.
- OID
- 0fbca8…5c03:94
outcomeName details
priceText
func(value int64) stringpriceText formats millionths like the app: at least two decimals, no trailing zeros beyond them (420000 is "0.42", 425000 is "0.425").
- OID
- 0fbca8…5c03:95
priceText details
dayText
func(unix int64) string- OID
- 0fbca8…5c03:96
dayText details
timeText
func(unix int64) string- OID
- 0fbca8…5c03:97
timeText details
countText
func(n int64, one string, many string) string- OID
- 0fbca8…5c03:98
countText details
escapeText
func(s string) stringescapeText keeps question and rules text literal in Markdown, tables included.
- OID
- 0fbca8…5c03:99
escapeText details
escapeCode
func(s string) stringescapeCode keeps an untrusted path inside one inline code span.
- OID
- 0fbca8…5c03:100