LISA
  • What is LISA?
    • LISA
  • Supported Tokens
    • Stacks ($STX)
      • How LiSTX Architecture Works?
        • Mint Factory
        • LISA Vault
        • Strategies
    • Bitcoin ($BTC)
      • How LiaBTC Earns Bitcoin Yield?
      • What is LiaBTC backed by?
      • How LiaBTC utilizes Cobo?
      • How would ALEX V2 Upgrade Affects LiaBTC?
    • ALEX ($ALEX)
  • Features (How To's)
    • Staking / Stacking
    • Unstaking / Unstacking
    • LISA Point System
    • Wrapping / Unwrapping
    • My Rewards / Overviews
    • Review to Earn
    • Send LISA Tokens
    • Checking your Balance
  • Rebasing Mechanism 101
    • Rebasing vs Reward-Bearing Mechanism
    • Depositing / Withdrawing from LISA
  • LISA FAQs
    • How are Rewards Paid Out?
    • How do I calculate my earnings?
    • Do I Earn Rewards if I withdraw before a Cycle Ends?
    • How is APR determined?
    • How can I check my past transactions on LISA?
    • How can I check the accurate LiSTX amount I’ve swapped via AMM?
    • Can I bridge out my LISA Tokens to other networks?
    • How to Participate in LISA Merkl Campaign?
  • LISA Point System
    • Point Reward Scores
    • Points to Loot Box Conversion
    • Entry / Exit Cycle Cooldown FAQs
  • Governance
    • LISA DAO
      • LISA DAO Improvements
    • Stacking Strategies
  • Is LISA Safe?
    • Security Audits
    • External Analytics
    • Deployed Contracts
  • Ecosystem Partners
    • ALEX
    • Ryder
    • Fast Pool by Ryder
    • Xverse
    • XLink
    • Cobo
  • Developers
    • List with LISA!
    • LISA Supported Network
    • LISA Media Kits
    • Contracts
      • liabtc-mint-endpoint
      • liabtc-mint-registry
      • token-liabtc
      • token-vliabtc
Powered by GitBook
On this page
  • Features
  • Governance
  • Supporting features
  • Getters
  • Storage
  • burn-request-nonce
  • burn-requests
  • Relevant constants
  • Contract calls
  • Errors
  1. Developers
  2. Contracts

liabtc-mint-registry

Previousliabtc-mint-endpointNexttoken-liabtc

Last updated 3 months ago

  • Location: xlink-dao/contracts/liabtc/liabtc-mint-registry.clar

The liabtc-mint-registry is the data and treasury counterpart to the contract. It manages the storage of burn requests data and serves as the aBTC treasury during burn operations.

Although it is primarly designed to be called by the liabtc-mint-endpoint, this registry can function as a general vault accesible to governance roles (LISA DAO or enabled extensions).

What actions can this contract do?

  • Create new burn requests, each tracked using a unique nonce.

  • Update any field of a burn request, including its status.

  • Transfer a specified from its balance to a designated recipient. The caller specifies the token, recipient and transfer amount.

Features

Governance

The following functions are guarded by the function. These features are resticted to the LISA DAO or enabled extensions.

set-burn-request

Creates or modifies burn requests in the map as specified in the details parameter. It is called by the functions , and in the contract.

New requests are created by passing u0 as the request-id parameter. On each request creation, the variable is incremented by one, resulting in the id of the new request.

Parameters

Name
Type

request-id

uint

details

{ requested-by: principal, amount: uint, requested-at: uint, status: (buff 1) }

transfer

Calls the transfer function of the token-trait passed with as-contract privilege. The caller has the ability to send tokens from the registry's balance to a designated recipient.

Parameters

Name
Type

amount

uint

recipient

principal

token-trait

<sip-010-trait>

Supporting features

is-dao-or-extension

Standard protocol function to check whether the contract-caller is an enabled extension within the DAO or the tx-sender is the DAO itself (proposal execution scenario). The enabled extension check is delegated to the LISA's executor-dao contract.

Getters

get-burn-request-nonce

get-burn-request-or-fail

Parameterss

Name
Type

request-id

uint

Storage

burn-request-nonce

Data
Type

Variable

uint

Indicates the request-id of the last burn request created. This variable can only monotonically increase. It initialized as u0, the key that will always have an empty value.

burn-requests

Data
Type

Map

uint { requested-by: principal, amount: uint, requested-at: uint, status: (buff 1) }

Relevant constants

PENDING

Type
Value

buff 1

0x00

Burn request pending status. When created, burn requests start with this status.

FINALIZED

Type
Value

buff 1

0x01

Burn request finalize status.

REVOKED

Type
Value

buff 1

0x02

Burn request revoked status.

Contract calls

Errors

Error Name
Value

err-unauthorised

(err u1000)

err-unknown-request-id

(err u1008)

Returns the variable.

Returns the burn request on the map at a given key. If there is no entry for the provided request-id, throws.

Map that stores the burn requests, typically used by the .

<sip-010-trait>: Interaction with potentially any contract implementing the occurs when the function is called.

'SM26NBC8SFHNW4P1Y4DFH27974P56WN86C92HPEHH.lisa-dao: This contract is exclusively called by the function for authorizing governance operations.

liabtc-mint-endpoint
burn-request-nonce
burn-requests
official SIP-010
transfer
is-dao-or-extension
Deployed contract
liabtc-mint-endpoint
liabtc-mint-endpoint
is-dao-or-extension
burn-requests
burn-request-nonce
request-burn
revoke-burn
finalize-burn