RealmPath
untyped stringRealmPath is this realm's own path, used to build Render links.
Value
"/r/g1ut6uspuh73e02yauxpmyt8g3wwddaq8utagvm3/crowdfund"
Denom
untyped stringDenom is the only asset this realm holds.
Value
"ugnot"
MaxFeeBps
int64MaxFeeBps is the hard ceiling on any success fee this realm could ever charge, enforced by the feeledger the realm is constructed with — a feeBps above it is refused by the primitive's own validation, not by a check in this file. 500 bps = 5%.
Value
500
SuccessFeeBps
int64SuccessFeeBps is the fee actually snapshotted into every campaign at Launch: 100 bps = 1%, charged once, on CreatorClaim, on the raised amount, floor-rounded in the creator's favor. fee\_split precedent: the most conservative live fee in this portfolio is also 1%.
Value
100
FeeCollector
.uverse.addressFeeCollector receives withdrawn fees and swept surplus. Compile-time constant: there is no setter and no transfer path. It is the deploying namespace's address — stated plainly: the operator of this realm.
Value
<gnolang.StringValue>
MinGoal
int64MinGoal keeps dust campaigns out: 1 GNOT.
Value
1000000
MinPledge
int64MinPledge bounds pledge-table growth per GNOT of hostile capital (audit open question 1): at 0.01 GNOT per entry, bloating one campaign's table to even 10,000 entries costs 100 refundable-but- locked GNOT plus gas. Honest micro-backing survives: 0.01 GNOT is two orders of magnitude below MinGoal.
Value
10000
MinDurationBlocks
int64MinDurationBlocks and MaxDurationBlocks bound a campaign's funding period, enforced structurally: they are the duebook's minDelay and maxDelay, so an out-of-range duration is refused by the primitive. At onyx-1's roughly 3-5s blocks, ~1,200 blocks is on the order of an hour or two, and ~1,300,000 blocks is on the order of 45-75 days.
Value
1200
MaxDurationBlocks
int64MinDurationBlocks and MaxDurationBlocks bound a campaign's funding period, enforced structurally: they are the duebook's minDelay and maxDelay, so an out-of-range duration is refused by the primitive. At onyx-1's roughly 3-5s blocks, ~1,200 blocks is on the order of an hour or two, and ~1,300,000 blocks is on the order of 45-75 days.
Value
1300000
ClaimWindowBlocks
int64ClaimWindowBlocks is how long after the deadline a successful creator may collect before the campaign becomes permissionlessly lapsable and the pot refundable. It is every campaign's deferral ttl.
Value
650000
MaxOpenCampaigns
untyped bigintMaxOpenCampaigns caps simultaneously unsettled campaigns, via the duebook's own open-deferral cap. The AVAILABILITY BOUND this implies is documented rather than hidden: Launch is permissionless, so the cap is exhaustible in principle. What each unsettled slot costs an attacker is the mitigation — a failed campaign is permissionlessly settleable (SettleFailed) the moment its deadline passes, so holding a slot past its deadline requires MEETING THE GOAL, i.e. locking at least MinGoal of real capital per slot for the claim window. Filling the whole table therefore costs >= 1,024 GNOT locked for ~a month per cycle, against a realm whose existing campaigns keep working regardless. Accepted for a testnet deployment and recorded in the deployment record (audit finding Y1).
Value
(1024 <untyped> bigint)
MaxOpenPerCreator
int64MaxOpenPerCreator bounds how much of the global cap one creator can occupy (permission\_registry R1 precedent: an uncapped per-principal count lets one key monopolize a shared bound).
Value
8
MaxTitleLen
untyped bigintInput bounds. Both fields are free text and are sanitized before reaching markdown.
Value
(100 <untyped> bigint)
MaxMemoLen
untyped bigintInput bounds. Both fields are free text and are sanitized before reaching markdown.
Value
(256 <untyped> bigint)
MaxRenderRows
untyped bigintMaxRenderRows bounds the campaign list on the index page.
Value
(20 <untyped> bigint)
stateFunding
untyped stringCampaign states. statePaid, stateFailed, stateCancelled and stateLapsed are terminal: the campaign's deferral has been consumed and can never be consumed again.
Value
"funding"
statePaid
untyped stringCampaign states. statePaid, stateFailed, stateCancelled and stateLapsed are terminal: the campaign's deferral has been consumed and can never be consumed again.
Value
"paid"
stateFailed
untyped stringCampaign states. statePaid, stateFailed, stateCancelled and stateLapsed are terminal: the campaign's deferral has been consumed and can never be consumed again.
Value
"failed"
stateCancelled
untyped stringCampaign states. statePaid, stateFailed, stateCancelled and stateLapsed are terminal: the campaign's deferral has been consumed and can never be consumed again.
Value
"cancelled"
stateLapsed
untyped stringCampaign states. statePaid, stateFailed, stateCancelled and stateLapsed are terminal: the campaign's deferral has been consumed and can never be consumed again.
Value
"lapsed"
campaign
typeValue
crowdfund.campaign
self
.uverse.addressValue
<gnolang.StringValue>
campaigns
*v0.Tree// padID(id) -> \*campaign
- OID
- 0deb15…3765:5
campaigns details
nextID
int64Value
3
openByCreator
*v0.Tree- OID
- 0deb15…3765:9
openByCreator details
totalBacked
int64Value
0
lifetimePledged
int64Value
3050000
lifetimePaidOut
int64// creator payouts, net of fee
Value
990000
lifetimeReturned
int64// unpledges + refunds
Value
2050000
ledger
*feeledger.Ledger- OID
- 0deb15…3765:16
ledger details
book
*duebook.Book- OID
- 0deb15…3765:21
book details
init.31
func()- OID
- 0deb15…3765:25
init.31 details
rejectStraySend
func()rejectStraySend aborts when coins are attached to a non-payable call. This realm holds funds, so a stray send would become sweepable surplus, silently converting a user's coins into operator funds. Aborting reverts the transfer instead. Guarded on IsUserCall, not IsUser, because a MsgRun ephemeral can consume the OriginSend envelope before forwarding control; for a realm-routed call the envelope lands at the intermediary, so there is nothing here to reject and the guard deliberately fails open (treasury\_board documents the same scope).
- OID
- 0deb15…3765:27
rejectStraySend details
Launch
func(title string, memo string, goal int64, durationBlocks int64) int64Launch opens a campaign and returns its id. Anyone may launch; the caller becomes the creator. The fee terms (SuccessFeeBps at this moment — a compile-time constant, so always SuccessFeeBps) are snapshotted into the campaign and are fixed from here on. The funding duration is given in blocks and must be within \[MinDurationBlocks, MaxDurationBlocks] — enforced by the duebook.
- OID
- 0deb15…3765:28
Launch details
Pledge
func(id int64)Pledge backs a campaign with the attached coins. Direct EOA calls with -send only (the receipt-guaranteed shape); exactly one positive ugnot coin. Open while height \< deadline.
- OID
- 0deb15…3765:29
Pledge details
Unpledge
func(id int64)Unpledge returns the caller's entire pledge while funding is still open. All-or-nothing means nothing is committed before the deadline, so backing out is always whole and always free.
- OID
- 0deb15…3765:30
Unpledge details
CreatorClaim
func(id int64)CreatorClaim collects a successful campaign: creator only, from the deadline until the claim window closes, and only with the goal reached. Pays raised minus the snapshotted fee to the creator and accrues the fee. The duebook Claim consumes the campaign's deferral, so this can succeed at most once per campaign, ever.
- OID
- 0deb15…3765:31
CreatorClaim details
CreatorCancel
func(id int64)CreatorCancel settles the caller's own campaign as cancelled and opens refunds. Permitted at any time while the settlement deferral is open — during funding, and equally after a successful deadline (renouncing the pot). The duebook Cancel is owner-gated and consumes the deferral.
- OID
- 0deb15…3765:32
CreatorCancel details
SettleFailed
func(id int64)SettleFailed settles a campaign that reached its deadline with the goal unmet. Anyone may call it — there is nothing to steer: refunds were already open on this path, so the only effects are making the failure terminal and freeing the campaign's duebook slot (and its creator's cap slot) immediately instead of at the end of the claim window. This is what makes slot-squatting with unfunded campaigns pointless: holding a slot past the deadline requires meeting the goal, i.e. real locked capital. The deferral is consumed with the duebook's Claim under this realm's policy (goal unmet), which the primitive explicitly leaves to its consumer; the timing verdict (not due before the deadline) is the primitive's own.
- OID
- 0deb15…3765:33
SettleFailed details
Lapse
func(id int64)Lapse settles a campaign whose claim window has closed. Anyone may call it — a lapsed campaign's pot belongs to its backers, and the caller is doing them (and the duebook's open-slot budget) a service. The duebook Expire refuses while the window is still open.
- OID
- 0deb15…3765:34
Lapse details
Refund
func(id int64)Refund returns the caller's entire pledge from a campaign that will never pay its creator: cancelled, lapsed, or past its deadline with the goal unmet. Always whole, always fee-free. While a succeeded campaign is inside its claim window the pot is the creator's to collect, so Refund refuses — if the creator never collects, Lapse reopens this path.
- OID
- 0deb15…3765:35
Refund details
Prune
func(id int64)Prune removes a settled campaign record that holds no coins, reclaiming its storage. Anyone may call it: the chain refunds the freed storage deposit to the pruning transaction, which is the incentive. A record with raised > 0 still carries backer entitlements and is not prunable.
- OID
- 0deb15…3765:36
Prune details
WithdrawFees
func() int64WithdrawFees pays the entire accrued fee pot to the compile-time FeeCollector. Anyone may call it: the destination is fixed, so there is nothing for a caller to steer.
- OID
- 0deb15…3765:37
WithdrawFees details
SweepSurplus
func(denom string) int64SweepSurplus sends out-of-band coins to the FeeCollector: for the pot denom, everything above tracked liabilities; for any foreign denom, the full balance. Tracked backer money and the fee pot are untouchable by construction (coinio.Sweep refuses to dip below the reserve). Anyone may call it.
- OID
- 0deb15…3765:38
SweepSurplus details
CampaignInfo
func(id int64) (creator .uverse.address, goal int64, raised int64, feeBps int64, createdAt int64, deadline int64, claimEnd int64, backers int, state string)- OID
- 0deb15…3765:39
CampaignInfo details
CampaignTitle
func(id int64) stringCampaignTitle returns a campaign's raw title (unsanitized: callers rendering it into markdown must sanitize, as this realm's Render does).
- OID
- 0deb15…3765:40
CampaignTitle details
CampaignMemo
func(id int64) stringCampaignMemo returns a campaign's raw memo (same caveat as the title).
- OID
- 0deb15…3765:41
CampaignMemo details
Status
func(id int64) stringStatus returns the human verdict for a campaign right now: "funding", "succeeded (awaiting creator claim)", "failed (refunds open)", "paid", "cancelled", or "lapsed".
- OID
- 0deb15…3765:42
Status details
PledgeOf
func(id int64, addr .uverse.address) int64PledgeOf returns addr's live pledge in a campaign (0 if none, and 0 for settled campaigns whose pledge table has been dropped).
- OID
- 0deb15…3765:43
PledgeOf details
IsRefundable
func(id int64) boolIsRefundable reports whether Refund would currently accept this campaign (for any backer with a live pledge).
- OID
- 0deb15…3765:44
IsRefundable details
NumCampaigns
func() int64NumCampaigns returns how many campaigns have ever been launched. Prune removes records but never reuses ids.
- OID
- 0deb15…3765:45
NumCampaigns details
OpenCampaigns
func() int64OpenCampaigns returns how many campaigns are currently unsettled.
- OID
- 0deb15…3765:46
OpenCampaigns details
OpenOf
func(addr .uverse.address) int64OpenOf returns how many unsettled campaigns addr currently has.
- OID
- 0deb15…3765:47
OpenOf details
TotalBacked
func() int64TotalBacked returns the B term: coins held for campaigns.
- OID
- 0deb15…3765:48
TotalBacked details
FeesAccrued
func() int64FeesAccrued returns the F term: charged, not yet withdrawn.
- OID
- 0deb15…3765:49
FeesAccrued details
Liabilities
func() int64Liabilities returns B + F — everything this realm owes.
- OID
- 0deb15…3765:50
Liabilities details
Held
func() int64Held returns H: the ugnot actually at this realm's address.
- OID
- 0deb15…3765:51
Held details
Surplus
func() int64Surplus returns H - (B + F) — out-of-band coins, sweepable.
- OID
- 0deb15…3765:52
Surplus details
Address
func() .uverse.address- OID
- 0deb15…3765:53
Address details
Height
func() int64Height returns the current chain height, the clock every deadline is measured against.
- OID
- 0deb15…3765:54
Height details
Render
func(path string) stringRender shows the realm at "" and a campaign page at "\<id>". Titles and memos are free text and pass through the ecosystem sanitizer before hitting markdown.
- OID
- 0deb15…3765:55
Render details
renderCampaign
func(path string) string- OID
- 0deb15…3765:56
renderCampaign details
mustGet
func(id int64) *crowdfund.campaign- OID
- 0deb15…3765:57
mustGet details
payBack
func(c *crowdfund.campaign, backer .uverse.address, event string)payBack is the shared whole-pledge return path for Unpledge and Refund: debit the backer's entry and the campaign before the identical amount leaves the realm.
- OID
- 0deb15…3765:58
payBack details
refundable
func(c *crowdfund.campaign, now int64) boolrefundable: failed, cancelled and lapsed campaigns always; an unsettled campaign once its deadline has passed with the goal unmet. A succeeded campaign inside its claim window is NOT refundable — the pot is the creator's to collect until Cancel or Lapse says otherwise.
- OID
- 0deb15…3765:59
refundable details
status
func(c *crowdfund.campaign, now int64) string- OID
- 0deb15…3765:60
status details
pledgeOf
func(c *crowdfund.campaign, key string) int64- OID
- 0deb15…3765:61
pledgeOf details
backerCount
func(c *crowdfund.campaign) int- OID
- 0deb15…3765:62
backerCount details
creatorOpen
func(key string) int64- OID
- 0deb15…3765:63
creatorOpen details
setCreatorOpen
func(key string, n int64)- OID
- 0deb15…3765:64
setCreatorOpen details
decCreatorOpen
func(key string)- OID
- 0deb15…3765:65
decCreatorOpen details
itoa
func(n int64) string- OID
- 0deb15…3765:66
itoa details
bps
func(n int64) stringbps renders a basis-point figure as a human percentage, exactly.
- OID
- 0deb15…3765:67
bps details
percent
func(raised int64, goal int64) stringpercent renders raised/goal as an integer percentage (floor). goal >= MinGoal > 0 by construction, so no divide guard is needed.
- OID
- 0deb15…3765:68
percent details
padID
func(id int64) stringpadID encodes an id so avl's lexical order matches numeric order.
- OID
- 0deb15…3765:69
padID details
zeros
untyped stringValue
"00000000000000000000"
checkedAdd
func(a int64, b int64) (int64, bool)checkedAdd returns a+b and reports whether the addition did not overflow int64.
- OID
- 0deb15…3765:70