Overview
There are two ways to burn:
In both flows, the holder is the party whose holdings are burned, and the party that proposed the
burn can cancel it until it is accepted.
The flows differ in when the holdings are selected:
- Burn request: the holder selects the holdings when requesting the burn. The burn amount is locked immediately, so it can’t be transferred while the request is pending.
- Burn offer: the holder selects the holdings when accepting the offer. Nothing is locked while the offer is pending.
Prerequisites
Before a burn can be accepted:- The holder must own holdings of the instrument that cover the burn amount.
- The holder must satisfy the instrument’s issuer credential requirements. If no issuer credential requirements are defined, the credential check passes for any holder. See How Requirements Are Evaluated.
- The instrument must not be paused, unless the holder is the registrar.
- If the blocklist check is enabled for the instrument, the holder must not be on the registrar’s blocklist.
- The burn must be accepted before its
executeBeforetime.
Holder credential requirements aren’t checked for burns. Only the issuer credential requirements
apply to the holder.
API integration
Every API step follows the same pattern:- Call the Operator Backend API to get the choice context
and the contracts that must be disclosed, such as the
InstrumentConfiguration, the holder’s credentials, and theAllocationFactory. - Exercise the choice through the JSON Ledger API, passing the choice context in
extraArgs.contextand the disclosures indisclosedContracts.
BurnRequest or
BurnOffer by querying the active contracts of the acting party, for example by matching the burn
reference. To select holdings, query the holder’s active Holding contracts of the instrument.
Burn requests and offers are created through the registrar’s
AllocationFactory contract.
Despite its name, it doesn’t only implement the Token Standard allocation interfaces, but also
the transfer interfaces and the mint and burn workflows. The name is kept for backwards
compatibility.Burn request
The holder requests a burn, and the registrar accepts or rejects it.1
Holder requests a burn
- dApp UI
- API
- Go to Burns and click Request Burn.
- Select the instrument.
- Enter the amount to burn.
- Enter a reference, for example the reason for the burn or the redemption it relates to.
- Optionally, enter a label, which is the account ID to burn from, see Labels. Leave it empty to burn from the basic account.
- Submit the request.
2
Registrar accepts or rejects the request
- dApp UI
- API
- Go to Burns and select the burn request.
- Click Accept, or click Reject and enter a reason.
3
Optional: Holder cancels the request
The holder can cancel a burn request until the registrar accepts it. The holding is unlocked and
can be used again.
- dApp UI
- API
Go to Burns, select the burn request, and click Cancel.
Burn offer
The registrar offers a burn to a holder, and the holder accepts or rejects it.The burn offer flow is currently not available in the dApp UI. Use the API to offer, accept,
reject, or cancel burn offers.
1
Registrar offers a burn
- Get the
AllocationFactoryand choice context withPOST /api/utilities/v0/registry/burn/v0/offer, passing theholderand theinstrumentId. - As the registrar, exercise
AllocationFactory_OfferBurnon the factory. The choice argument has the same shape as for a burn request, withoutholdingCids.
BurnOffer contract. No holdings are locked.2
Holder accepts or rejects the offer
- Get the choice context with
POST /api/utilities/v0/registry/burn/v0/offer/{burnOfferId}/choice-contexts/accept(or/reject). - As the holder, exercise
BurnOffer_Accepton theBurnOfferwith theholdingCidsto burn, orBurnOffer_Rejectwith areason.
BurnOffer_Accept returns the remaining holding if the selected holdings exceed the burn
amount.3
Optional: Registrar cancels the offer
The registrar can cancel a burn offer until the holder accepts it.As the registrar, exercise
BurnOffer_Cancel on the BurnOffer, using the choice context from
POST /api/utilities/v0/registry/burn/v0/offer/{burnOfferId}/choice-contexts/cancel.Burn details
Both flows use the sameBurn payload:
Labels
Labels in mint and burn workflows require all involved parties to use Registry App version
0.14.2 or later.cip-112/sender.id) in the burn metadata.
It identifies the holder’s account that the burn is booked from. See
Accounts and Labels.
- Through the API, input holdings may have any label. Holdings with a different label are faded in to the sender account, see Input Holdings and Fade-in. The dApp UI only selects input holdings that match the label.
- Any change is left on the holder’s sender account. In a burn request, the locked holding also gets the sender account ID as its label.
- The sender account is part of the
Burnpayload, so it is set by the party that proposes the burn:- Burn request: the holder sets the sender account when requesting the burn.
- Burn offer: the sender account is taken from the offer.
BurnOffer_Acceptdoesn’t take a label, so the holder can’t change it when accepting.
- If no sender account ID is set, the holder’s basic account with account ID
""is used.
Troubleshooting
Next steps
- To move holdings between parties, see Transfer.
- To create new supply, see Mint.
- To detect executed burns in the transaction history, see Transaction history parsing.
- To burn and mint holdings atomically as the registrar, see Custom burn / mint workflows.