Ir al contenido

Accounting

Esta página aún no está disponible en tu idioma.

takoGRAM does not rebase. rate = totalCoins / totalShares. A deposit mints amount / rate shares; a withdrawal burns shares for shares × rate Gram.

  • The pool starts with dead shares that nobody owns, so the first depositor cannot inflate the rate against the next.
  • Profit vests linearly over one validation round (65,536 seconds) instead of jumping the rate. A new profit moves the end of the schedule to the amount-weighted average, so a dust donation cannot postpone the rest. The instant withdrawal fee vests the same way.

queued is the current value of all unredeemed claims. It is excluded from instant liquidity and from lending, so the Gram owed to claims is never lent out again.

Each claim stores its amount and the claim factor at creation, and redeems amount × claimFactor / factorAtCreation.

If a loan loses more than its validator’s collateral and the insurance fund can cover:

  1. The loss is split between holders and claims in proportion to totalCoins + pendingProfit and queued. Queuing a withdrawal right before a visible fine does not dodge it.
  2. The holders’ part comes out of unvested profit first, then out of totalCoins.
  3. The claims’ part shrinks claimFactor, never by more than queued.
  4. Anything left is recorded as badDebt. Settlement never reverts.

The claim factor carries an epoch in its upper bits. A loss that wipes the whole queue starts a new epoch: claims of the wiped queue are worth zero, and new claims start from a full factor.

balance + lent ≥ totalCoins + pendingProfit + queued + held + keeperFund + insurance + reserve

Instant withdrawals and claim redemptions spend only balance − held − keeperFund − reserve. Validator collateral and the keeper fund are never used to pay users.

The randomized tests check this invariant after every step, together with share supply and the claims’ total. See Security.

Claims are TEP-62 items with on-chain TEP-64 metadata. The treasury’s get_nft_content turns a claim’s amount and factor into a name and a description with its current value in Gram and its status: waiting for validators, ready to redeem, or redemption in progress. A loss shows up in marketplaces at once.

A user who holds takoGRAM but no Gram signs a W5 internal message; a relayer sends it and pays the gas.

  • The relayer and its fee travel in the unstake options of the burn.
  • An instant withdrawal pays the relayer at once. A queued one stores the relayer in the claim, and the claim pays it on redemption.
  • The fee is capped at half of the payout.
  • A claim that owes a relayer cannot be transferred, so a buyer never inherits a seller’s debt.
  • The W5 seqno and a deadline stop replays.

Deposits do not need this: a user who sends Gram already pays gas with it.