Resources
In other blockchain systems, such as Ethereum, tokens or assets are instead known as "resources" in the Radix blockchain.
Resources must always be stored in containers. In Radix, there are two types of containers, and they are both implemented as native blueprints.
Resource managers
When a new resource is created, it is uniquely identified by its resource manager. The resource manager allows specific roles to access manager-like functionality. For example, it would allow someone with the MINTER_ROLE
role permission to mint the resource to others.
Buckets
In Radix, buckets are temporary containers that are used to store resources during the lifetime of a transaction. If a transaction ends with buckets still containing resources, an error will occur and the transaction will be reverted.
Buckets can have resources taken out of or put into them by one party and transferred over to another party, who can then take the resources out of the bucket. This is the primary way resources are transferred between owners in Radix.
There are two types of buckets:
Fungible buckets — These are used to store fungible resources, similar to what ERC-20 tokens are on Ethereum.
Nonfungible buckets — These are used to store nonfungible resources, similar to what ERC-721 tokens are on Ethereum.
Vaults
Vaults behave the same as buckets in most cases. The main difference is that vaults are used to store resources permanently.
In order to move resources from one vault to another, they always have to go through a bucket.
Similar to buckets, the two types of vaults are fungible and nonfungible vaults.
Proofs
Proofs in Radix are created by both buckets and vaults. It is used to prove that the owner of the bucket or vault (i.e., the one who created the proof) has access to a specified amount of resources.