Skip to content

PeerAssets: Proof of Burn tokens manual

d5000 edited this page Sep 6, 2023 · 7 revisions

Proof of Burn Tokens track burn transactions to Slimcoin's burn address and credit the sending addresses with tokens. More information here in the Proof of Burn Token description.

Initialize the deck and create a label for it

All Proof of Burn decks which are used in a pacli installation have to be initialized with the following command:

pacli deck init DECKID

DECKID is the Deck ID of the token (64 characters, Slimcoin TXID format). With pacli pobtoken deck_list you can see all current Proof of Burn tokens and their Deck IDs.

It is a good idea to create a label for each deck you use. Use the pacli tools for that purpose:

pacli tools store_deck LABEL DECKID

You then can use the label instead of the DECKID for almost all commands which require a DECK parameter.

Show your burn transactions

To show your burn transactions and see whether PoB tokens were claimed for them or not, use the command:

pacli pobtoken my_burns [--unclaimed] [--wallet] [--deck=DECK]

The --unclaimed parameter shows only burn transactions where no token claim was recorded. The --wallet option includes all burn transactions of all addresses belonging to your Slimcoin wallet, regardless of the main address. If there are multiple PoB tokens you made claims for, you can specify with DECKID which ones to take into account when listing the claims.

Create a burn transaction from a specific address

Burn transactions created with the burncoins command or the Slimcoin GUI app are normally created like normal Slimcoin transactions, so all addresses in your wallet will be taken into account, and you can't control easily from which address you will burn the coins. To ensure a burn transaction is recorded for a specific address, you can use the following command:

pacli pobtoken burn_coins AMOUNT [--change_address=CHANGE] [--from_address=FROMADDR] [--sign] [--send]

With CHANGE you can specify a different change address, and with FROMADDR you can specify another address of your wallet as the sender of the coins without having to change the main address.

Claim tokens for a burn transaction

Make sure first that the address you sent the burn transaction from is your current main address (otherwise use pacli address set_main LABEL to change to this address). The address entitled to claim the tokens you get as a "reward" for your burn transaction is always the address of the first input used in the burn transaction.

pacli pobtoken claim DECK TXID

DECK can be one of the following:

  • the Deck ID (64 characters, Slimcoin TXID format)
  • a label you saved for the Deck with the Pacli Extended Tools. See above.

The tokens by default get credited to the sender's address. If you don't want to send the transaction, you can add the flag --send=False.

A claim transaction costs the same as a regular CardTransfer on PeerAssets, i.e. in Slimcoin 0.5/0.6 0.01 SLM for the P2TH fee, 0.01 for the minimum OP_RETURN fee and 0.01 for the regular transaction fee.

Use the claim_reward transaction for payments

To save transaction fees or increase privacy by using multiple addresses for your tokens, you can use the claim transaction to send tokens to other addresses adding more parameters. The possibilities are listed here:

Single payment

This is a simplified method for a payment to a single address, due to the normal process to make payments of PeerAssets (see below) being a bit technical.

pacli pobtoken claim_reward DECK TXID --payto=ADDRESS [--payamount=AMOUNT] [--sign --send]

ADDRESS is the address to be paid, and AMOUNT is the amount in card units. If you omit --payamount, the whole amount of claimed tokens is paid to ADDRESS. Take into account the number of decimals for the deck.

Multiple payments

This is the regular PeerAssets method to send freshly issued tokens to another addresses. In this case, the brackets are mandatory and there can be no space between the different addresses and amounts. If you follow that scheme further escaping is not necessary.

pacli pobtoken claim DECK TXID --receivers=[ADDRESS1,ADDRESS2] --amounts=[AMOUNT1,AMOUNT2] --sign --send

For example, for 3 addresses, the syntax is:

pacli pobtoken claim DECK TXID --receivers=[ADDRESS1,ADDRESS2,ADDRESS3] --amounts=[AMOUNT1,AMOUNT2,AMOUNT3] --sign --send

ADDRESS1, ADDRESS2, ... (up to the number of receivers you want) is the list of payment receivers, and AMOUNT1, AMOUNT2... the list of the amounts sent to each of then. AMOUNT1 will be sent to ADDRESS1, AMOUNT2 to ADDRESS2 and so on. The number of addresses and amounts must be equal or the transfer will fail.

Show card balances

Show only the card balance of your current address:

pacli pobtoken my_balance DECK

Show balances of all owners of the token with the standard PeerAssets command:

pacli card balances DECKID

Note that this command doesn't support labels for decks, so you need to enter the full Deck ID.

Show all claim transactions

To see all claim transactions made for a specific token:

pacli pobtoken show_claims DECK [--wallet] [--param=PARAM]

DECK can be a Deck ID or a label for a stored deck. --wallet limits the claims to addresses of your own wallet.

With PARAM you can specify one or several of the following parameters to return only these: "txid", "donation_txid", "amount", "blocknum".

Advanced options

Spawn a new PoB token deck

pacli pobtoken deck_spawn NAME [--multiplier=MULTIPLIER] [--number_of_decimals=DECIMALS] [--startblock=START] [--endblock=END] [--sign] [--send]

NAME is the name of the token (uniqueness is NOT enforced in PeerAssets protocol). MULTIPLIER is a number which gets multiplied with the number of burnt coins to determine the reward. DECIMALS is the number of decimal places of the token (default: 2).

START and END are for tokens which only take into account burn transactions in a timeframe between two block heights. Both are optional, i.e. there can also be tokens with only a START value and without END, or vice versa.

Show burn transactions of all users (very slow!)

pacli pobtoken show_all_burns [--start=STARTBLOCK] [--end=ENDBLOCK] [--deckid=DECKID]

This searches for burn transactions of all users, block by block, and thus is very slow. The STARTBLOCK and ENDBLOCK parameters are provided to allow to search only for a specific range of block heights. Above all on mainnet it should only be used with these parameters. With DECKID you can specify a PoB deck to be able to see if the burn transactions were claimed or not.

(Once watch addresses are implemented, this will be replaced with a faster command.)