Skip to content

Latest commit

 

History

History
63 lines (49 loc) · 3.37 KB

token-type1-burn.md

File metadata and controls

63 lines (49 loc) · 3.37 KB

Simple Ledger Protocol

SLP Token Type 1 Burn Specification

Version: 0.1

Date published: February 26, 2022

Purpose

This specification describes an additional transaction type, BURN, for the Simple Ledger Protocol (SLP) Token Type 1. This transaction type explictly specifies that token units have been removed from circulation, "burned," on purpose and not as the result of an error.

Background

The SLP Token Type 1 specification consists of four different transaction types:

  • GENESIS creates a brand new token
  • MINT puts more units into circulation from an already created token
  • SEND sends units of value
  • COMMIT (not implemented) allows on-chain checksum commitment of previous token transactions

The original specification does not specifically address applications where units of token value are purposely removed from circulation. There are many scenarios where removing value from circulation would be desired, such as with reserve-backed stablecoins or redeemed promotional vouchers/coupons.

This specification extends the SLP Token Type 1 Protocol Specification, adding a new transaction type, BURN.

SLP-enabled node implementations, exchange and payment processor API's, and other recipients of signed token transactions who relay to the wider network, have an incentive to prevent inadvertant "burning" of tokens via malformed transactions. Adding the BURN transaction type allows senders to explictly signal to relaying entities that token burns are done on purpose.

BURN - Burn Transaction

(Remove token units from circulation)

The following transaction format is used to remove token units from circulation. It is similar in format to a SEND transaction except that it creates no token outputs. Nodes and other applications checking for explicit burns should reject the transaction if the sum of the token quantities in the inputs does not equal token_burn_quantity. Any number of additional BCH-only outputs will be allowed.

Transaction inputs: Any number of inputs or content of inputs, in any order, but must include sufficient tokens coming from valid token transactions of matching token_id, token_type (see Consensus Rules).

Transaction outputs:

vout ScriptPubKey ("Address") BCH
amount
Implied token amount
(base units)
0 OP_RETURN
<lokad id: 'SLP\x00'> (4 bytes, ascii)
<token_type: 1> (1 to 2 byte integer)
<transaction_type: 'BURN'> (4 bytes, ascii)
<token_id> (32 bytes)
<token_burn_quantity> (required, 8 byte integer)
any 0
... Any any 0

Reference Implementations

Clients

CashTab (wallet.badger.cash fork) - ReactJS

Libraries

bcash - Node.js