# Official HLiquity Documentation

HLiquity, a fork of the successful Liquity Protocol on Hedera network !

## Summary

HLiquity is a decentralized borrowing protocol allowing users to take out interest-free loans using HBAR as collateral. These loans are paid out in HCHF, a stablecoin pegged to the Swiss Franc (CHF), a currency recognized for its reliability and strength, and require a minimum collateral ratio of 110%.

The security of loans is enhanced through a Stability Pool containing HCHF, providing a safeguard to maintain the  necessary collateral levels. Additionally, the collective backing by borrowers serves a comprehensive safety mechanism.

To explore the protocol's functionalities in detail, we encourage you to review the following comprehensive documentation.

**HLiquity operates as a non-custodial, immutable, and governance-free protocol.**

<figure><img src="https://1282719831-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdOugjUxmY2aYPyUtqNtg%2Fuploads%2F1T4uSv0vZ2eWC6CUekSy%2Fgrafik.jpg?alt=media&amp;token=e69001cd-686b-4bdc-9203-7956e1d21773" alt=""><figcaption><p><strong>HLiquity</strong> refers to the Liquity protocol forked on Hedera</p></figcaption></figure>

{% content-ref url="/pages/wYzirFj4qrUHUl7oZp7S" %}
[Overview](/overview/overview)
{% endcontent-ref %}

{% content-ref url="/pages/jfiEL0HRPGzhXz3n7LIO" %}
[Deep Dive](/deep-dive/borrowing)
{% endcontent-ref %}

{% content-ref url="/pages/K6HKYKOkQjHVowNlvR3J" %}
[Fundamentals](/fundamentals/hlqt-tokenomics)
{% endcontent-ref %}

{% content-ref url="/pages/1JiFKCplUWIhTCWJkCrw" %}
[Documentation](/documentation/links)
{% endcontent-ref %}


# Overview

HLiquity as a protocol is non-custodial, immutable, and governance-free !

### Introduction to HLiquity

HLiquity is a powerful decentralized finance (DeFi) borrowing protocol operating on the Hedera network. It is a fork of the well-established, thoroughly audited, and very successful Liquity Protocol on Ethereum. The protocol provides interest-free loans using HBAR as a collateral.

### HCHF: The Stablecoin

Loans are paid out in HCHF, a stablecoin pegged to the Swiss Franc, recognized for its reliability and low inflation. The Swiss Parliament's ratification of the DLT Act in 2020 marked a crucial development, solidifying Switzerland's role as a leader in the blockchain and fintech industries through the establishment of transparent legal and regulatory guidelines.

### **HLiquity: Bridging DeFi Gaps on Hedera**

HLiquity pioneers in integrating Swiss Franc's value into the decentralized finance (DeFi) world, directly addressing its global underrepresentation. This initiative not only diversifies Hedera's DeFi ecosystem but also plays a vital role in its development and expansion.

### **Enhanced Security Features**

The protocol enhances the security of loans using a Stability Pool containing HCHF, providing a safeguard to maintain necessary collateral levels. Additionally, the collective backing by borrowers serves a comprehensive safety mechanism.

### Introducing HLQT Token

HLiquity further introduces the HLQT token, awarded to participants in the ecosystem. This token is crucial for the decentralized incentive system, offering rewards to those who stake HLQT and contribute HCHF to the Stability Pool, enhancing the protocol's liquidity.

### Non-custodial, immutable, and governance-free

The HLiquity protocol is non-custodial, immutable, and governance-free, ensuring the utmost transparency and efficiency in DeFi lending. The protocol includes a Redemption Mechanism, allowing HCHF to be exchanged for HBAR, thereby upholding the stablecoin's value.

### HLiquity mechanism&#x20;

