Denom
untyped stringDenom is the only asset this realm accepts.
Value
"ugnot"
MaxFeeBps
int64MaxFeeBps is the hard protocol-fee cap: 1000 bps = 10%. The fee applies only to the portion AWARDED to the holder, never to a refund.
Value
1000
DepositOpen
untyped string// created; the depositor has not funded
Value
"open"
DepositFunded
untyped string// funded; the term is running or the claim window is open
Value
"funded"
DepositClaimed
untyped string// the holder filed a claim; the depositor may accept or dispute
Value
"claimed"
DepositDisputed
untyped string// the depositor disputed; the arbiter decides
Value
"disputed"
DepositSettled
untyped string// split credited; both parties pull
Value
"settled"
DepositCancelled
untyped string// never funded; nothing moved
Value
"cancelled"
MinDeposit
int64Input bounds.
Value
10000
MaxDeposit
int64// 1,000,000 GNOT
Value
1000000000000
MinClaim
int64Input bounds.
Value
1000
MinTerm
int64Input bounds.
Value
10
MaxTerm
int64Input bounds.
Value
7500000
MinWindow
int64Input bounds.
Value
10
MaxWindow
int64Input bounds.
Value
7500000
FundWindow
int64Input bounds.
Value
1000000
MaxMemoLen
untyped bigintInput bounds.
Value
(200 <untyped> bigint)
MaxReasonLen
untyped bigintInput bounds.
Value
(200 <untyped> bigint)
MaxAgreementsPerHolder
untyped bigintInput bounds.
Value
(50 <untyped> bigint)
RenderLimit
untyped bigintInput bounds.
Value
(20 <untyped> bigint)
agreement
typeValue
deposits.agreement
admin
.uverse.addressValue
<gnolang.StringValue>
pendingAdmin
.uverse.addressValue
<zero>
feeRecipient
.uverse.addressValue
<gnolang.StringValue>
feeBps
int64// snapshotted into NEW agreements
Value
250
self
.uverse.addressValue
<gnolang.StringValue>
nextID
int64Value
1
locked
int64// Σ amounts of funded/claimed agreements (destination not yet decided by a party)
Value
0
contested
int64// Σ amounts of DISPUTED agreements (an arbiter is deciding)
Value
0
agreements
*v0.Tree// padID(id) -> \*agreement
- OID
- 0acb4c…4f9f:12
agreements details
holderNum
*v0.Tree// holder.String() -> \*int64, stored agreements
- OID
- 0acb4c…4f9f:15
holderNum details
ledger
*feeledger.Ledger- OID
- 0acb4c…4f9f:18
ledger details
init.32
func()- OID
- 0acb4c…4f9f:22
init.32 details
OpenAgreement
func(depositor .uverse.address, amount int64, forfeitCeiling int64, termBlocks int64, claimWindow int64, disputeWindow int64, arbiter .uverse.address, memo string) int64OpenAgreement offers a deposit agreement. The caller becomes the holder and names the \`depositor\`, the exact \`amount\` they must attach, the \`termBlocks\` the deposit is held for, the \`claimWindow\` the holder has to file a claim after the term ends, the \`disputeWindow\` the depositor has to dispute one (and the arbiter then has to rule), and the \`forfeitCeiling\` — the most the holder may ever claim, in \[MinClaim, amount]. \`arbiter\` may be the zero address, in which case a claim cannot be disputed; it may not be either party. Nothing is held until the depositor Funds, which is how they consent to all of it. The current protocol fee is snapshotted in. Returns the id.
- OID
- 0acb4c…4f9f:24
OpenAgreement details
FileClaim
func(id int64, amount int64, reason string)FileClaim claims \`amount\` of the deposit against the ceiling. Holder only, only once, only after the term has ended and before the claim window closes. \`amount\` must be in \[MinClaim, forfeitCeiling]. The depositor may then accept it, dispute it to the arbiter, or let it stand.
- OID
- 0acb4c…4f9f:25
FileClaim details
Release
func(id int64)Release returns the whole deposit to the depositor early. Holder only, while the agreement is funded and unclaimed. It is the holder waiving the claim they have not yet filed — the one route to settlement that needs no clock.
- OID
- 0acb4c…4f9f:26
Release details
Fund
func(id int64)Fund attaches the exact deposit and starts the term. The named depositor only; the attached amount must equal the agreement's amount exactly, and the fund deadline must not have passed. Funding IS the depositor's consent to the ceiling, the windows and the arbiter, all of which were readable beforehand.
- OID
- 0acb4c…4f9f:27
Fund details
AcceptClaim
func(id int64)AcceptClaim settles at the claimed amount. Depositor only, while a claim stands. Accepting early is allowed — the dispute window is a deadline for disputing, not a waiting period.
- OID
- 0acb4c…4f9f:28
AcceptClaim details
Dispute
func(id int64, reason string)Dispute sends a standing claim to the arbiter. Depositor only, before the dispute deadline, and only if an arbiter was named — with no arbiter there is nobody to decide, and the depositor saw that before funding. The deposit moves from \`locked\` into \`contested\`; no coins move.
- OID
- 0acb4c…4f9f:29
Dispute details
ResolveDispute
func(id int64, awardToHolder int64)ResolveDispute rules on a disputed claim. Arbiter only. \`awardToHolder\` is in \[0, the claimed amount] — the arbiter may reduce a claim or deny it outright but never award more than was claimed, which is itself capped by the ceiling the depositor consented to. No deadline is enforced here: a late ruling is better than a stranded deposit, and \`LapseDispute\` is the race that bounds it.
- OID
- 0acb4c…4f9f:30
ResolveDispute details
ReleaseUnclaimed
func(id int64)ReleaseUnclaimed refunds the whole deposit because the holder never filed a claim before the window closed. Anyone may call it.
- OID
- 0acb4c…4f9f:31
ReleaseUnclaimed details
SettleUndisputed
func(id int64)SettleUndisputed settles at the claimed amount because the depositor neither accepted nor disputed before the dispute window closed. Anyone may call it.
- OID
- 0acb4c…4f9f:32
SettleUndisputed details
LapseDispute
func(id int64)LapseDispute refunds the whole deposit because the arbiter did not rule before their deadline. Anyone may call it. The award is 0, not the claim: an unsubstantiated claim fails. The holder chose the arbiter and bears the cost of that choice failing — which is also why a disappeared arbiter can never strand a deposit.
- OID
- 0acb4c…4f9f:33
LapseDispute details
CancelUnfunded
func(id int64)CancelUnfunded abandons an agreement the depositor never funded. Either party may cancel at any time — refusing to fund is the depositor's right and withdrawing the offer is the holder's — and ANYONE may cancel once the fund deadline has passed, so a dead offer cannot hold a slot forever. No coins have ever been held, so nothing moves.
- OID
- 0acb4c…4f9f:34
CancelUnfunded details
Claim
func(amount int64)Claim sends amount ugnot of the caller's claimable balance — refunds and awards from settled agreements — to the caller.
- OID
- 0acb4c…4f9f:35
Claim details
ClaimAll
func()ClaimAll sends the caller's entire claimable balance to the caller.
- OID
- 0acb4c…4f9f:36
ClaimAll details
SetFeeBps
func(bps int64)- OID
- 0acb4c…4f9f:37
SetFeeBps details
SetFeeRecipient
func(recipient .uverse.address)SetFeeRecipient names the address that may withdraw the accrued fee pot. It deliberately does NOT enforce disjointness from agreement parties, in contrast to OpenAgreement, which refuses an arbiter equal to either party. The two rules are not comparable, and the asymmetry is the point: - The arbiter rule is per-agreement and checked at the moment the agreement is created, so it is an invariant of that agreement for life. - The fee recipient is one global over an unbounded, growing set of agreements. A check here could only test a snapshot, and the very next OpenAgreement could name the sitting recipient as holder or depositor. A guard that any later transaction can walk through is worse than no guard: it reads as an invariant and is not one. Nothing is at stake in the overlap, which is why the honest answer is a documented omission rather than a decorative check. The fee is derived only from the holder's award inside ledger.MustDeposit, never from the refund, so a recipient who is also a holder collects the same coins by two routes instead of more coins. Solvency is unaffected in either direction: feeledger accounts user credit and the fee pot as separate buckets, both are inside ledger.Liabilities(), and SweepDenom's reserve is locked + contested + ledger.Liabilities() — so an overlapping recipient cannot make the swept surplus overstate what the realm is free to release.
- OID
- 0acb4c…4f9f:38
SetFeeRecipient details
WithdrawFees
func()- OID
- 0acb4c…4f9f:39
WithdrawFees details
SweepDenom
func(denom string)SweepDenom recovers out-of-band coins to the fee recipient. For the ledger denom the reserve is locked + contested + Liabilities() — held deposits, contested deposits, claimable refunds, awards and the fee pot are all structurally unreachable.
- OID
- 0acb4c…4f9f:40
SweepDenom details
TransferAdmin
func(successor .uverse.address)- OID
- 0acb4c…4f9f:41
TransferAdmin details
AcceptAdmin
func()- OID
- 0acb4c…4f9f:42
AcceptAdmin details
AgreementInfo
func(id int64) (holder .uverse.address, depositor .uverse.address, arbiter .uverse.address, amount int64, forfeitCeiling int64, feeBps int64, termEnd int64, claimDeadline int64, disputeDeadline int64, arbiterDeadline int64, claimAmount int64, award int64, status string)- OID
- 0acb4c…4f9f:43
AgreementInfo details
Memo
func(id int64) string- OID
- 0acb4c…4f9f:44
Memo details
ClaimReason
func(id int64) string- OID
- 0acb4c…4f9f:45
ClaimReason details
DisputeReason
func(id int64) string- OID
- 0acb4c…4f9f:46
DisputeReason details
Holder
func(id int64) .uverse.address- OID
- 0acb4c…4f9f:47
Holder details
Depositor
func(id int64) .uverse.address- OID
- 0acb4c…4f9f:48
Depositor details
Arbiter
func(id int64) .uverse.address- OID
- 0acb4c…4f9f:49
Arbiter details
Amount
func(id int64) int64- OID
- 0acb4c…4f9f:50
Amount details
ForfeitCeiling
func(id int64) int64- OID
- 0acb4c…4f9f:51
ForfeitCeiling details
FeeBpsOf
func(id int64) int64- OID
- 0acb4c…4f9f:52
FeeBpsOf details
Status
func(id int64) string- OID
- 0acb4c…4f9f:53
Status details
ClaimAmount
func(id int64) int64- OID
- 0acb4c…4f9f:54
ClaimAmount details
Award
func(id int64) int64- OID
- 0acb4c…4f9f:55
Award details
TermEnd
func(id int64) int64- OID
- 0acb4c…4f9f:56
TermEnd details
ClaimDeadline
func(id int64) int64- OID
- 0acb4c…4f9f:57
ClaimDeadline details
FundDeadline
func(id int64) int64- OID
- 0acb4c…4f9f:58
FundDeadline details
DisputeDeadlineOf
func(id int64) int64DisputeDeadlineOf is the last height at which the depositor may Dispute a standing claim; ArbiterDeadlineOf is the last height at which the arbiter's ruling pre-empts LapseDispute. Both are 0 until the relevant stage is live.
- OID
- 0acb4c…4f9f:59
DisputeDeadlineOf details
ArbiterDeadlineOf
func(id int64) int64- OID
- 0acb4c…4f9f:60
ArbiterDeadlineOf details
CreatedHeight
func(id int64) int64- OID
- 0acb4c…4f9f:61
CreatedHeight details
FundedHeight
func(id int64) int64- OID
- 0acb4c…4f9f:62
FundedHeight details
SettledHeight
func(id int64) int64- OID
- 0acb4c…4f9f:63
SettledHeight details
Refund
func(id int64) int64Refund is the amount the depositor gets back, known only once settled.
- OID
- 0acb4c…4f9f:64
Refund details
MaxClaimable
func(id int64) int64MaxClaimable is the most the holder could still take out of this agreement. It is the ceiling while the deposit is funded, the filed claim once one stands, and 0 once the agreement is terminal.
- OID
- 0acb4c…4f9f:65
MaxClaimable details
IsSettled
func(id int64) bool- OID
- 0acb4c…4f9f:66
IsSettled details
IsClaimable
func(id int64) boolIsClaimable reports whether FileClaim would be accepted at this height.
- OID
- 0acb4c…4f9f:67
IsClaimable details
IsDisputable
func(id int64) boolIsDisputable reports whether Dispute would be accepted at this height.
- OID
- 0acb4c…4f9f:68
IsDisputable details
PendingValve
func(id int64) stringPendingValve names the permissionless call this agreement is ready for, or "" when none is. It is the one view a keeper needs.
- OID
- 0acb4c…4f9f:69
PendingValve details
HasAgreement
func(id int64) bool- OID
- 0acb4c…4f9f:70
HasAgreement details
AgreementsOf
func(holder .uverse.address) int64- OID
- 0acb4c…4f9f:71
AgreementsOf details
Admin
func() .uverse.address- OID
- 0acb4c…4f9f:72
Admin details
PendingAdmin
func() .uverse.address- OID
- 0acb4c…4f9f:73
PendingAdmin details
FeeRecipient
func() .uverse.address- OID
- 0acb4c…4f9f:74
FeeRecipient details
FeeBps
func() int64- OID
- 0acb4c…4f9f:75
FeeBps details
NumAgreements
func() int64- OID
- 0acb4c…4f9f:76
NumAgreements details
ClaimableOf
func(a .uverse.address) int64- OID
- 0acb4c…4f9f:77
ClaimableOf details
FeesAccrued
func() int64- OID
- 0acb4c…4f9f:78
FeesAccrued details
Liabilities
func() int64- OID
- 0acb4c…4f9f:79
Liabilities details
Locked
func() int64- OID
- 0acb4c…4f9f:80
Locked details
Contested
func() int64- OID
- 0acb4c…4f9f:81
Contested details
Held
func() int64- OID
- 0acb4c…4f9f:82
Held details
Address
func() .uverse.address- OID
- 0acb4c…4f9f:83
Address details
Height
func() int64- OID
- 0acb4c…4f9f:84
Height details
settle
func(d *deposits.agreement, award int64, fromContested bool) (credited int64, fee int64)settle credits the split and moves the deposit out of its custody bucket. The caller has already established the route's authority and timing; \`award\` is in \[0, amount] and \`fromContested\` says which bucket the deposit sits in. Conservation, in delta form: Held is unchanged; locked OR contested falls by amount; Liabilities rises by award + (amount-award) == amount. So Held == locked + contested + Liabilities is preserved exactly. The fee is charged ONLY on the award. The refund is deposited at fee 0, so a fully-refunded deposit returns to the depositor in full.
- OID
- 0acb4c…4f9f:85
settle details
mustAgreement
func(id int64) *deposits.agreement- OID
- 0acb4c…4f9f:86
mustAgreement details
assertNoSend
func()- OID
- 0acb4c…4f9f:87
assertNoSend details
counter
func(tree *v0.Tree, a .uverse.address) *int64- OID
- 0acb4c…4f9f:88
counter details
addChecked
func(a int64, b int64) (int64, bool)- OID
- 0acb4c…4f9f:89
addChecked details
padID
func(id int64) string- OID
- 0acb4c…4f9f:90
padID details
itoa
func(n int64) string- OID
- 0acb4c…4f9f:91
itoa details
addrStr
func(a .uverse.address) string- OID
- 0acb4c…4f9f:92
addrStr details
hasPrefix
func(s string, p string) bool- OID
- 0acb4c…4f9f:93
hasPrefix details
Render
func(path string) string- OID
- 0acb4c…4f9f:94
Render details
renderHome
func() string- OID
- 0acb4c…4f9f:95
renderHome details
renderAgreement
func(idStr string) string- OID
- 0acb4c…4f9f:96