πCreating a No-Code Staking Vault in under 2 min
Last updated
Last updated
With xHashtag, you can now create a fungible token and launch a liquid staking vault, all in under 2 min. Let us walk you through what weβve built.
Step 1: Point the dApp to a Supported Chain (KCC/Avalanche/GateChain)
Navigate to the xHashtag dApp by visiting the following links:
Mainnet: app.xhashtag.io Testnet: app-test.xhashtag.io
On the xHashtag dApp, choose the appropriate network. In this example, we chose KCC. But you have other options to choose from as well.
Step 2: Creating a Token
The dApp now opens with the βKCCβ network mentioned on top, and the default tab chosen would be βCampaignsβ. Click on the βLaunch Staking Vaultsβ option on the left sidebar.
Here, you would see the option to βCreate a Vaultβ, where you would need to complete steps like βCreate/Add Tokenβ, βCreate Staking Vaultβ and βSave Vaultβ.
For now, press the βDeployβ button next to the βCreate/Add Tokenβ option.
Step 3: Enter details of your token
The βCreate ERC20 Tokenβ popup will now show up, where you would need to manually enter the βNameβ of the token you are creating and the βSymbolβ. The token βDecimalβ field will be auto-populated with a default value of 18, and this can be modified based on your use case.
Once you have entered these details, press the βCreate ERC20 Tokenβ button.
In the below example, we have named the token βKuShibaβ, with the symbol βKSHIBβ and decimals set to β18β, the default value.
Step 4: Approve the Token creation by paying the Gas fees
On pressing βCreate ERC20 Tokenβ, you would require to pay a small amount of gas fees, denominated in $KCS. So, make sure you have sufficient funds to process the transaction on MetaMask.
Step 5: Confirm all the details
Once all the approvals have been provided and the token is created, you will notice that you have the contract address shown for the Deployed ERC20 Token. Save the contract address for future reference and simply press the X button to proceed.
Step 6: Mint Tokens
You will now be taken back to the Create Vault window, where you will have the option to βMint Tokensβ. Click on it.
Choose the number of tokens you wish to mint.
Another MetaMask popup will appear, press confirm to pay the necessary gas fees and mint the tokens.
Step 7: Creating Liquid Staked Tokens
Next, letβs deploy sToken, which is basically a receipt token thatβs given to the users when they stake the actual token. In this example, when somebody stakes KSHIB, theyβll receive sKSHIB, a liquid-staked yield-bearing token that is transferable and earns yield in the staking vault.
sKSHIB can have various use cases such as DAO governance or as collateral for loans.
Now, letβs deploy by clicking βDeployβ next to the βEnter sToken Addressβ field.
The popup window will automatically fetch the token contract address from the first field. Itβs possible to create a sToken without deploying a new token by pasting the contract address of your existing token in the first input field.
Again, approve the transaction on MetaMask by paying the requisite gas fees.
Once the process is complete, you will see a message below with the deployed liquid stake token contract address. Please save the contract address for future reference.
Step 8: Creating the Liquid Staking Vault
Once you see that the two token addresses are shown below, you may proceed to deploy the staking vault. Press βDeployβ next to the βCreate Staking Vaultβ option.
You will get a screen that contains the contract addresses pre-filled, alongside 3 fields that you would need to manually enter.
Step 9: Configuring the Staking parameters
You will need to manually enter the βVesting Period/Staking Durationβ in days, the βFixed Interest Rateβ you wish to provide for the staking duration and the βMaximum Limitβ for your staking vault exceeding which the vault will no longer accept further deposits. Once you have entered these details, press βCreate Staking Vaultβ.
Post this, you may receive 2 Metamask notifications, which you will need to accept. Again, ensure you have sufficient funds denominated in KCS for gas fees.
You will now see that the liquid staking vault has been created successfully, with the contract address displayed. You may now close this window by pressing βXβ.
Step 10: Funding and Saving the Vault
You will now be back on the βCreate Vaultβ page, where you can see that the contract address has been updated next to the βCreate Staking Vaultβ option. You can now proceed to fund the vault by pressing the βFund Vaultβ button.
Choose the number of tokens you wish to add to the rewards vault in order to give out the fixed interest rate paid out during the vault duration. Approve any Metamask pop-ups that appear, and pay the necessary gas fees.
Once your vault is funded, you can now save it. Verify the details on the βSave Vaultβ pop-up and press βSave Vaultβ.
Approve any MetaMask popups that appear, and once the process is complete, you will see βDone!β next to the βSave Vaultβ button.
Step 11: Verifying the created Vault
You can now proceed to the βStaking Vaultsβ tab, by choosing it from the left sidebar. Now click on the newly created vault, to transact on that vault.
In this example of the KSHIB vault, the vault runs for a period of 30 days, with the mentioned APR. The vault limit is 1000000, so you may deposit any amount within that limit. All details are clearly displayed on the screen, for easy deposits and claims.
Step 12: Funding and Claiming Deposits
You first need to select the corresponding vault from the list, then the below pop-up appears.
To approve the vault deposit transaction, first click on βApproveβ.
After the token access approval has been granted by the user, you can now deposit whatever amount you wish to deposit, within the mentioned vault limit. On entering the Deposit amount and pressing βDepositβ, you will be prompted with a MetaMask popup, accept it and you will see a couple of messages confirming the transaction as seen below.
Once this is done, you can see your updated balance on the vault and the amount available for claiming. The claim process is as simple as the press of a button, and the accumulated earnings can be linearly claimed across the vault duration. Thatβs it!