2 : Basic Concepts
Last updated
Last updated
Check this guide in
Edit this guide in it's repo:
Contribute to this guide in the of the repo
As mentioned on the , the Stellar Blockchain provides a built in functionality to create and transfer any type of asset. By built-in we mean a core on-chain function that does not uses any smart contract.
Stellar Asssets are identified by the combination of the asset code and the issuer public key (the addres that creates the asset). Althought asset codes can be reused, the combination with issuer indentify the asset unique.
asset code
: there are three type of asset codes: alphanumeric 4, alphanumeric 12 and liquidity pool shares
issuer
: Stellar address that issue the asset
An Stellar Asset identification can be as follows:
Here is an example:
The creation of an Stellar Asset is very easy: The issuer needs to transfer the asset to a destination address. This transfer is performed by a transaction that includes a payment operation. However, let's don't forget, that before receiving the asset, the destination address is required to submit a change trust operation in order to accept to an specific asset not created yet.
Soroban is the Stellar's smart contract platform, curently under development and in preview releases.
Soroban smart contracts are small pieces of software written in the Rust language and compiled to wasm code. Wasm smart contract code has to be submitted to stellar blockchain in a transaction so that later it can be invoked and run in a short-live virtual machine ("VM") thanks to a new transaction.
Stellar recommend issuing tokens as Stellar Assets, and then wraping into a SAC token to take advantge of the interoperatiblity with the existing ecosystem.
Next some resources about how uses tokens:
Any individual has the capability to deploy instances of a Stellar Asset Contract. Nevertheless, despite the automated initiation of the Stellar Asset Contracts during deployment, it is the Asset Issuer who retains administrative permissions subsequent to the contract's deployment.
In the next two chapters we will prepare our enviroment in order to issue (classic) Stellar Assets and mint them as Stellar Asset Contracts in Soroban. Remain alert!
Read more about trustlines in the
Following this steps, the asset will be minted / created, incrementins this way the total supply. If the issuer do not wants to mint any more, it needs to lock the issuing account. Learn more about asset supply in the
Tokens in Soroban can be issued as Stellar Assets or as custom Soroban Tokens (only soroban). Custom Soroban tokens can follow any type of logic, (as a non ERC-20 token). But the most interesting tokens are those that implement the which is similar to the widely used EVM's ERC-20 token standard.
Soroban contains the so called "Stellar Asset Contract" (SAC), which is a token contract that implements the , Using a SAC contract allows users to use their (classic) Stellar account and trustline balances in Soroban.
In order to get SAC deployed we will use a function included in the command line to wrap a stellar asset in a contract
This Playgound has been developed by in collaboration with from