How to Launch Your Own Saga Chainlet: A Guide

Saga

Oct 24, 2024

7 min read

How to Launch Your Own Saga Chainlet: A Guide

In the rapidly shifting landscape that is blockchain technology, building can get complicated. Keeping things simple (when you can!) makes a whole lot of sense. With its adorably-named “chainlets”, the team at Saga - a wrap-around solution for blockchain application development - has set out to help builders, creators, and developers do just that. 

In this comprehensive guide, we'll walk you through the process of creating and launching your own Saga chainlet and unlocking the potential of your decentralized application.

What is Saga?

Saga is a cutting-edge Layer 1 blockchain protocol built on the robust Cosmos SDK. It empowers developers to create and deploy application-specific blockchains, known as chainlets, with relative ease. Saga's primary focus is on providing a scalable, secure, and customizable infrastructure, particularly catering to the burgeoning gaming and entertainment sectors in the Web3 space.

Understanding Saga Chainlets

A Saga chainlet is more than just a smart contract – it's a sovereign, customizable blockchain that inherits security and decentralization from the Saga mainnet. The team at Saga describes their chainlets thusly:

“In essence, a Saga Chainlet is a sovereign blockchain with a VM module running a single smart contract. Because each Chainlet contains only the smart contracts a developer or team would like to deploy on a single chain, the developer has a flexible and usable development environment.”

Chainlets offer several advantages over traditional smart contract deployments:

  • Dedicated blockspace
  • Enhanced customizability
  • Improved performance
  • Greater control over the blockchain environment

With chainlets, developers can enjoy these benefits without the enormous complexities of building and managing a blockchain from scratch.

Here’s how you can create and launch yours…

Step-by-Step Guide to Creating and Launching a Saga Chainlet

Step 1: Prepare Your Environment

Download Keplr Wallet
Download Keplr Wallet from https://www.keplr.app/get

Before you embark on your chainlet creation journey, ensure you have the following prerequisites:

  1. A Cosmos SDK-compatible wallet (e.g., Keplr Wallet)
  1. Sufficient SAGA tokens
  • You'll need these for the setup fee and a 30-day upfront deposit of the epoch fee. 
  • *Note As for exact figures for this, the SAGA Development Team has explained the cost of operating a SAGA chainlet as follows: “Our current estimate for chainlet cost is ~$500 per month. Our goal is to make it sub-100 dollars per month per chainlet. There is essentially no infrastructure product out there that can match.”
  1. Access to the Saga Web App (https://app.saga.xyz/)

Step 2: Connect Your Wallet

Connecting with Keplr Wallet
Navigate to https://app.saga.xyz/launch
  1. Navigate to https://app.saga.xyz/
  2. Look for the "Connect" button in the top right corner and click it
  3. From the options presented, select Keplr Wallet
  4. A prompt will appear in your Keplr Wallet – approve the connection request

Step 3: Navigate to the Launch Tab

Launch Saga Chainlet
Image source: docs.saga.xyz

Once your wallet is connected, locate and click on the "Launch" tab in the Saga Web App interface.

Step 4: Configure Basic Chainlet Settings

Configure Chainlet settings
Image source: docs.saga.xyz

It's time to breathe life into your chainlet. Fill in the following details:

  • Chainlet Name: Choose a unique, memorable name for your chainlet
  • Token Denomination: Specify the denomination for your chainlet's native token
  • Credit Duration: Set the number of days of credit (minimum 30 days)
  • EVM Account Address: Enter the Ethereum-compatible address for initial token allocation
  • Initial Token Amount: Specify the amount of tokens to allocate to the EVM account at the genesis

Note: Want to add multiple EVM accounts? Simply click the "+" sign next to the EVM token amount field.

Step 5: Consider Advanced Options (Optional)

Adjust advanced Chainlet settings
Image source: docs.saga.xyz

For those looking to fine-tune their chainlet, click the "Settings" icon to access advanced launch options. Available options include:

  • Fee Return Account: Specify an account to accumulate transaction fees
  • Base Gas Fee: Toggle this option to set a custom base gas fee for transactions on your chainlet

Step 6: Launch Your Chainlet

Launch Saga Chainlet
Image source: docs.saga.xyz

You're almost there! Follow these final steps:

  1. Carefully review all entered information for accuracy
  2. Click the "Launch Chainlet" button
  3. A Keplr Wallet prompt will appear – review the transaction details and click "Approve" to confirm

Step 7: Monitor Your Chainlet

Monitor your Saga Chainlet
Image source: docs.saga.xyz

Congratulations! Your chainlet is now being created. You can monitor its status in the Saga Web App dashboard.

Technical Deep Dive

Chainlet Security

Saga chainlets leverage Interchain Security, inheriting the robust security and decentralization level of the Saga mainnet. This means your chainlet benefits from the collective security provided by Saga validators without the need to manage your own validator set.

Escrow Account and Billing

When launching a chainlet, funds are allocated to an escrow account using SAGA tokens. This account functions like a prepaid service, covering the costs associated with running your chainlet.

  • The escrow account can be pre-funded to any desired amount
  • If the deposited fee is depleted, the chainlet goes offline until more SAGA is deposited
  • Fees are determined per epoch, with one epoch lasting approximately one day

Musical Chair Auction

Saga employs a unique "Musical Chair Auction" to determine chainlet operation costs:

  • Before each epoch, Saga validators submit bids for running chainlets
  • Bids are locked before the epoch starts
  • Only a set number of validators with the lowest bids (the "Winning Set") are selected
  • The final cost is determined by the highest bid within the Winning Set

This innovative mechanism establishes a fair, market-driven price for running chainlets while incentivizing validators to submit competitive bids.

VM Compatibility

While initially supporting the Ethereum Virtual Machine (EVM), Saga aims to be VM-agnostic in the long term. This means future support for other VMs like CosmWasm or JavaScript VM, offering developers more flexibility in choosing their preferred development environment.

Gas Fees and Tokenomics

Chainlets offer flexible options for handling gas fees:

  • Gas fees can be paid in SAGA, the chainlet's native token, or even be set to zero (gasless transactions)
  • Developers have control over where gas fees are directed, allowing for custom monetization strategies

Scalability and Performance

Chainlets provide dedicated blockspace, which can significantly improve performance and scalability compared to shared smart contract platforms. This is particularly beneficial for applications requiring high transaction throughput, such as games or social platforms.

Best Practices and Tips

Funding Strategies

Consider different strategies for funding your chainlet's escrow account:

  • Direct funding with SAGA tokens
  • Staking SAGA with the escrow account to cover fees through staking rewards
  • Allowing sponsors, communities, or DAOs to pay the fee
  • Implementing an IBC mechanism to convert other cryptocurrencies into SAGA for fee payment

Tokenomics Design

Carefully consider your chainlet's tokenomics:

  • Determine the initial token supply and distribution
  • Plan for any future token emissions or burns
  • Consider implementing staking mechanisms if applicable to your use case

Governance and Upgrades

While chainlets offer sovereignty, plan for future governance and upgrade mechanisms:

  • Decide on governance structures (e.g., on-chain voting)
  • Plan for potential upgrades to your chainlet's functionality

Monitoring and Maintenance

Regularly monitor your chainlet's performance and escrow account balance:

  • Set up alerts for low escrow account balances
  • Monitor transaction volumes and adjust resources as needed

Have questions? So did we! To get them answered, we went straight to the source: the SAGA development team. Here’s what they had to say…

A Quick Q&A with the SAGA Dev Team

Are all chainlets permissioned by default, meaning the chainlet creator can deploy applications/smart contracts on it?

“The default is actually permissionless, but you can put a flag called “--dac-enable” when you create your chainlet to make it permissioned. A bit more detail is available here: Launch your Chainlet on Mainnet | Saga Docs

How does a project add its own smart contracts to the chainlet? Is there a way for others to submit contracts on it too, or is this a parameter the chainlet creator can set?

“If dac-enable is on, only the specific wallets you specify can deploy smart contracts on the chain.”

How can creators bridge tokens to the chainlet, like assets needed to run a gaming/Defi application?

“Currently, the chainlet dev needs to set up a bridge themselves. We have tutorials on how to do this with hyperlane. However, we have the liquidity integration layer (LIL) coming soon that automatically sets up bridges across all chainlets.”

Can you delete a chainlet and get the assets in it refunded if things don’t work out?

“You just stop paying the chainlet costs and it closes down your chainlet. The assets you have bridged need to be unwound before you do this.”

Final Thoughts

Launching a Saga chainlet offers a unique blend of sovereignty, performance, and ease of deployment for blockchain applications. By following this guide and understanding the technical considerations involved, developers can leverage Saga's infrastructure to create scalable, secure, and customized blockchain environments for their applications.

Remember that while Saga simplifies many aspects of a blockchain deployment, the successful operation of a chainlet still requires careful planning, ongoing management, and a deep understanding of your application's needs and the broader blockchain ecosystem.

You are now ready to dive into the world of Saga chainlets. The future of decentralized applications awaits – start building today!


DISCLAIMER: This is not financial advice. Staking, delegation, and cryptocurrencies involve a high degree of risk, and there is always the possibility of loss, including the failure of all staked digital assets. Additionally, delegators are at risk of slashing in case of security or liveness faults on some protocols. We advise you to do your due diligence before choosing a validator.

Stakin is Live on Saga Mainnet

Stakin is Live on Saga Mainnet

Apr 09, 2024

2 min read

An Introduction to Saga Protocol

An Introduction to Saga Protocol

Mar 14, 2024

4 min read

Subscribe to Stakin Newsletter

Stay informed about the latest trends in the blockchain ecosystem and gain expert insights from a leading Web3 operator.