Denom
untyped stringDenom is the only asset this vault accepts.
Value
"ugnot"
MaxFeeBps
int64MaxFeeBps is the hard protocol-fee cap: 1000 bps = 10%. Nobody can configure a higher fee; changing this requires deploying a new realm.
Value
1000
admin
.uverse.address// may set fee, fee recipient, and successor admin
Value
<gnolang.StringValue>
feeRecipient
.uverse.address// may withdraw the fee pot and sweep surplus
Value
<gnolang.StringValue>
feeBps
int64// current protocol fee in basis points
Value
250
self
.uverse.address// this realm's own address, captured at deploy
Value
<gnolang.StringValue>
ledger
*feeledger.Ledger- OID
- 0cd3fb…634e:8
ledger details
init.7
func()- OID
- 0cd3fb…634e:12
init.7 details
Deposit
func()Deposit credits the caller with the attached GNOT minus the current protocol fee. Only direct EOA calls (maketx call with -send) are accepted: that is the only shape where the chain guarantees the send envelope landed at this realm's address before the body runs. The envelope must be exactly one coin of denom ugnot with positive amount.
- OID
- 0cd3fb…634e:14
Deposit details
Claim
func(amount int64)Claim sends amount ugnot of the caller's balance back to the caller. Fails if amount is not positive or exceeds the caller's balance.
- OID
- 0cd3fb…634e:15
Claim details
ClaimAll
func()ClaimAll sends the caller's entire balance back to the caller. Fails if the caller has no balance.
- OID
- 0cd3fb…634e:16
ClaimAll details
WithdrawFees
func()WithdrawFees sends the entire accrued fee pot to the fee recipient. Only the fee recipient may call it. Fails if the pot is empty.
- OID
- 0cd3fb…634e:17
WithdrawFees details
SweepSurplus
func()SweepSurplus sends coins that sit at the realm address ABOVE the ledger's liabilities (ugnot force-sent outside Deposit, or any other denomination) to the fee recipient. Only the fee recipient may call it. User balances and the fee pot are untouchable by construction: only the excess over Liabilities() moves. Fails if there is no surplus.
- OID
- 0cd3fb…634e:18
SweepSurplus details
SweepDenom
func(denom string)SweepDenom sends the surplus of a single denomination to the fee recipient. This is the bounded escape hatch for when SweepSurplus would exceed gas because a third party force-sent many junk denominations to the realm address: each call touches exactly one denomination, so ugnot surplus can always be recovered regardless of how many foreign denoms accumulate. For ugnot only the excess over Liabilities() moves; any other denom moves wholly. Only the fee recipient may call it.
- OID
- 0cd3fb…634e:19
SweepDenom details
SetFeeBps
func(bps int64)SetFeeBps sets the protocol fee for FUTURE deposits. Admin only; bounded by \[0, MaxFeeBps].
- OID
- 0cd3fb…634e:20
SetFeeBps details
SetFeeRecipient
func(next .uverse.address)SetFeeRecipient re-points who may withdraw the fee pot (including fees accrued before the change) and sweep surplus. Admin only; the zero address is rejected.
- OID
- 0cd3fb…634e:21
SetFeeRecipient details
TransferAdmin
func(next .uverse.address)TransferAdmin hands the admin role to next. Admin only; the zero address is rejected. One-step: a transfer to a wrong-but-valid address permanently loses fee administration (deposits and claims keep working).
- OID
- 0cd3fb…634e:22
TransferAdmin details
Admin
func() .uverse.address- OID
- 0cd3fb…634e:23
Admin details
FeeRecipient
func() .uverse.address- OID
- 0cd3fb…634e:24
FeeRecipient details
FeeBps
func() int64FeeBps returns the protocol fee applied to future deposits, in basis points of the deposit amount.
- OID
- 0cd3fb…634e:25
FeeBps details
FeeOn
func(amount int64) (fee int64, credited int64)FeeOn previews the fee and credited amount for a deposit of amount at the CURRENT FeeBps.
- OID
- 0cd3fb…634e:26
FeeOn details
BalanceOf
func(addr .uverse.address) int64BalanceOf returns addr's claimable balance.
- OID
- 0cd3fb…634e:27
BalanceOf details
UsersTotal
func() int64UsersTotal returns the sum of all user balances.
- OID
- 0cd3fb…634e:28
UsersTotal details
FeesAccrued
func() int64FeesAccrued returns the fee pot awaiting withdrawal.
- OID
- 0cd3fb…634e:29
FeesAccrued details
Liabilities
func() int64Liabilities returns UsersTotal() + FeesAccrued().
- OID
- 0cd3fb…634e:30
Liabilities details
Held
func() int64Held returns the ugnot actually held at the realm address.
- OID
- 0cd3fb…634e:31
Held details
Surplus
func() int64Surplus returns Held() - Liabilities(): ugnot at the realm address that the ledger does not owe to anyone. Negative would indicate a conservation bug (see the invariant in the package doc).
- OID
- 0cd3fb…634e:32
Surplus details
Address
func() .uverse.address- OID
- 0cd3fb…634e:33
Address details
Render
func(string) stringRender shows configuration, totals, and the live conservation check.
- OID
- 0cd3fb…634e:34
Render details
assertAdmin
func(caller .uverse.address)assertAdmin gates admin-only entrypoints; callers resolve identity at the crossing boundary and pass the address down.
- OID
- 0cd3fb…634e:35
assertAdmin details
send
func(to .uverse.address, amount int64)send moves amount ugnot from the realm to \`to\`. Callers must have debited the ledger first (checks-effects-interactions); a panic here aborts the transaction, reverting the debit with it.
- OID
- 0cd3fb…634e:36
send details
itoa
func(n int64) string- OID
- 0cd3fb…634e:37