<figure><img src="https://1282719831-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdOugjUxmY2aYPyUtqNtg%2Fuploads%2FnUaA9eCWu064INSOGhvI%2Fgrafik.jpg?alt=media&amp;token=ec1ca584-9c38-4930-a87b-2fe0e30717ac" alt=""><figcaption><p>Terminology: <strong>HLiquity</strong> = Liquity fork on Hedera; <strong>HF (=HCHF) refers to the Hedera-based Swiss Franc</strong>; <strong>HLQT</strong> to the Hedera based  protocol token. </p></figcaption></figure>

### HLiquity as a protocol is non-custodial, immutable, and governance-free !


# New Features

## Liquity protocol fork

HLiquity is a fork of the widely recognized and successful Liquity protocol on Ethereum, adapted for the Hedera network. Liquity has established its reputation as a robust borrowing platform, and HLiquity's mission was to retain the core structure of the original protocol without significant alterations. However, operating on the Hedera Network necessitated some adjustments; for instance, HLiquity uses HBAR as its collateral and issues the HCHF stablecoin, which is tied to the stable and low-inflation Swiss Franc. These modifications were carefully implemented, followed by thorough approval and audit processes, to ensure that HLiquity maintains the same level of security and reliability as the original Liquity protocol.

## HLiquity Adopts HTS

HLiquity has successfully integrated the Hedera Token Service (HTS) for its operational needs, moving beyond the traditional ERC-20 framework. This pivotal transition capitalizes on the sophisticated capabilities of HTS, optimizing HLiquity's functionality within the Hedera network.

