Interacting with Helio Protocol

For more information on the interaction, refer to the Helio Protocol documentation page.

Step 1: Collateralizing BNB

To collateralize their assets, the user sends a set amount of BNB via the HelioProvider::provide() smart contract. The assets will be locked inside MakerDAO via the VAT::frob() smart contract effectively collateralizing them. Intermediate aBNBc and ceABNBc tokens are applied in the internal Helio Protocol logic in the process.

Step 2: Borrowing HAY against the Collateralized BNB

To borrow HAY against the collateralized assets, the user sends a transaction to Interaction::borrow() smart contract in order to generate a specific amount of HAY in exchange for keeping their collateral locked in the ceVault. The Helio Protocolcalculates the current HAY value inside MakerDAO. The calculation takes into consideration the borrowing limit, which is the price of the total assets collateralized by the user * collateral ratio (fixed amount set by the Helio Protocol).

The collateral ratio is the percentage of the user's collateral value that determines the maximum borrowing limit for the user. The current value is 66% of the collateral value. The collateral ratio is used in triggering the liquidation process when the borrowed HAY value becomes higher than the 66% of the current worth of the user's collateral with safety margin.

Helio Protocol indebts the user via VAT::frob() for the borrowed HAY amount. Then sends the borrowed HAY to the user via Join::exit().

Step 3: Claiming Rewards for Borrowed HAY

Users who borrowed HAY are minted rewards in HELIO token and can claim them anytime.

To claim the HELIO tokens to their wallet, they send a transaction to the HelioRewards::claim() smart contract. HelioRewards updates the rewards pool size and rewards rate, and transfers the pending user rewards to the user’s wallet via HelioToken::transfer().

Step 4: Repaying Debt and the Accumulated Interest

To repay the borrowed HAY along with the accumulated interest, the user send a HAY to the Interaction::payback() smart contract, which in turn transfers HAY to the MarkerDAO vault via HAYJoin::join() and subtracts the repaid HAY amount from the user's debt via VAT::frob().

Step 5: Withdrawing Collateral

With the HAY returned and the interest paid, the user can withdraw all or some of their BNB collateral back to their wallet. Once all HAY is completely repaid, the user can send a transaction to HelioProvider::release() initiating the withdrawal process. HelioProvider gets ceABNBc via Interaction::withdraw(), which unlocks the assets via VAT::frob() and transfers the assets from the CDP engine to the MakerDAO vault via VAT::flux(). Then HelioProvider exchanges ceABNBc to aBNBc and unstakes the aBNBc to release BNB to the user.

Step 6: Liquidation

When the current worth of collateral with safety margin is less than the borrowed amount of HAY, the liquidation process can be triggered by anybody via Interaction::startAuction(). The liquidator who triggers the Dutch auction, aka the liquidation process, gets a reward (tip + chip) for doing it. tip and chip are set by Helio governance and are currently $300 and %0.1of amount of debt in the auction respectively.

Helio sets the starting auction price for the liquidated collateral to be equal (current_collaterral_unit_price * buf), where buf is a param similar to the liquidation penalty, is set by Helio governance, and is currently 2% of the collateral value.

Helio Protocol then lets liquidators come and buy via buyFromAuction() to buy any amount > than dust (currently 1 USD). If the liquidator's proposed price is >= current_auction collateral_unit_price, Helio Protocol sells the requested amount of the user's collateral to the liquidator, exchanging ceABNBc for aBNBc and sending aBNBc to the liquidator's wallet. Effectively, the liquidator buys aBNBc that they can later exchange for BNB or hold to accumulate more BNB as aBNBc grows in value to BNB with time.

Helio Protocol incrementally lowers the auction price while letting anybody buy still. The reason for decreasing from a higher price is because of bots and change of collateral price from oracle to avoid any sudden loss. The auction lasts a fixed amount of time set by Helio governance. The price is recalculated every second of the auction.

When the auction time limit is reached or the price decrease has reached a certain threshold (the limits are set by Helio governance; currently 40%), Helio Protocol pauses the auction and waits for a liquidator to come and restart the auction. The liquidator who restarts the auction gets a reward (tip + chip) for it.

Finally, the Helio Protocol covers the user's debt and keeps profit (borrowed amount + (borrow interest + liquidation penalty)). Then it calculates the remainder (price paid - debt - profit) and sends it to the user’s wallet.

Last updated