Stellar Native Assets and Soroban Smart Contracts

Have you ever thought about tokenization on the Stellar blockchain and the best way of issuing your assets in a fast and cheap way? Then you may have noticed there are two ways to achieve this:

  1. Stellar built-in digital assets (classic Stellar assets)
  2. Soroban smart contracts

Both are different components within the Stellar network that serve distinct purposes. This article provides an overview of each, evaluating their strong and weak sides.

Stellar built-in digital assets

Stellar built-in digital assets or classic Stellar assets are native to the Stellar protocol, making them straightforward to create and manage. They are a popular choice for many users due to their simplicity and the robust support provided by the Stellar network.

Classic Stellar assets can include currencies (like USD or EUR), cryptocurrencies, commodities, securities, loyalty points and many more. They are created and managed using the Stellar Consensus Protocol (SCP) and utilize the Stellar decentralized exchange (DEX) for trading. Stellar’s design allows easy interoperability between different assets and currencies.

Creating and transferring token assets on Stellar is straightforward and fast, with built-in controls for approving, revoking, and freezing assets. Additionally Stellar offers features like KYC (Know Your Customer) and AML (Anti-Money Laundering) compliance, which are essential for financial institutions. The assets can also be traded on Stellar’s built-in DEX, which provides liquidity and trading opportunities without needing third-party exchanges.

Trust lines are fundamental when dealing with Stellar Token Assets. Without establishing a trust line, a user cannot hold or trade any token assets. The mechanism enforces trust between asset holders and issuers, ensuring that only users who trust the issuer can hold their assets. As Trust lines are an essential component when it comes to Stellar Token Assets and one could argue that it could complicate certain use cases (as it requires manual setup by the user, for instance) there is a dedicated chapter on that below in this article.

Advantages of Stellar built-in digital assets

  1. Native Support: These assets are inherently supported by the Stellar protocol, ensuring seamless integration and operation within the network.
  2. Quick Creation: Creating a built-in digital asset is a fast and simple process, allowing for rapid deployment.
  3. Rich Features: Stellar’s built-in assets come with a suite of features, including:
    • Clawback: Enables asset issuers to revoke assets under certain conditions.
    • Allowlist and Blocklist: Provides control over who can hold or transact with the asset.
    • Path Payments: Facilitates multi-hop payments, increasing liquidity and reducing costs.
    • Decentralized Exchange: Built-in assets can be traded on Stellar’s decentralized exchange.
  4. Trustlines: Users must accept the asset by establishing a trustline, ensuring they are aware and willing to hold the asset.
  5. Security: Built-in digital assets on the Stellar protocol do not allow custom implementations, eliminating security bugs and increasing overall security.

Disadvantages of Stellar built-in digital assets

  1. Limited Functionality: The capabilities of built-in assets are confined to what the Stellar protocol natively supports, potentially restricting more complex use cases.
  2. Trustlines Requirement: While trustlines ensure user consent, they add an extra step for asset distribution, which can be a drawback in some scenarios.

Soroban Smart Contracts

Soroban is Stellar’s smart contract platform, introduced to enable complex programmable logic on the network. It allows developers to write and deploy smart contracts using WebAssembly (WASM) for more sophisticated decentralized applications (dApps).

Soroban contracts enable complex logic and automation, allowing developers to create dApps, DeFi protocols, and more advanced use cases. Built on WebAssembly, Soroban aims to provide high performance and security for smart contract execution. With smart contracts, the range of possible applications expands significantly beyond simple asset transfers, enabling innovation in various sectors. In addition, they can interact with existing Stellar token assets, adding programmability to the asset layer.

Costs of increased complexity

With the extended possibilities that smart contracts offer, one has to weigh up the disadvantages they imply compared to Stellar Token Assets. Generally speaking, developing and managing smart contracts is more complex than handling simple token assets, requiring specialized knowledge. This increased complexity impacts directly or indirectly costs of a project.

