Lydra Basics

Lydra = Liquid Hydra

On Block 1,160,400 — mined on Friday at 09:59:08 AM (UTC), on the 7th of July, 2023 — LYDRA was born.

LYDRA marks the most important milestone of the Hydra 2.0 vision whitepaper.

I. What is Lydra?

In a nutshell, Lydra is the derivative asset for Liquid Staking Hydra. Here is what is possible with Lydra:

  • Anyone who owns HYDRA can mint the same amount of LYDRA. While staking and delegation is possible in parallel, it is not a requirement;

  • Minting LYDRA effectively locks up the corresponding amount of HYDRA, therefore ensuring that the total supply does not increase. Unlocking your HYDRA requires the same amount of LYDRA to be restored in your wallet address;

  • Minting or using LYDRA is completely optional. Stakers can continue without changes, if they don’t want to take advantage of the feature;

  • LYDRA will unlock several new options for stakers, including leveraged staking and hedged positions. For example, by selling LYDRA for HYDRA and restaking the HYDRA, stakers can achieve a boosted staking APY when measured against their base amount. Dedicated materials will be shared with the community about the risks and opportunities that come with it;

  • A HYDRA/LYDRA liquidity pool will be launched on the Hydra DEX;

  • LYDRA will take over the role of the main liquidity pair on the Hydra DEX.

II. Basic commands

The commands below can be used in the Console of the GUI staking wallet (hydra-qt) or in command line using the Daemon staking wallet with Cli (hydrad with hydra-cli).

1. Getting information about your available Lydra and locked Hydra

getlydrainfo "address"

Example using the console in the GUI wallet:

This is an example for 300 LYDRA minted (and corresponding 300 HYDRA locked up).

2. Minting Lydra (Locking up HYDRA)

mintlydra "address" (lockAmount)

Example using the Console in the GUI wallet:

The same amount of HYDRA will be locked in the process.

Attention!

When you lock Hydra to mint Lydra, the locked amount of Hydra is sent to the smart contract and returned back to the user address with the Lydra corresponding to the locked amount of Hydra. This transaction requires gas and the more UTXOs the transaction involves, the bigger the transaction will be and the more gas will be needed.

Please note that there is a 50kB max size restriction for a single transaction!

Bigger balances, e.g. 1M Hydra, will need to do several mints if the user wants to mint the entire Lydra of his account (assuming he/she has lots of UTXOs).

3. Burning Lydra (Unlocking HYDRA)

burnlydra "address" (unlockAmount)

Example using the Console in the GUI wallet:

The same amount of Hydra will be unlocked in the process.

III. Delegating and minting Lydra

Delegators have the option to delegate and mint Lydra at the same time. It is possible to choose to lock the whole balance (1.) and get the corresponding Lydra or to lock only part of the balance (2.) and get Lydra only for that locked part. It is also possible to delegate without locking any Hydra and respectively without minting Lydra (the checkbox is left unchecked).

Here is the "delegation" command with Cli:

setdelegateforaddress "staker-address" fee "address" ( gasLimit lockAmount )

Attention!

When you lock Hydra to mint Lydra, the locked amount of Hydra is sent to the smart contract and returned back to the user address with the Lydra corresponding to the locked amount of Hydra.

This will consolidate the UTXOs used for the locked Hydra into a single UTXO. If you lock the whole balance, then the whole balance will be consolidated into a single UTXO. Now as you delegate you would want to optimize the number of UTXOs in your wallet, to split that newly received UTXO into smaller ones.

IV. Removing delegations and burning Lydra

Removing the delegation also gives the option to burn Lydra. The user can choose to burn all Lydra available in the wallet and unlock the corresponding Hydra (1.), or specify a particular UnlockAmount and burn only part of the available Lydra in the wallet (2.).

Here is the "remove delegation" command with Cli:

removedelegationforaddress "address" ( gasLimit unlockAmount )

V. Reserve when minting Lydra

When minting Lydra, users cannot be left with less than 5M gas equivalent of freely movable Hydra in their address! For example at the current gas price of 0.00000422 Hydra, this would equal to 0.00000422 x 5,000,000 = 21.1 HYDRA that needs to be kept as a reserve and therefore can not be locked. The gas price can be checked on https://explorer.hydrachain.org/.

This is set as a precaution for users to not end up in a locked state where they must buy new Hydra in order to pay for transaction fees on the chain.

In case the user has minted Lydra (locked corresponding Hydra) with their entire available balance and afterwards also spent the reserve of Hydra, to make any further transactions they will have to buy and send more Hydra to their address, or wait for new staking rewards to roll in, which can be used for making new transactions.

VI. Optimizing UTXOs when delegating and minting Lydra

Delegating with minting Lydra (and locking the corresponding amount of Hydra) will merge the used UTXOs for the locked amount into a single UTXO. The delegator can optimize the UTXOs using the SPLIT button in the Delegations tab.

Bigger balances may require splitting in more than one step, because of the 50KB max size restriction for a single transaction, mentioned earlier in this doc.

We therefore recommend splitting/optimizing your UTXOs after making the delegation (if you want to mint Lydra).

Delegating without minting Lydra (and locking Hydra) will not move any Hydra, and thus no additional optimization of the UTXOs in the wallet is required (in case optimization has been done before the Delegation).

  • To Optimize / Split your UTXO's using the staking client (GUI) you can refer to this Guide here.

  • To Optimize / Split your UTXO's using the console, click on Help -> Information Window -> Console tab. Here one can use the splitutxosforaddress command with the default 100 minimum size and 200 maximum size and 100 outputs

splitutxosforaddress "address" minValue maxValue maxOutputs
  • To Optimize / Split your UTXO's using CLI

./hydra-cli splitutxosforaddress "address" minValue maxValue maxOutputs

An Example command for the console or CLI to split the Hydra to UTXO's between 100 and 200 Hydra upto a maximum of 100 UTXO's (this will cost some fees depending on how many UTXO's are being split)

splitutxosforaddress H7FYCLijimtbYk7gdN1hmweftuWLQni3m5 100 200 100

Last updated