Hydraledger DeFi Guide


Hydra is a utility token on the Hydraledger blockchain that aims to provide decentralized identifiers to enable a self-sovereign identity ecosystem. This privacy-preserving technology allows users to have complete control of their own data, while being able to authenticate themselves on the Internet.

Within this ecosystem there is no need for complicated and costly features such as smart contracts. However, our project wants to reward their long-term community and take part in the exciting and innovative field of Decentralized Finance (DeFi). To achieve this, we built a bridge between the Hydraledger and Ethereum.

1. Setting Up
the Web Wallet

The web wallet is the perfect place to hold your Hydra tokens (HYD). It is designed by our team of experts and in accordance with the latest security practices. The first step is to obtain some Hydra in your web wallet (HYD is available on the following exchanges: XT.com, STEX and Hotbit).


The web wallet works with a mnemonic or a keyfile that contains an encrypted seed. These give you control over your funds. Once you obtain HYD, you can and should transfer it to the web wallet, which interacts seamlessly with the bridge between Hydra and Ethereum.

Figure 1: The Hydra Web Wallet

2. Swapping
HYD to WHYD

To participate in the exciting world of DeFi, the bridge transports the HYD utility token to a Wrapped Hydra ERC-20 token (WHYD) at a 1:1 ratio.

 

Once you have HYD in the web wallet, you need to go through the following steps to convert them to WHYD:

1. Click on “Swap” on the Bridge website.

2.
Provide your Ethereum address.

3.
Send a Hydra transaction using the web wallet with the provided smartbridge message to the provided Hydra address (see Fig. 2 and Fig. 3).

4.
Paste the Hydra transaction ID after it is confirmed.

5.
Send a smart contract call to mint your WHYD (via MetaMask or manually).

Figure 2: The send action for Address-0 (bottom-left) and the Network Settings (top right).

Figure 3: Use the smartbridge field (red) for the smartbridge message.

The node checks the transaction and verifies the authenticity of it. If everything is done correctly,
you receive the same amount of WHYD as the amount you sent in.

3. Swapping
WHYD to HYD

The bridge node ensures that you can change your ERC-20 token to the native Hydra token at any time at a 1:1 ratio. If you have WHYD, you need to go through the following steps to convert
them to HYD:


1. Click on “Swap” on the Bridge website.

2.
Provide the recipient Hydra address.

3.
Send a smart contract call to burn your WHYD (via MetaMask or manually).

4.
Paste the Ethereum transaction ID after it is confirmed.

5.
Click on the “Claim” button to send your claim request to the Bridge.


The bridge currently supports MetaMask to call smart contracts, but you can do the swapping calls manually as well. Don’t forget that you need a certain amount of Ether to call smart contracts. Once the network confirms the transaction call, the node will check the transaction
validity and reimburse you with the correct amount of tokens.

4. Staking WHYD

The Hydraledger is a delegated Proof-of-Stake blockchain. This means that you can vote with your tokens on a delegate that participates in the consensus algorithm. The algorithm ensures that the network is secured and reaches a consistent state.

The forgers (block proposers) receive a reward in return. A smart contract mimics this mechanism, so that you’re not obligated to stake on the native Hydraledger. However, Hydra delegates gain more by being a delegate than to stake their WHYD. This ensures stability within the system.

Figure 4: The connect button is on the top right corner

The easiest way to stake your WHYD is by interacting with MetaMask and going through the
following steps:

1. Connect to MetaMask (see fig. 4).

2. Click on Stake WHYD

3. Click on the Stake tab (see fig. 5).

4. Approve the smart contract to spend your WHYD (only once).

5. Confirm in MetaMask (see fig. 6).

5. Give in the desired amount.

5. Click on the Stake button (see fig. 7).

5. Confirm in MetaMask (see fig. 8).


When the Ethereum blockchain contains the stake transaction, your rewards start to accrue in each block. These rewards can be claimed at any time. Similarly, you can unstake to remove your funds from the smart contract at any time.

Figure 5: Once you’re connected, you should see the stake tab. Click on approve if you want to stake your WHYD. A MetaMask pop-up window will appear.

Figure 6: A MetaMask pop-up window appears when sending the ‘approve’ transaction to the smart contract.

Figure 7: After approving the staking contract to move funds on your behalf, you can see the following staking interface.

Figure 8: When sending the stake transaction another MetaMask pop-up window appears.

5. Staking Liquidity

The rise of decentralized exchanges (e.g. Uniswap, Bancor, 0x, …) is part of a larger paradigm shift of removing power from large centralized corporations. Decentralized exchanges facilitate the exchange of digital assets in a non-custodial, trustless manner. This perfectly fits the vision of Hydra, which is why we decided to make our token available through the largest decentralized exchange, namely Uniswap.

 

Uniswap is an automated market maker, where users can swap a token with another one against a large liquidity pool. Liquidity Providers are individuals that lock their liquidity (in the form of two tokens) in the pool. As a reward, they distribute a 0.3% fee on all trades amongst themselves.

To incentivize liquidity we created a program that additionally rewards users for putting their liquidity to good use. During the course of a year 50 000 000 Hydra (25% of the project’s holdings) will be awarded to the community! These will be divided into a WHYD/DAI liquidity pool and a WHYD/ETH liquidity pool. To become eligible for the rewards you need to stake your LP Tokens. The following guide will walk you through the different steps: 

1. Obtain WHYD (See 2.) and ETH.

2.
Go to the bridge and click on Stake Liquidity.

3.
Select the correct pool.

4.
Approve the smart contract to spend your LP Tokens (only once).

5.
Click on ‘Add Liquidity’ (see fig. 9).

6. The Uniswap pool link opens (see fig. 10).
If WHYD doesn’t show up in your MetaMask, you can add it by clicking on ‘Add Tokens’ under Assets. The contract address for Wrapped Hydra is: TODO (we need the real ethereum address here).

7. Select the amount of liquidity you want to provide with the correct slippage rate (see fig 11.). In return you will receive LP Tokens for the given pair.

8. Go to bridge.hydraledger.io and select Staking Liquidity.

9. Stake your LP Tokens to lock up your liquidity and earn rewards (analogous to Staking
WHYD).

Once your transaction is confirmed, your rewards will automatically start to accrue. The rewards will be split into two. Half of it will be part of the long-term rewards which can be claimed after a year. The other half can be claimed at any time. If you’re interested in the elegant mathematics behind the staking algorithms, take a look here (Accrued Funding Calculation).

Figure 9: Liquidity Staking interface. Click on ‘Add Liquidity’ to get redirected to the Uniswap pool.

Figure 10: The Uniswap interface.

Figure 11: Slippage settings in Uniswap.