Links

Stake Exchange Pallet

Learn how to participate in the stake exchange pallet and supply or take liquidity for sENJ
Use console.enjin.io to use the user interface referenced in this document

Introduction

Stake Exchange Pallet enables users holding ENJ tokens to create offers for staking and allows users holding sENJ tokens to exchange them back to ENJ tokens. Each offer has preferences regarding the exchange rate and the specific type of sENJ tokens it can accept. It's important to note that sENJ tokens correspond to a different pool in the Stake Exchange Pallet. Users can select the offer that best suits their preferences and perform the token exchange accordingly. This user manual provides step-by-step instructions on how to use the pallet to stake ENJ tokens and exchange them for sENJ tokens.

Enjin Nomination Pools and Liquid Staking:

Enjin Nomination Pools are an integral part of the Stake Exchange Pallet. They serve as pools that hold ENJ tokens, and issue sENJ tokens in return. Each sENJ type corresponds to a specific pool.
Liquid Staking allows users to stake their ENJ tokens and receive sENJ tokens in return. These sENJ tokens represent the staked value of their ENJ tokens. By staking their ENJ tokens, users contribute to the security and operation of the Enjin network.
Through the Stake Exchange Pallet, users holding sENJ tokens can easily convert them back to ENJ tokens by selecting the appropriate offer from the available options. Each offer within the pallet specifies the exchange rate and the type of sENJ tokens it accepts. Users can choose the offer that aligns with their preferences and execute the token exchange accordingly.
By utilizing Enjin Nomination Pools and the Stake Exchange Pallet, users have the flexibility to stake their ENJ tokens for network participation and later convert them back to ENJ tokens when desired, providing liquidity and accessibility to their staked assets.

Glossary

sENJ Tokens: The staked version of the ENJ tokens. These tokens are represented using the StakedCollectionId collections in the pallet_multi_tokens instance.
Exchange Rate: The rate at which ENJ tokens can be exchanged for sENJ tokens and vice versa.
Liquidity Account: An account used for managing liquidity. It is associated with a specific user and holds the liquidity for their offers.

Getting Started

Ensure that you have access to an Enjin Relay Chain and have the necessary ENJ tokens to stake. The UI used in this guide can be accessed here
Accessing the Pallet Functions: Open your Enjin Explorer and navigate to the Developer -> Extrinsics interface. Locate the "Stake Exchange Pallet" and click on it to access the available functions.

Creating an Offer

  • Click on the "Create Offer" function to start the process of staking your ENJ tokens and creating an offer.
  • Enter the required parameters for the offer:
    • Total : Specify the amount of ENJ tokens you want to exchange.
    • Rate : Define the exchange rate for converting ENJ tokens to sENJ tokens.
    • minAverageCommission : Define the minimum commission you would accept for the offer.
  • Review the entered parameters and click "Confirm" to proceed.
  • If successful, you will receive a confirmation message indicating that the offer has been created. Note the generated Offer ID for future reference.

Canceling an Offer

  • If you wish to cancel a previously created offer, click on the "Cancel Offer" function.
  • Enter the Offer ID of the offer you want to cancel.
  • Click "Confirm" to proceed with the cancellation.
  • If successful, you will receive a confirmation message indicating that the offer has been canceled.

Configuring Liquidity Account

Note : Configuring Liquidity Account is only required if you create an offer aka if you provide liquidity to the pallet, you do not need to configure a liquidity account to buy tokens
  • To configure your liquidity account, click on the "Configure Liquidity Account" function.
  • The liquidity account configuration allows you to allow/disallow certain sENJ tokens from the offer created by your account. To allow an sENJ token, add the token to the whitelist and to disallow it, add it to the blacklist. These restrictions are enforced to all offers created by your account.
Example configuration to disallow sENJ tokens with tokenId 210:

Withdrawing Liquidity

  • If you want to withdraw liquidity from an active offer, click on the "Withdraw Liquidity" function.
  • Enter the Offer ID of the offer from which you wish to withdraw liquidity.
  • Specify the amount of liquidity you want to withdraw.
  • Click "Confirm" to proceed with the withdrawal.
  • If successful, you will receive a confirmation message indicating that the liquidity has been withdrawn.
Example : You created an offer with initial amount of 1000ENJ. If you withdraw liquidity of 400ENJ, then your updated offer will have a liquidity of 600ENJ.

Adding Liquidity

  • To add liquidity to an active offer, click on the "Add Liquidity" function.
  • Enter the Offer ID of the offer to which you want to add liquidity.
  • Specify the amount of liquidity you want to add.
  • Click "Confirm" to proceed with adding liquidity.
  • If successful, you will receive a confirmation message indicating that the liquidity has been added.
Example : You created an offer with initial amount of 1000ENJ. If you add liquidity of 400ENJ, then your updated offer will have a liquidity of 1400ENJ.

Buying Tokens

  • To exchange sENJ tokens for ENJ tokens, click on the "Buy" function.
  • Enter the Offer ID of the offer from which you want to buy tokens.
  • Specify the amount of ENJ tokens you want to receive.
  • Enter the Token ID for the specific token you want to exchange.
  • Click "Confirm" to proceed with the token exchange.
  • If successful, you will receive a confirmation message indicating that the token exchange has been completed. You will also receive the exchanged ENJ tokens in your wallet.
Please note that the above instructions provide a general overview of using the Stake Exchange Pallet. It is essential to refer to the Enjin documentation for more detailed information and guidance.
For any further assistance, feel free to reach out to our support team. Happy staking and token exchanging!
© 2023 Enjin Pte. Ltd.