🔐Creating a No-Code Staking Vault in under 2 min

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!

Last updated