Introduction
Blockchain technology has enabled the creation of decentralized applications (dApps) that allow users to maintain full control of their assets without the need for a central authority. However, this poses a challenge for dApps that require users to interact with each other, as each user must have their own address while using the dApp, making it difficult for users to find and interact with each other without relying on a central order batcher. The Cardano Improvement Proposal (CIP) Beacon Tokens & Distributed Dapps propose a new standard, to solve this broadcasting issue. In this article, we will explore what beacon tokens are, how they can be used, and their use cases.
What are Beacon Tokens?
All native tokens on Cardano broadcast their current address and any transactions they were ever a part of at all times. Beacon Tokens are a native token whose only purpose is to broadcast information. They allow users to create distributed L1 dApps where users not only maintain full delegation control of their assets but also maintain full custody of their assets at all times.
What are the Use Cases for Beacon Tokens?
Beacon Tokens have a wide range of use cases in the Cardano ecosystem. Let's take a closer look at some of them.
Distributed L1 Dapps
As mentioned earlier, a distributed L1 Dapp is one where all users have their own personal address while using the Dapp. This is opposite to concentrated L1 Dapps where all users share one or a few addresses while using the Dapp. Distributed L1 Dapps can use beacon tokens to aggregate all of the necessary information for using the Dapps and they follow the same general design pattern:
- All user addresses use the same spending script for a given use case.
- All user addresses must have a staking credential.
- The spending script delegates the authorization of owner related actions to the address' staking credential - i.e., the staking key must sign or the staking script must be successfully executed in the same transaction.
- The spending script's hash is hard-coded into the beacon minting policy, and the minting policy enforces that the beacons can only be minted to an address of that spending script.
- The datums for the spending script must have the policy ID of the beacons so that the script can force proper usage of the beacons (such as burning when necessary).
Advantages:
-
Full delegation control
-
Users maintain full custody of their assets while using the Dapp, since owner related actions must be approved by the staking credential.
-
The address itself can act as the User ID. There is no need to place a User ID in a datum and guard its usage.
-
Since there are at least as many UTxOs as there are users, the distributed L1 Dapp is naturally concurrent and gets more concurrent as the number of users increases.
-
Upgradability can happen democratically - i.e., users can choose whether to move their assets to an address using a newer version of the Dapp's spending script.
-
The Dapp is easily integratable into existing frontends (wallets).
Using these design principles cardano swaps is a proof-of-concept implementation of an organically scalable DEX protocol for the Cardano Settlement Layer (CSL).
Trustless Sharing of Scripts
A beacon token can be used for trustless peer-to-peer sharing of Cardano reference scripts. It uses the UTxO info API to broadcast all of the UTxOs that contain each beacon. The beacon token name is the script hash of the reference script being shared. Minting the beacon requires that the beacon is stored with the reference script whose hash matches the beacon's token name. Cardano Reference Scripts also uses a helper plutus spending script to guarantee the burning of the beacon when a reference script UTxO is consumed.
Voting Systems
A beacon token can be used as a voting system. In such a system, the beacon token acts as a vote, and users holding the token can participate in the voting process. This can be used for decentralized decision-making, such as in DAOs or governance systems.
Personal Address Book
A beacon token can be used to create an on-chain personal address book tied to - and fully recoverable by - a user's payment pubkey. The beacon token name is the user's payment pubkey hash. Minting the beacon requires the signature of the payment pubkey hash used for the token name. This guarantees that only the user can mint their personal beacon.
The Cardano-Address-Book is a personal payment address book on Cardano that is tied to a user's payment pubkey. It uses the Tx metadata API to broadcast all metadata attached to the transactions containing the beacon. The address book is the aggregation of all of the metadata. This application can be generalized to store any information in a way that is unique to and protected by the user's payment pubkey.
Conclusion
Beacon Tokens are a new NFT standard proposed under the Cardano Improvement Proposals (CIPs). They provide a solution to the broadcasting issue associated with giving each user their own Dapp address in a distributed L1 Dapp. By being able to easily broadcast the necessary information for a Dapp, user assets can be segregated into separate addresses and, therefore, enable full delegation control while using the Dapp.
References: