How to Use the Privacy-First DeFi Protocol SiennaSwap (Guide)

Secret Network
11 min readApr 13, 2022

--

Sienna is a cross-chain, privacy-first DeFi protocol that allows you to swap, lend, and convert your tokens into their private, SNIP-20 equivalent. Sienna is built on the Secret Network, the first blockchain to introduce privacy-preserving smart contracts. This unique technology allows developers to create applications that utilize fully-encrypted data, keeping your private information safe and secure.

Sienna is fully decentralized and highly scalable. Transactions cost mere cents and are confirmed within seconds. When it comes to privacy, users can bask in complete peace of mind. No login information, wallet data, or transaction history is ever saved or shared with any third party. SiennaSwap also utilizes encrypted inputs, outputs, and state, allowing users to participate in trading that is completely front-running resistant.

(NOTE: By using chainanalysis, it may be possible to uncover private data. Stay vigilant!)

Features

  1. SiennaSwap: A front-running resistant, cross-chain DEX that allows users to swap tokens in complete privacy. Sienna uses an AMM model, reliant on Liquidity Providers (LPs) who earn fees for pooling their tokens.
  2. SiennaBridge: Convert your favorite tokens from the Ethereum, Binance Smart Chain, and Monero ecosystems into their private, Secret Token equivalent (eg. sETH or sBNB). All Secret Token transactions are completely private. (NOTE: Bridge transactions themselves are not private and may be viewed publicly on a blockchain explorer).
  3. SiennaWrap: For converting tokens apart of the wider Cosmos ecosystem. Utilizes Inter-Blockchain Communication (IBC) to facilitate native, cross-chain transfers.
  4. SiennaLend: Borrow or deposit your favorite tokens both privately and completely decentralized. You can earn Sienna rewards for providing collateral and loan against your Secret Tokens when you need extra liquidity. Use this guide for all SiennaLend features.

You can learn more about Sienna here: https://sienna.network/

Read more about Secret Network: https://scrt.network

Purpose

This guide is intended to educate users on how to bridge, trade, and provide liquidity on Sienna. Support the growth of Secret DeFi by taking advantage of high, risk-adjusted yield rewards.

Pre-Requisites

  • Install Keplr wallet, an open-source browser extension wallet for the Cosmos interchain ecosystem at https://wallet.keplr.app
  • Own minimal SCRT in Keplr to be used as gas fees. SCRT can be acquired via a faucet in the Secret Discord, bought on a centralized exchange, or swapped for on Osmosis.
  • Own Secret Tokens (sSCRT, sETH/ERC-20s, sBNB/BEP20s, sXMR, SHD etc.) by swapping on SiennaSwap or by migrating assets across Secret Bridges( follow [this guide] to learn how to use bridges)

Instructions

Connecting wallet

In order to interact with the platform you first need to connect your Keplr wallet in two simple steps:

  1. Navigate to the SiennaSwap application at https://app.sienna.network/swap
  2. Connect your Keplr wallet to allow SiennaSwap to access the secret tokens in your wallet accounts.

Making a Swap

Visual Guide: https://www.youtube.com/watch?v=OrqdvQ_Y2pM

3. Navigate to the Swap tab on the left-hand menu. Make sure that you are using Sienna V2, as pictured below. The protocol went through recent upgrades aimed at improving the overall user experience and lowering barriers to entry. You can read more about the upgrade here.

4. Select the Secret Token pairing that you would like to swap. (NOTE: If you do not own any Secret Tokens, you can wrap them using Sienna’s Wrap feature at https://app.sienna.network/wrap).

5. Input the amount of Secret Token you would like to trade. Use the double-sided arrows to flip between the two Secret Tokens (the top token is the one you are selling and the bottom token is the one you are exchanging for).

6. Once you have confirmed the Secret Token amount you want to trade and the price ratio, click Swap. Due to slippage, there could be a minor difference between the expected trade ratio and the actual price at which the trade is executed. Generally, pairs with more liquidity are less affected by this problem. It is very important to check the underlying liquidity of the pair that you are attempting to transact with. Sometimes, multiple trades may be required. You can check the underlying liquidity of specific pairs at Sienna Swap (NOTE: Always make sure that you have enough SCRT in your wallet to pay for gas fees!)

7. Since Secret Tokens are private by default, users will require a viewing key to see their token’s balance. If you are attempting to trade for a new Secret Token that you have not previously owned, you will have to unlock the viewing key for the new token. Click View Balance on the swap menu and then Create Key. This will prompt a transaction that must be approved in your Keplr wallet. (NOTE: You might need to refresh the page or delete browser cookies if you see the “wrong viewing key” message and submitting the transaction again will remove the previous viewing key, find more about viewing keys and permits at [viewing keys vs permits article])

Congratulations! You have now successfully traded on SiennaSwap. You can view your Secret Token balance on the Secret Network tab of your Keplr extension wallet.

Providing Liquidity on Sienna

Liquidity Providers (LPs) are in charge of seeding all liquidity on Sienna, providing the foundation for all trades that occur on the protocol. In exchange for depositing their tokens, LPs earn 0.28% of the trading fee proportional to their share of a given pool. For example, say you deposit $100 worth of tokens into a pool that is worth $1,000. This means that you now have a 10% (100/1000) share of the total pool, and will earn 0.28% of 10% of the daily swap volume. If the 24hr swap volume was $1 million USD, you would earn $28 during that period. All data regarding volume and fees can be found on Secret Analytics.

Sienna Rewards provide Liquidity Providers with even more incentives to deposit. In exchange for providing liquidity, LPs receive what are called LP-tokens. These LP-tokens are based on the specific token pair that was deposited into. For example, if you provided liquidity to the Sienna/sSCRT pool, you would receive LP-SIENNA/SSCRT. These tokens act as a receipt, allowing users to reclaim their locked assets. They also serve as a gateway to even higher yields when staked through the protocol. Different LP-token pairs offer varying levels of return, based upon SIENNA emissions. You can view the full list of token pairs and associated rewards here.

(NOTE: Trading fees are compounded within the LP-tokens themselves and accrue automatically. Alternatively, Sienna Rewards are distributed on a daily basis and must be claimed for them to be liquid).

Before assessing if this is the right strategy for you, it is essential to understand the risks involved. For LPs, the biggest risk is impermanent loss (IL). When providing liquidity on Sienna, the protocol requires that you deposit an equal value of tokens on both sides of the pair (valued in USD). Say you had 100 SIENNA tokens valued at $500 USD that you wanted to deposit to the SIENNA/sSCRT pool. In order to do so, you would also need to deposit $500 worth of sSCRT. The total ratio in the pool always remains 50/50. Impermanent loss occurs when the price of one of your assets increases or decreases more than the other. Say you deposit to the SIENNA/sSCRT pool mentioned above. If SIENNA’s market value increases by 30% and the market value of sSCRT only increases by 20%, IL would occur. If both of your assets move in tandem, either increasing or decreasing by the same amount, no Impermant Loss occurs. This loss is considered impermanent because it is only realized when funds are withdrawn from the pool. By recording the amount of the assets you provide, you can intuitively track IL as it occurs.

Depending on volume, fees, and rewards, providing liquidity can be a highly profitable venture despite IL. To learn more about impermanent loss and whether or not becoming an LP suits your level of risk, click here.

Providing Liquidity

Visual Guide: https://www.youtube.com/watch?v=oIT5IPTH4pQ

  1. Navigate to The Pool tab on the left-hand menu.
  2. Select the Secret Token pairing that you would like to provide liquidity for. (NOTE: Not all Secret Token pools have high liquidity, which may increase your risk exposure for impermanent loss. You can view pools with higher liquidity here).

It is also important to note that not all liquidity pools are subject to additional Sienna Rewards incentives. You can check for active rewards pairs on the Rewards tab.

3. Input the amount of each token that you would like to provide. Remember, you must provide an equal value of each. If this is your first time providing liquidity for these tokens, you will need to approve them. This will occur in your Keplr wallet and will require minimal SCRT for gas fees. (NOTE: You only have to approve tokens once, meaning you will never have to approve again when adding more to this pool).

4. The final step is to click Provide, confirming your liquidity addition. This will execute a transaction that will need to be approved on your Keplr wallet extension.

Congrats, you have successfully added liquidity on Sienna! You now own a share of the liquidity pool, represented as an LP-token. Like every other Secret Token, you will need to unlock the viewing key in order to view your LP balance in your Keplr wallet:

  • Use The Pool tab and select your Secret pairing.
  • Select View Balance beside “Your Current Pool Share [?]”
  • Select Create Key and approve the transaction in your Keplr wallet.
  • You will now be able to view our LP-token balance in your Keplr wallet. LP-tokens will differ based on the liquidity pool you have selected.

Staking your LP-tokens

By owning a share of the liquidity pool, you automatically earn fees when the pool is used for SiennaSwap trades. However, you can earn additional yield by staking your LP-tokens on select incentivized pairs. (NOTE: Rewards are paid in SIENNA and are dispersed after every epoch. They may be claimed once every 24 hours. You are subject to the highest possible yield if you claim them on a daily basis, as other users joining the pool may reduce your unclaimed rewards).

  1. Use the left-hand menu to select My Rewards. Choose the pair that you provided liquidity for. Sienna will display the current rewards rate and associated APR.

2. You will now see a multitude of potential actions regarding your LP-tokens, so lets take them one step at a time.

  • The first step is to deposit your LP-tokens. Use the Deposit tab and input the number of tokens you wish to deposit. This will execute a transaction on the blockchain and will need to be confirmed in your Keplr extension wallet. (NOTE: If you are trying to input 100% and receiving an error, try putting a little less 99.99% as you may be encountering a rounding issue).
  • After depositing, you will need to generate a Viewing Key in order to see the rewards in your wallet. Select Create Viewing Key and approve the transaction on Keplr.
  • Use the Claim Rewards tab to periodically claim your LP-token rewards. Rewards are distributed on a daily basis. These rewards can be claimed and re-staked for even higher yields. It is important to note that rewards are distributed based upon your share of the total liquidity pool. The higher your share, the more rewards you will earn.
  • If you wish to withdraw your LP-tokens for any reason, select the Withdraw tab. Remember, if you withdraw your tokens you will no longer be eligible for rewards.

Withdrawing liquidity

If you wish to withdraw liquidity, you will first need to withdraw your LP-tokens from their rewards pool (if applicable).

  1. Navigate to the Your Rewards tab on the left-hand menu.
  2. Select “Your rewards pairs” and then click “Withdraw.” This will execute a transaction that must be approved in your Keplr extension wallet.

3. After withdrawing your LP-tokens from their rewards contract, navigate back to The Pool tab.

4. Select “Withdraw” and enter the number of tokens you wish to withdraw from the liquidity pool. You will once again be prompted to approve the transaction on your Keplr wallet. (NOTE: when you withdraw from the pool you will receive a 50/50 distribution of your Secret Tokens based on their current price ratio. This is where you may experience impermanent loss. Make sure to consider this before withdrawing your tokens).

That’s it! You have successfully withdrawn your tokens from the pool and are no longer providing liquidity on Sienna. (NOTE: If you are trying to withdraw liquidity from V1, you are still able to do so. Follow the guide in the docs here, or contact support via the Sienna Discord).

What’s Next?

Hopefully, you now have a better understanding of how to bridge, swap, and provide liquidity on Sienna.

Sienna allows you to trade in complete privacy while experiencing ease-of-use, lightning-quick transaction speeds, and strikingly-low fees. The AMM is 100% front-running resistant, bringing about greater levels of trading equality for all of its users.

There are countless opportunities to earn high yields when participating in Secret DeFi. Stay in touch with Sienna and Secret and explore all that the network has to offer.

Want to use SiennaLend? Use this guide to borrow or deposit your Secret tokens — Guide

Learn more about Sienna by joining their community in Discord or on Telegram.

You can learn more about the Secret Network ecosystem at https://scrt.network

--

--

Secret Network

The Data Privacy Platform For Web3 — build and use blockchain applications that are both permissionless and privacy-preserving.