By stringhandler | March 24, 2023

Base Layer Tari versus Second Layer Tari

Fees on the second layer prevent spam, and also provide an incentive for validator nodes to process transactions. When designing the fee mechanics, the Tari development community decided to use the base layer Tari as the source of fees for the main currency of the second layer. An alternative, which other blockchains sometimes use, is to mint the second layer fee currency as a block reward. Generally these lead to a proof of stake consensus mechanism, which in our opinion, is flawed and susceptible to “Nothing at stake” and other problems. Instead, Tari has a mechanism to import the base layer currency into the second layer.

Base Layer to Second Layer

Firstly, the currency cannot exist in both the base layer and the second layer, so it must be burned on the base layer. This is done using a UTXO that is unspendable and marked as a burn. This removes the funds from the base layer.

After the burnt UTXO has been sufficiently confirmed (to make reorgs very unlikely), an equal amount of second layer Tari can be claimed using a second layer instruction:

{
	"ClaimBurn": {
		"claim": {
			"public_key": "2a50d463cf05b65a93f81dc39fe75697566a9dd4a776e34f120208d827692444",
			"output_address": /* commitment */,
			"range_proof": /*... around 700 bytes ...*/,
			"proof_of_knowledge": {
				"public_nonce": "e6278f72598967bb8412233ad9633145594639a12ada5e76b0b88a0653e36101",
				"u": "ecc210a4af31386069757af38c1422225166d6921fde1235f27e826df2d87b04",
				"v": "f994af433874cc859518253fb0bbd109bf9b0003c7c720470b781514258b3203"
			}
	}
}

The output address is the same base layer commitment that hides the amount and spending key (blinding factor). A range proof is required to ensure the commitment does not include a negative value, and the public key and proof of knowledge, which is a Schnorr-like signature for the commitment, ensure that only the owner of the public key can claim the burn.

In the same second layer transaction, the user will typically store this commitment in a vault in their account. Of course, this transaction incurs fees, so the commitment is immediately split into a revealed amount and a new commitment. The revealed amount is used to pay the fees.

The second layer Tari can now be used as normal fungible, confidential asset on the second layer for use cases other than fees.

Second Layer to Base Layer

At this stage it’s important to note that base layer Tari and second layer Tari are different currencies, with a floating exchange rate. The reasons behind that are explained better in the Turbine Model RFC.

Conversions to base layer Tari can only be done via trades, exchanges (when available) or atomic swaps. This is often referred to as “Liquidity Exits” in other second layer blockchains.