Running smart contracts typically involves higher computational resources and potentially higher fees compared to basic transactions. And as with any smart contract platform, there are inherent risks of bugs and vulnerabilities, which can lead to significant financial losses if exploited. Although those security risks could be mitigated by an external audit of the smart contracts, it is another cost factor to be considered.

Last but not least the adoption is not as high as compared to other smart contract platforms such as Ethereum, as Soroban is relatively new compared to the core Stellar features, so it might take time for widespread adoption and for the ecosystem to mature and developers to get familiar with the stack.

Advantages of Soroban Smart Contract Tokens

  1. Flexibility: Developers can program any feature they need into Soroban smart contracts, enabling the creation of highly customized tokens.
  2. No Trustlines: Unlike built-in assets, Soroban smart contracts do not require trustlines, simplifying the process of distributing assets, such as through airdrops.

Disadvantages of Soroban Smart Contract Tokens

  1. Security Risks: Smart contracts can be susceptible to bugs and security vulnerabilities, necessitating thorough testing and auditing.
  2. Complex Creation: Developing Soroban smart contracts is more complex compared to creating built-in assets, requiring advanced programming skills.
  3. Missing Built-in Features: Soroban tokens lack some of the native features of built-in assets, such as path payments and decentralized exchange integration.
  4. Higher Costs: The complexity and need for audits make the creation and maintenance of Soroban smart contracts more expensive.

A word on Trust Lines

Trust lines are an essential concept within the Stellar network that relate specifically to Stellar built-in assets. While trust lines themselves are specific to built-in assets, Soroban Contracts can interact with these assets and thus indirectly involve trust lines. For example, a smart contract might manage or check trust lines as part of its logic. Furthermore, smart contracts can be designed to automate the creation, management, and verification of trust lines, potentially simplifying user interaction with complex asset ecosystems.

A trust line in the Stellar network is a record that allows a user to hold a specific token asset issued by another account. Before you can hold or trade any token other than the native Stellar Lumens (XLM), you need to establish a trust line for that asset, so it ensures trust between asset holders and issuers. To hold a token asset, a user must create a trust line to the issuing account. This action signifies that the user trusts the issuer to honor the value of the asset. The user also sets a limit on how many units of the asset they are willing to trust. Once established, the trust line allows the user to receive, hold, and send the asset, up to the specified limit.

When evaluating the strong and weak sides of the trust lines, the following benefits are important:

  • Security and Control: Users have control over which assets they can receive and hold, providing a security measure against unwanted or malicious tokens.
  • Flexibility: Users can set limits on trust lines, defining how much of an asset they are willing to hold.
  • Transparency: Trust lines provide transparency regarding which assets a user has agreed to hold, enhancing the clarity of asset management.

However, the trust lines also have some drawbacks that should be taken into consideration, such as:

  • Manual Setup: Users must manually set up trust lines for each asset they wish to hold, which can be cumbersome, especially for those interacting with many different assets.
  • Resource Consumption: Each trust line consumes a small amount of the user’s account balance (in XLM) as a reserve, which can accumulate and reduce the effective balance available for transactions.
  • Complexity for New Users: Understanding and managing trust lines adds a layer of complexity that might be challenging for users new to the Stellar ecosystem.

Conclusion

To sum it up, choosing between Stellar Token Assets and Soroban Contracts depends on the specific needs and goals of the project. For simple, efficient asset transfers and trading, Stellar Token Assets are optimal. For more complex applications requiring programmability and automation, Soroban Contracts offer the necessary tools and flexibility.

Stellar Token Assets are best suited for straightforward value representation and transfer, with built-in compliance and ease of use, whereas Soroban Contracts provide advanced programmability and are ideal for creating complex decentralized applications but come with increased complexity and resource requirements.

Further Information

For further reading and detailed information, refer to the following sources:

  1. Anatomy of an Asset on Stellar
  2. Stellar Tokens Documentation
  3. Native Tokens vs. Soroban Tokens Comparison