For detailed insights into HTS, please refer to the [Hedera's official documentation](https://docs.hedera.com/hedera/sdks-and-apis/sdks/readme-1).


# Borrowing

### Why Borrow with HLiquity?

The HLiquity protocol offers interest-free loans and is more capital-efficient than other borrowing systems. Instead of selling HBAR to have liquid funds, you can use the protocol to lock up your HBAR, borrow against the collateral to withdraw HCHF, and repay your interest free loan later.

### Understanding Collateral

Collateral is the asset that a borrower must provide to open a Trove and take out a loan, acting as a security for the debt. The borrowing fee is added to the debt and given by a base rate. The fee is confined to a range between 0.5% and 5% multiplied by the amount of liquidity the borrower draws.

### Loan Repayment

Loans issued by the protocol do not have a repayment schedule. You can leave your Trove open and repay your debt any time, as long as you maintain a collateral ratio of at least 110%.

### Collateral Ratio Explained

This is the ratio between the value of the collateral in your Trove and its debt in HCHF. Your Trove's collateral ratio will fluctuate over time as the price of HBAR changes. You can influence the ratio by adjusting your Trove’s collateral and debt.

### How to Borrow with HLiquity

To borrow, you must open a Trove and deposit a certain amount of collateral (HBAR). Then, you can draw HCHF up to a collateral ratio of 110%. A minimum debt of 1,800 HCHF (\~2,000$) is required. This includes a liquidation reserve (for liquidator gas costs) of 20 HCHF, which is refunded if you pay off your Trove fully.

### Understanding Troves

A Trove is where you take out and maintain your loan. Each Trove is linked to a Hedera address, and each address can have just one Trove. Troves maintain two balances: an asset (HBAR) as collateral and a debt denominated in HCHF.

### Borrower's Fees

Every time you draw HCHF from your Trove, a one-off borrowing fee is charged on the drawn amount and added to your debt.

### Avoiding Liquidation

To avoid liquidation, it's crucial to maintain a collateral ratio above the minimum collateral ratio (MCR) of 110%. If the collateral ratio falls below this threshold, your Trove is at liquidation risk.

### Liquidation Process

If your Trove is liquidated, the collateral is sold to repay the debt. A Liquidation Reserve is added to your debt to cover the cost of selling the collateral. The remaining collateral is returned to your wallet.

### Redemption Mechanism

The Redemption Mechanism is a unique feature of HLiquity. If your Trove is redeemed against, another user has paid off your debt in HCHF to claim an equivalent amount of your collateral at face value. This can happen when the HBAR price is high (in CHF terms) and the collateral ratio of your Trove is low.

### Leverage Opportunities

You can take advantage of leverage by borrowing HCHF against your HBAR collateral. This allows you to increase your exposure to HBAR without additional capital. However, leverage also increases liquidation risks, so managing your Trove carefully is essential.

### Trove Adjustments

You may notice that the collateral and debt of your Trove increase without your intervention. This is due to the system's Recovery Mode, which is activated when the total system collateral ratio falls below 150%. In this mode, the system can make adjustments to maintain stability.

### Conclusion

Borrowing with HLiquity is a powerful tool that offers liquidity while preserving your exposure to HBAR. However, it's essential to understand the associated risks and responsibilities. Always maintain a safe collateral ratio in your Trove to avoid liquidation and fully capitalize on the opportunities offered by the HLiquity protocol.


# Stability Pool and Liquidations

### Introduction to the Stability Pool

The Stability Pool is a essential part of the HLiquity protocol, serving as the first line of defense in maintaining system solvency. It provides liquidity to repay debt from liquidated Troves, ensuring that the total HCHF supply is consistently supported.

### Role of Stability Providers

Stability Providers are users who transfer HCHF into the Stability Pool. Over time, they lose a pro-rata share of their HCHF deposits but gain a pro-rata share of the liquidated collateral. Because Troves are likely to be liquidated at just below 110% collateral ratios, Stability Providers are expected to receive a greater value of collateral relative to the debt they pay off.

### Understanding Liquidations

Liquidation is a process that occurs when a Trove's collateral ratio falls below the minimum collateral ratio (MCR) of 110%. The remaining debt of the Trove is repaid by burning HCHF from the Stability Pool's balance, and the entire collateral from the Trove is transferred to the Stability Pool.

### Compensation for Liquidating a Trove

When you liquidate a Trove, you are compensated with a liquidation gain. This gain is a share of the liquidated collateral, which is expected to have a greater value than the debt paid off.

### Benefits for Stability Providers

Stability Providers benefit from liquidations in two ways. First, they receive a share of the liquidated collateral. Second, they earn HLQT tokens, which can be staked to earn for fees.

### What Happens When the Stability Pool is Empty?

If the Stability Pool is empty when liquidations occur, the system activattes a secondary liquidation mechanism known as redistribution. In this process, the debt and collateral from liquidated Troves are redistributed among all other existing Troves in proportion to their collateral amounts.

### Oracle Integration

HLiquity uses Supra and Pyth as its oracles to provide reliable price data. Supra serves as the primary oracle, pushing data 24/7 with a deviation threshold of 0.5%, ensuring consistent and accurate price updates. Pyth acts as a fallback oracle, utilizing its HBAR/USD and USD/CHF reference contracts. This dual oracle system enhances the reliability and accuracy of price feeds, ensuring that the protocol operates smoothly even if one oracle fails.

### Conclusion

The Stability Pool plays a vital role in the HLiquity protocol, ensuring system solvency and offering benefits to Stability Providers. By understanding how the Stability Pool and liquidation process works, users can make decisions and maximize their benefits from the HLiquity protocol.


# Redemptions and HCHF Price Stability

### Introduction to Redemptions

Redemptions are a unique feature of the HLiquity protocol. They allow any holder of HCHF to exchange their tokens for HBAR at face value, effectively ensuring the stability of HCHF. This mechanism is crucial in maintaining the peg of HCHF to the Swiss Franc.

### How Redemptions Work

When a user initiates a redemption, they specify the amount of HCHF they wish to redeem. The protocol selects the Trove with the lowest collateral ratio and uses its collateral to fulfill the redemption. The redeemed HCHF is burned, and the corresponding amount of HBAR is transferred to the redeemer.

### Impact on Troves

Redemption directly impacts Troves with the lowest collateral ratios. When a redemption occurs, the debt of the affected Trove decreases, and an equivalent amount of its collateral is claimed. This process continues until the entire redemption request is filled.

### HCHF Price Stability

The redemption mechanism plays a crucial role in maintaining the stability of the HCHF price. If the market price of HCHF drops below its peg, users can buy HCHF cheaply on the market and redeem it for HBAR at face value, making a profit. This arbitrage opportunity incentivizes market participants to restore the peg.

### Redemption Fee

A redemption fee is applied to each redemption to compensate for the risk taken by the Trove owners. The fee is dynamic and depends on the amount of HCHF being redeemed relative to the total HCHF supply. The fee is added to the redeemed HCHF and is paid in HBAR.

### Conclusion

The redemption mechanism is a powerful tool that ensures the stability of the HCHF peg. By understanding how redemptions work and their impact on Troves, users can make informed decisions and effectively manage their interaction with the HLiquity protocol.


# Frontend Operators

### Introduction to Frontend Operators

Frontend Operators play a crucial role in the HLiquity ecosystem by providing a web interface for end-users to interact with the unmutable HLiquity protocol. They bridge the protocol and the users, facilitating transactions and ensuring a smooth user experience.

### Becoming a Frontend Operator

For Frontend Operators, using the technical documentation (SDK) and middleware library is usually the best option for wallet and integrator services looking to integrate the HLiquity protocol into their existing platforms.

### Rewards for Frontend Operators

Frontend Operators earn a share of the HLQT tokens generated by their users. The distribution is determined by the Kickback Rate set by the Frontend Operator, which can range between 0% and 100%. A higher Kickback Rate can attract more users. However, a well-designed interface and additional functionalities might still attract users with a lower kickback rate.

### Frontend Tags

Frontend Operators can tag deposits made through their interface and specify the percentage of HLQT "kickback" to their users. The revenue generated by a frontend increases proportionally with the total amount of HCHF deposited by its users to the Stability Pool.

### Conclusion

Becoming a Frontend Operator in the HLiquity ecosystem is a rewarding endeavor that supports the protocol's decentralization and provides a share in the generated HLQT tokens. By understanding the responsibilities and benefits of being a Frontend Operator, you can make an informed decision about participating in the HLiquity protocol.


# HLQT Rewards and Distribution

### Introduction to HLQT Rewards

HLQT is the native token of the HLiquity protocol, pivotal in incentivizing user participation and maintaining the protocol's health. HLQT rewards are distributed to users who actively contribute to the protocol's stability and growth.

### Earning HLQT Rewards

There are several ways users can earn HLQT rewards:

1. **Stability Providers:** Users who deposit HCHF into the Stability Pool are rewarded with HLQT tokens. The amount of HLQT earned is proportional to the user's share of the total HCHF in the Stability Pool.
2. **Frontend Operators:** Frontend Operators earn a portion of the HLQT rewards generated by their users. The exact percentage is determined by the Kickback Rate set by the Frontend Operator.
3. **Staking HLQT:** Users can stake their HLQT tokens to earn a share of the protocol's fee revenue.

### HLQT Distribution

The distribution of HLQT tokens is designed to ensure a fair and decentralized allocation. The total supply of HLQT tokens is 100,000,000, minted at Genesis. The distribution is as follows:

* Community: 40%
* Community Reserve: 5%
* Team & Collaborators: 19.2%
* Investors: 30%
* Advisors: 2%
* Service Providers: 3.8%

Detailed HLQT token distribution information can be found here: [HLQT Tokenomics](https://docs.hliquity.org/fundamentals/hlqt-tokenomics), aligning with the strategic roll-out plan for the HLiquity protocol launch.

### Conclusion

HLQT rewards and distribution are integral to the HLiquity protocol, incentivizing user participation and ensuring long-term sustainability. By understanding the basics of HLQT rewards and distribution, users can make informed decisions about their involvement in the HLiquity ecosystem.


# HLQT Staking

### Introduction to HLQT Staking

Staking is a fundamental aspect of the HLiquity protocol, allowing HLQT token holders to contribute to the protocol's security and earn rewards. By staking HLQT, users can earn a pro-rata share of the borrowing and redemption fees generated by the protocol.

### How HLQT Staking Works

Users need to deposit their HLQT tokens into the HLiquity staking contract to start staking. Once the tokens are staked, users will begin earning a pro-rata share of the protocol's fee revenue. The earnings are directly proportional to the user's share of the total HLQT staked, based on the fees generated over time.

### No Lock-Up Period

One of the key features of HLQT staking is the absence of a lock-up period. Users can withdraw their staked HLQT anytime, providing flexibility and control over their investments.

### Staking and Governance

Staked HLQT tokens are not used to backstop the HLiquity system and are not used for governance as the HLiquity protocol operates without a governance mechanism, ensuring the protocol remains fully decentralized.

### Staking HCHF

It's important to note that only HLQT tokens can be staked. HCHF, the stablecoin of the HLiquity protocol, cannot be staked. However, HCHF can be deposited into the Stability Pool to earn liquidation gains and HLQT rewards.

### Conclusion

HLQT staking is a powerful tool for users to earn passive income while contributing to the security and stability of the HLiquity protocol. By understanding the mechanics of HLQT staking, users can make the most of their HLQT holdings and maximize their earnings.


# Recovery Mode

### Introduction to Recovery Mode

Recovery Mode is a unique feature of the HLiquity protocol designed to protect the system during periods of extreme market volatility. It is activated when the system's Total Collateral Ratio (TCR) falls below 150%.

### How Recovery Mode Works

In Recovery Mode, the HLiquity protocol changes the incentive structure for borrowers and stability depositors. Only loans with a collateral ratio of 110% or higher at the time of liquidation are offset against the Stability Pool during Recovery Mode. In comparison, loans below 110% are directly redistributed to the other borrowers. This allows for higher collateral gains and makes stability deposits practically risk-free, assuming that the price of HCHF never exceeds CHF 1.10.

### Liquidation in Recovery Mode

During Recovery Mode, Troves (borrowers) with a collateral ratio below 150% can be liquidated. To avoid liquidation, a user should keep their collateral ratio above 150%. Liquidation behavior varies based on the Individual Collateral Ratio (ICR), Minimum Collateral Ratio (MCR), and the amount of HCHF in the Stability Pool compared to the Trove's debt.

### Making Your Trove Safe in Recovery Mode

You can increase your collateral ratio to more than 150% to protect your Trove from liquidation in Recovery Mode. This can be done by adding collateral, repaying debt, or both.

### Conclusion

Recovery Mode is a critical safety mechanism in the HLiquity protocol, designed to protect the system and its users during periods of extreme market volatility. By understanding how Recovery Mode works and how to protect your Trove during these periods, you can navigate the HLiquity protocol with confidence, even in turbulent market conditions.

###


# HLQT Tokenomics

### Introduction to HLQT Allocation

HLQT, the core token of the HLiquity protocol, plays a vital role in encouraging user involvement and upholding the protocol's integrity. With a genesis-minted total supply of 100 million HLQT tokens, the distribution strategy aims to achieve equitable and decentralized dispersal.

### Community: 40%

The HLiquity Community is entitled to 40% of the entire token supply, equaling 40 million HLQT. Half of this allocation is dedicated to the rewards pool for those contributing to the Stability Pool, adhering to an annual reduction (33% yearly, minute-by-minute decay) formula: 18,700,000 \* (1–0.67^year), to generously benefit early participants and promote sustained commitment and 1.3 million HLQT to liquidity providers in the HCHF/HBAR pool on SaucerSwap V1, with rewards for staking HCHF:HBAR-LP tokens distributed over the first 18 weeks post-launch. The residual 20 million HLQT are reserved to support various significant activities within the HLiquity community.

### Team & Collaborators: 19.2%

To recognize the foundational team's efforts in HLiquity, 19.2% of HLQT tokens, totaling 19.2 millions, are allocated to the Team and Collaborators. These tokens are subject to a 1-year lockup, with a quarter vesting after the first year and the rest gradually vested monthly over 36 months, reinforcing their ongoing dedication to HLiquity's progress.

### Advisors: 2%

HLiquity allocates 2 millions HLQT tokens, representing 2% of the total issuance, to current and future advisors who contribute strategic guidance and insights. These tokens are locked for a year, with a vesting schedule of a quarter after the first year and the remainder vested monthly over 36 months, securing their continuous involvement in HLiquity's development.

### Investors: 30%

Early investors are allocated 30% of the token supply, amounting to 30 millions HLQT, acknowledging their initial support and contribution. In a first phase, 8 millions HLQT are offered over Headstarter. \
Another 22 millions are offered after the IDO to long-term investors. These 22 million tokens have a 1-year lockup period to ensure a lasting commitment to HLiquity's vision and growth.

### Community Reserve: 5%

A Community Reserve is established with 5 millions HLQT tokens, or 5% of the total issuance, to foster community engagement through grants, hackathons, and events, driving active participation in the HLiquity ecosystem.

### Service Providers: 3,8%

A total of 3.8 millions HLQT tokens, or 3.8% of all tokens issued, are set aside for service providers who have supported and will continue to support the HLiquity protocol through various stages, including before its launch.&#x20;

### Conclusion

The HLQT token allocation strategy is designed to stimulate engagement, honor the contributions of early supporters, and secure the long-term dedication of the core team, advisors, and investors, facilitating informed participation decisions within the HLiquity community.

<br>


# Token IDs, Pools, Contracts

Collection of technical resources about HLiquity.

## Contract Version

30f7253f635f6015267b0fcdb5554d259b76e5db

## Token IDs

#### HCHF: 0.0.6070123

HashScan: <https://hashscan.io/mainnet/token/0.0.6070123>

Sentinel Report: <https://sentinel.headstarter.org/details/hliquity-hchf>

#### HLQT: 0.0.6070128

HashScan: <https://hashscan.io/mainnet/token/0.0.6070128>

Sentinel Report: <https://sentinel.headstarter.org/details/hliquity-hlqt>

#### (ssLP-WHBAR-HCHF): 0.0.6070469

HashScan: <https://hashscan.io/mainnet/token/0.0.6070469>

## SaucerSwap Pools

V2\_USDC/HCHF <https://www.saucerswap.finance/liquidity/0.0.6078473>

V2\_HBAR/HCHF <https://www.saucerswap.finance/liquidity/0.0.7302964>&#x20;

V1\_HBAR/HCHF <https://www.saucerswap.finance/liquidity/0.0.6070468>

V2\_HBAR/HLQT <https://www.saucerswap.finance/liquidity/0.0.6078459>


# Links

This chapter provides a selection of essential resources and references related to the HLiquity protocol.

## HLiquity GitHub

{% embed url="<https://github.com/SwisscoastAG/HLiquity>" %}

## Official HLiquity Website

{% embed url="<https://hliquity.org/>" %}

## Frontend by blokk.

{% embed url="<https://hliquity.finance/>" %}
MainNet
{% endembed %}

{% embed url="<https://github.com/blokk-studio/HLiquity>" %}

## TestNet Frontend by blokk.

{% embed url="<https://testnet.hliquity.finance/#/>" %}
TestNet
{% endembed %}

## Audit Report by Omniscia

{% embed url="<https://omniscia.io/reports/swisscoast-hliquity-implementation-6617b5f16434ec0018fdb844/>" %}

## Official Liquity Documentation

{% embed url="<https://docs.liquity.org/>" %}
Documentation
{% endembed %}

## DefiLlama HCHF and HLiquity

{% embed url="<https://defillama.com/stablecoin/hedera-swiss-franc>" %}
HCHF on DefiLlama
{% endembed %}

{% embed url="<https://defillama.com/protocol/hliquity>" %}
HLiquity on DefiLlama
{% endembed %}


