# Introduction

Automated and Leveraged yield farming built for PancakeSwap

### Eternal Finance is the first automated and leveraged yield farming protocol built on Aptos offering automated bots to optimize everyone's yield farming experience.

We provide agile leverage options for yield farmers to amplify their farming positions with well-controlled cost, maximizing your capital efficiency.&#x20;

We help keep your leveraged yield farming positions safe and stable by protecting your principal with our strategies. We track your performance based on your principal marked to USD, ensuring that both of us know your profits well.&#x20;

We assist to rebalance your delta exposure in an automatic way, ensuring the impermanent loss of your yield farming position is well-controlled.&#x20;

We embrace DeFi, and are grateful to be able to play a part in the whole DeFi ecosystem of Aptos. Eternal Finance hopes everyone able to generate eternal and sustainable profits from yield farming  by introducing automated strategies to everybody, amplifying the liquidity provided to the entire ecosystem. As a proud owner of Eternal tokens, you are not only shaping the future of Eternal Finance, but also the future of DeFi.

* Eternal Finance not only provides leverage and opens positions for users and leave you there, instead we will help users monitor the ever-changing market situations and utilizes bots in its ecosystem to execute pre-configured strategies.&#x20;
* Our implementation is community-driven. All participants are encouraged to contribute, to hold our token, to govern our operations, and to enhance the Eternal Finance Platform.&#x20;

#### Build for PancakeSwap

PancakeSwap is one of the most successful DEXs in the DeFi universe, with over millions of users and billions of TVL. With our leverage and automation on yield farming, we aim at thickening and stablizing the liquidity provided to PancakeSwap. We are also here to balance the interests of traders, lenders and liquidity providers for the whole ecosystem on Aptos. &#x20;


# Get Started

Before proceeding, it is advised that you review the Risks section in order to obtain a thorough understanding of the terms and potential risks involved in using Eternal Finance. To access the Eternal Finance platform, please navigate to the interface provided at the following web address: <https://app.eternalfinance.io/>.

To commence, the initial step involves selecting a product that aligns with your personal risk tolerance. Eternal Finance offers a range of options to choose from, including&#x20;

1. Lending, which is considered to be the lowest risk
2. Strategy, which presents a medium risk
3. Farming, which is regarded as a medium-to-high risk.&#x20;

Kindly proceed by selecting the product that best suits your individual risk appetite.

If it is your first time to use DApp under Aptos chain, please have a look on the following section.

{% content-ref url="/pages/rUCNAdoDUc7jhY7VJUwR" %}
[Install a wallet](/user-guide/get-started/install-a-wallet)
{% endcontent-ref %}

{% content-ref url="/pages/Zp0Tk61DcvRWboXsC4FX" %}
[Setup Wallet](/user-guide/get-started/setup-wallet)
{% endcontent-ref %}


# Install a wallet

Eternal Finance operates on the Aptos Blockchain, therefore a cryptocurrency wallet and browser are required to interact with the site. For optimal performance, it is recommended that you install the Eternal Finance wallet plugin on your web browser. Google Chrome or Brave are recommended browsers as they are compatible with the plugin.

Please note that cryptocurrency stored on exchanges, such as Binance, will not be recognized as valid cryptocurrency wallets and will not work with Eternal Finance.

Listed below are the available options for you to choose from:

1. **Petra**

   Download Link: <https://chrome.google.com/webstore/detail/petra-aptos-wallet/ejjladinnckdgjemekebdpeokbikhfci>
2. **Pontom**\
   Download Link: <https://chrome.google.com/webstore/detail/pontem-aptos-wallet/phkbamefinggmakgklpkljjmgibohnba>
3. **Martian**\
   Download Link: <https://chrome.google.com/webstore/detail/martian-wallet-aptos-sui/efbglgofoippbgcjepnhiblaibcnclgk>


# Setup Wallet

## Pontem Wallet

1. If this is your first time, kindly select the option to "Create Wallet".

   <figure><img src="/files/xxBpd2RJXL6xikZcpAju" alt=""><figcaption></figcaption></figure>
2. Create a password <br>

   <figure><img src="/files/SJUxgf23LcgxJqP5g7dn" alt=""><figcaption></figcaption></figure>
3. Your wallet is created. As the wallet creation process has not yet been completed, kindly proceed to the next step.<br>

   <figure><img src="/files/vkVhZlHmjLbbSvcjnmuv" alt=""><figcaption></figcaption></figure>
4. Please click "**`Resolve`**" to confirm the 12 Secret Recovery Phrase<br>

   <figure><img src="/files/JDOY6SbkcgEsxmdwm9Ns" alt=""><figcaption></figcaption></figure>
5. Upon completion of the wallet creation process, you will be provided with a list of recovery phrases. It is highly recommended that you write down the recovery phrases and store them in a secure location.<br>

   To ensure the utmost security of your information, **`it is advised that you do not utilize the "COPY" button`** or take a screenshot of the recovery phrases, as this may lead to potential leakage of your **`PRIVATE KEY(the only way to access your asset)`**.\
   \
   After written down your phrases, click "**`I saved my recovery passphrase`**" to proceed.<br>

   <figure><img src="/files/pQzrG8CErfI0eyUR0l1x" alt=""><figcaption></figcaption></figure>
6. Please select the words that correspond with their corresponding numbers to ensure the accuracy of the recovery phrases. Once completed, click the "**`Confirm`**" button to proceed.
7. Congratulations! Your wallet has been successfully created, and is now ready to accept deposits of APT tokens.


# Lending

To begin lending on the Eternal Finance platform, please follow the instructions outlined below:

1. Navigate to the **`Lend`** page on the Eternal Finance App.
2. **`Connect your wallet`** (such as Pontem, Petra and Martian) to the platform.&#x20;
3. Once your wallet is connected, select the "**`Deposit`**" button on the desired asset pool in order to initiate the lending process.

   <figure><img src="/files/MZfeIJ5b9qPfAlwQfsta" alt=""><figcaption></figcaption></figure>
4. After selecting the desired asset pool, please specify the amount that you wish to deposit. Once you have entered the desired amount, please click the "**`Confirm`**" button to initiate the deposit.

   <figure><img src="/files/MP7gelE0Jx45WPEoEpEf" alt=""><figcaption></figcaption></figure>
5. After clicking the "**`Lend APT`**" button, a pop-up notification should appear on your Pontem/Petra/Martian wallet, prompting you to accept the transaction.&#x20;
6. Please click the "**`Confirm`**" button to proceed with the transaction and wait for the confirmation that the transaction has been successfully processed.
7. Once the transaction has been successfully processed, you will automatically receive ibAPT in your wallet if you deposited APT, or ibceUSDC if you deposited ibceUSDC.

### Check your Return

To access your lending portfolio on the Eternal Finance platform, please follow the instructions below:

1. Navigate to the Portfolio page on the Eternal Finance App.
2. Scroll down until you find the section labeled "**`My Lending`**".

Once you have located the "**`My Lending`**" section, you will be able to view your lending portfolio and the corresponding details, such as the amount lent and the corresponding interest earned.

<figure><img src="/files/dCmUq3rymzlLKjXNdaLp" alt=""><figcaption></figcaption></figure>


# Leveraged Yield Farming

Eternal Finance offers users the ability to initiate leveraged yield farming positions on PancakeSwap pools.&#x20;

## Open New Position

To commence this process, please follow the instructions provided below:

1. Connect your Web3 wallet, such as Petra, Pontem, or Martian, to the platform, ensuring that the network is correctly set to the Aptos chain.
2. Begin by navigating to the Eternal Finance Farm page via the following URL: <https://www.eternalfinance.io/farm>.
3. From the list of supported pools available on the website, select your preferred farming pool.&#x20;
4. Compare the interest rate, APY and TVL.
5. Finally, click on the "Farm" button to initiate the leveraged yield farming position.<br>

   <figure><img src="/files/gQhsXYg1d0JWDQwURfGL" alt=""><figcaption></figcaption></figure>
6. Deposit both or just one tokens into the selected pool(i.e. APT-whUSDC). The default leverage is 3x.&#x20;

   <figure><img src="/files/CEV81fuCwS4CbuYysH3s" alt=""><figcaption></figcaption></figure>
7. Assume you deposit 100 whUSDC, the bot will calculate and suggest the default loan amount of two tokens. The default setup is borrowing the same number of non-stablecoin token in the liquidity pool (i.e. $100\*3/2 = $150 value of APT)<br>

   <figure><img src="/files/LtTBJy9sgejIJ1DmStto" alt=""><figcaption></figcaption></figure>
8. Study the summary and review the return<br>

   <figure><img src="/files/6cmu63tyo8f3aYSVdc6b" alt=""><figcaption></figcaption></figure>
9. Check the price impact and aware that the share of pool. If the share is too high, it may result in high slippage during the swap.<br>

   <figure><img src="/files/WE0ptiksaFvFwxZ08Ufz" alt=""><figcaption></figcaption></figure>
10. After click "**`Confirm Farm-3x`**", a pop-up notification should appear on your Pontem/Petra/Martian wallet, prompting you to accept the transaction.

## Check your return

To access your Farming portfolio on the Eternal Finance platform, please follow the instructions below:

1. Navigate to the Portfolio page on the Eternal Finance App.
2. Scroll down until you find the section labeled "**`My Farming Position`**".

Once you have located the "**`My Farming Position`**" section, you will be able to view your Farming portfolio and the corresponding details, such as the amount lent and the corresponding interest earned.<br>

<figure><img src="/files/0VBa1C3RjwgYFN01lWaY" alt=""><figcaption></figcaption></figure>


# Strategy

Pseudo Market-Neutral Strategy is a yield farming strategy that does not take side on the market at the beginning. You can easily open position with Market-Neutral Strategy with Eternal Finance.

## Open New Position

To commence this process, please follow the instructions provided below:

1. Connect your Web3 wallet, such as Petra, Pontem, or Martian, to the platform, ensuring that the network is correctly set to the Aptos chain.
2. Begin by navigating to the Eternal Finance Strategy page via the following URL: [https://www.eternalfinance.io/](https://www.eternalfinance.io/farm)strategy.
3. From the list of supported pools available on the website, select your preferred farming pool.&#x20;
4. Compare the interest rate, APY and TVL.
5. Finally, click on the "Deposit" button to initiate the leveraged yield farming position.<br>

   <figure><img src="/files/FR4g1GlJN7zdxwHtBE4Q" alt=""><figcaption></figcaption></figure>
6. Deposit stablecoin into the selected pool(i.e. lzUSDC - lzWETH). The default leverage is 3x. <br>

   <figure><img src="/files/8mZaar6Go0epm9daW70t" alt=""><figcaption></figcaption></figure>
7. Assume you deposit 10 lzUSDC, the bot will calculate and suggest the default loan amount of two tokens under market-neutral setup.

   <figure><img src="/files/6N9hXptyfYBEdAreRshR" alt=""><figcaption></figcaption></figure>
8. Study the summary and review the return<br>

   <figure><img src="/files/anm2f56n4QTtCKiNBLr3" alt=""><figcaption></figcaption></figure>
9. Check the price impact and aware that the share of pool. If the share is too high, it may result in high slippage during the swap.<br>

   <figure><img src="/files/FxOJ0NgOLcVfUJQYIc9P" alt=""><figcaption></figcaption></figure>
10. Utilize our Simulator to study the risk. Assume the current price of lzWETH is 1704.89, your position is still profitable under the assumption of current APR within 1210.47-2335.69 price range. You can form your own view of how market price of lzWETH will go then see whether our strategy fits your expectation.<br>

    <figure><img src="/files/edQJJPZQBzlQMuKE50Cw" alt=""><figcaption></figcaption></figure>
11. After click "**`Confirm`**", a pop-up notification should appear on your Pontem/Petra/Martian wallet, prompting you to accept the transaction.

## Check your return

To access your Strategy portfolio on the Eternal Finance platform, please follow the instructions below:

1. Navigate to the Portfolio page on the Eternal Finance App.
2. Scroll down until you find the section labeled "**`My Strategy Position`**".

Once you have located the "**`My Strategy Position`**" section, you will be able to view your Strategy portfolio and the corresponding details, such as the amount lent and the corresponding interest earned.

<figure><img src="/files/Xg1ArPf6h65Pzrix36xI" alt=""><figcaption></figcaption></figure>


# Protocol Overview

A simple tool to earn stable yield income with optimal automation

DeFi users are chasing higher investment returns from platform to platform and from network to network. Undoubtedly, leveraged yield farming is one of the most popular choices used by experienced DeFi users to maximize their profits.

Yield farming grants users additional incentives for providing liquidity to a liquidity pool. Meanwhile, leveraged yield farming is a mechanism that allows users to ramp up their yield farming position by borrowing funds in order to multiply their yields. In other words, you borrow funds so you can invest more, and, as a result, to earn more. But of course, you have to pay borrowing interests for the extra capital.

In addition, different from most of the traditional lending platforms, leveraged yield farming allows users to borrow under-collateralized loans, which establishes higher capital efficiency for yield farmers. Moreover, this might create a higher utilization rate of the lending pool, sometimes hitting more than 90%.

#### The Needs for Automation on Leveraged Yield Farming

The higher the utilization rate of the lending pool, the more the lenders gain and the more the borrowers pay. if the leveraged yield farming positions are not well-managed, the accumulated yields which are original used to compensate for the potential loss of the yield farming activity may be eroded. It is quite prevailing that losses on yield farming activities are incurred to a certain extent without sound management on the yield farming position.

We understand that it may be hard for every yield farmers to monitor multiple positions 24/7.&#x20;

To help our yield farmers generate eternal and sustainable profits all the way, Eternal Finance is proud to introduce our three automation bots:

1. Automated Compounding Bot - to maximize the earnings of positions
2. Automated Stop-loss Bot - to protect the principal of the position in fiat value for USDC-based farming
3. Automated Hedging Bot - to minimize the downside of your position due to impermanent loss and price effect


# Lending Pools

Eternal Finance offers lending vaults for users who would like to HODL their tokens while enjoying high interest rates safely.

### Mechanism

1. Farmers can just deposit single token to the vault and enjoy yield without suffering impermanent loss.
2. The smart contract will mint ibTokens as receipt to prove the ownership of the loan.&#x20;
3. Each token vault will lend the token to all pairs formed with this token. That means all pairs share the same token pool.&#x20;
4. The lending interest rate of token depends on our utilization rate and triple-slope interest rate model.
5. All assets are protected by Liquidation Bot.

### High Level Information

* Total Supply — The total amount of tokens supplied to the lending pool
* Total Borrowed — The total amount of tokens borrowed from the lending pool
* Utilization — The ratio between Total Borrowed and Total Supply
* Wallet Balance of Token and ibToken

### Interest Bearing Token&#x20;

When users deposit their assets to a lending vault, they will receive **ibTokens** as a proof of ownership of the loan. "ibToken" stands for "**Interest-bearing Token**", where the exchange rate of 1 ibToken to original Token increases overtime - thus also increasing the interest receivables. Besides lending interests, users can also **stake** the ibTokens into Eternal Finance's vaults to earn extra token rewards.

### Interest Rate Model

The interest rates for depositing the assets above are determined by the utilization rate of the lending vaults, following their corresponding interest rate curve.

Eternal Finance adopts a triple-slope interest rate model to determine borrowing interest rates. Different assets shall employ different parameters of the same model.

#### *Borrowing Interest = Multiplier \* Utilization + Base Rate*

### Liquidation

If, at any time, the collateral value for a borrower’s loan is less than the minimum collateral required, the loan will be liquidated. Anyone can liquidate a loan in a liquidatable state in a permissionless manner. The liquidator repays the loan and receives, in exchange, the value of the borrowed LP tokens multiplied by the liquidation incentive. The liquidation mechanism helps ensure the stability of the protocol and safeguards lenders' assets.


# Leveraged Yield Farming

Eternal Finance is thrilled to unveil our cutting-edge Leverage Yield Farming product, designed to maximize your DeFi investment returns. With Leverage Yield Farming, you can borrow funds from lending pools and add them to the liquidity pool of DEX, creating a larger position that generates more rewards and thus increases your yield.&#x20;

### Mechanism

1. Our platform offers undercollateralized loans, which allow farmers to borrow from lending pools.&#x20;
2. Lenders can enjoy higher APYs and increase the utilization rate because of leverage yield farming.&#x20;
3. Eternal Finance offers different leverage options that determine how much users can borrow.&#x20;
4. The higher the leverage, the greater the potential rewards, but also the higher the risk of liquidation if the price of the underlying assets falls.
5. All the harvested yield will be reinvested into the LP automatically by our bot. Once the vaults accumulate 20 Cakes yield, or if the last transaction was longer than 1 day, the automation will be triggered.

### Example

With 10,000 USDC to open a 2x leveraged position, instead of just providing liquidity, you can borrow an additional 5,000 APT with leverage to create a position of 5,000 APT and 10,000 USDC. This increases your position size and generates more rewards, resulting in a higher yield.

### Risk Management

To manage the risks of liquidation, Eternal Finance uses a liquidation mechanism to close out positions at risk of becoming undercollateralized, protecting the platform's lenders and ensuring its solvency. In summary, leverage yield farming is an excellent tool to maximize yield in the DeFi space, but users should carefully consider the risks before engaging in this investment strategy.

### Difference between Strategy and Farming

Eternal Finance understands that not all farmers are equally experienced in the DeFi space. That's why we have prepared a Pseudo Market-Neutral Strategy to help less-knowledgeable farmers to navigate the complexities of leverage yield farming


# Market-Neutral Strategy

USD-denominated vault which could generate sustainable yield with minimized risk

Market-Neutral Strategy Vault is an advanced form of yield farming strategy that **minimizes the exposure towards price of the non-stable token** with automated rebalancing functions. The yield farming positions consist of both equity (what the user originally owns) and debt (what the user borrows from the protocol), combining together to increase the share portion in a Liquidity Pool resulting in a higher yield after deducting the borrowing interests.

The investors then earn returns by providing a pair of token liquidity to a Liquidity Pool (LP), collecting both the transaction fee as well as the farm reward. Traditional liquidity providers may suffer severe impermanent loss when the relative price of the two assets change, regardless of the direction. Our automated bot could effectively minimizes price effect as well as impermanent loss when the price fluctuates based on continuous monitoring and dynamic rebalancing triggered.

Market-Neutral Strategy is built on top of leveraged yield farming of stablecoin & non-stablecoin pairs, while the Long/Short position towards non-stable tokens is 100% hedged initially and the exposure is monitored and tracked by Automated Hedging Bot throughout the position life.

{% hint style="info" %}
**Long position** refers to the purchase of an asset with the expectation that it will increase in value; the more the asset appreciates, the more the position gains. Users can either be owning the asset directly or investing in derivatives that will appreciate in value together with the asset itself.

**Short position** refers to the investment that bets on the value of the asset dropping; the more the asset depreciates, the more the position gains. Users can either be short-selling an asset directly or investing in derivatives that will appreciate in value opposite to the underlying asset itself.
{% endhint %}

To illustrate the mechanism in a more visualized way, let's go through the below example with initial leverage of 2x. (Assume APT/USDC = 8)

<figure><img src="/files/kdSjFfslZITGlbQmhxMf" alt=""><figcaption><p>Flowchart of setting up a 2x market-neutral position</p></figcaption></figure>

Note that the Vault User does not possess non-stable token (i.e. APT) for the initial setup. The "Short" effect on APT is generated by "borrowing", which matches user's Long position on APT in the liquidity pool.&#x20;

There are many possibilities on Market-Neutral Strategy Vault other than 2x by borrowing the optimal amounts of farming token pairs. The Vault help you out with precise calculation/simulation and uninterrupted monitoring 24/7.  &#x20;

The Vault brings forth three main advantages:

1. Increases the share portion in a liquidity pool to earn higher yield even after deducting borrowing interests.
2. Hugely reduces the Price Effect on the position value when the price of the non-stable token fluctuates.
3. Specifically designs for the investors whose evaluation of performance is based on USD value (i.e. real-yield chasers)

#### The crucial need for precise rebalancing

Though the price exposure towards non-stable token is perfectly hedged at the very beginning, part of the Price Effect will still invade the position value due to impermanent loss and change of token compositions in the LP along with the price movement.

Neglecting all the yields and interests, the graph below gives a plain view on the correlation between a position's Price Effect and price movement of the farming non-stable token. The Price Effect is largely reduced to -4.0% and -2.9% even when the price of the non-stable token moves up or down 30%.&#x20;

<figure><img src="/files/kyVGBlmksFuTf72jfyDP" alt=""><figcaption></figcaption></figure>

We can also notice that the Price Effect change at different price ranges varies. The nearer to the initial opening price, the flatter the slope of the negative Price Effect (Pos. 1), and vice versa (Pos. 2). Due to the convex nature of the curve, the hedging effect diminishes when the price moves away from the initial opening price. Therefore, there is a genuine need to rebalance the position at optimal timings so as to stabilize the position's value change.

So the million dollar question is how to identify a good time to rebalance the positions, as the moment of rebalancing is a bit tricky to determine. If the rebalancing is triggered too frequently, position value gets loss by incurring a large amount of transactional cost. Not to mention if the price of the non-stable coin returns to the original after rebalancing, the impermanent loss caused by the temporary price fluctuation will be realized.&#x20;

Our Automated Hedging Bot help farmers out to determine the best timing to trigger rebalancing so as to minimize the potential drawdown, retaining more yields gained as real profits rather than the compensations of the potential losses.

The fully-backtested bot does all the maths and transactions at the backend and rebalances the strategy to market neutral with the benefits of:

1. Time-saving of users on calculation, simulation and multiple operations.
2. Rebalancing the amount based on "Net" delta value, so it minimizes the transactional cost as well as slippage.
3. 24/7 continuous monitoring so user could be hassle-free&#x20;

#### The purpose of automated hedging algorithm

Rebalance the position only when it meets the following requirements:

1. The price trend of the non-stable coin is going through tremendous changes&#x20;
2. The accumulated interest of one of the assets is too high and affect the delta too much
3. The leverage level is too high or low to achieve the best risk-weighted rewards

#### Three Bots work together to seek for real yield and protect from potential losses

The USD-denominated Market-Neutral Strategy Vault is paired up with the three Bots:&#x20;

* Automated Compounding Bot - to maximize the earnings of positions
* Automated Stop-loss Bot - to protect the principal of the position in fiat value
* Automated Hedging Bot - to minimize the downside of your position due to impermanent loss and price effect

Users can simply invest and assess the vault performance in USD. This "USD-in, USD-out" vault serves as a higher yield option to market-neutral investors.


# Liquidation Bot

Liquidation happens when the debt-to-value ratio *("**Debt Ratio**")* of the position exceeds certain threshold *("**Liquidation Threshold**")*, such that the position would be closed by our liquidation bot in order to guarantee the debt repayment. It is critical to keep our lending pools safe for the long-term development of the Eternal Finance ecosystem, as our Market-Neutral Strategy Vault relies heavily on borrowing assets to minimize price effect on the farming position. Both strategy and leveraged yield farming positions have liquidation risks. But in most cases, the strategy position will be stop-loss first instead of being liquidated. You can also reference to position opening form or your portfolio/position section for the safety buffer *("**Safety Factor**")* of each position. The closer the safety factor to zero, the higher the risk of liquidation.

#### Formula <a href="#formula" id="formula"></a>

<figure><img src="/files/AdB1Y1LpHXGk55hpXyBj" alt=""><figcaption></figcaption></figure>

Let's learn more about our liquidation mechanism with the following example.

#### Example <a href="#example" id="example"></a>

Alice decides to farm in APT-USDC liquidity pool, when the price of APT is US$8 and that of USDC is US$1:

1. Alice opens a APT-USDC leveraged yield farming position, supplying 125 APT (US$1,000) & 3,000 USDC (US$3,000) and borrowing 1,000 APT (US$8,000) with initial leverage at 3X.
2. Her supplied assets and borrowed assets are then converted to 50:50 portion for creating the LP tokens, such that there are total 750 APT (US$6,000) and 6,000 USDC (US$6,000) in her initial position. Total position value remains unchanged at **US$12,000**.
3. Current debt ratio of her position is US$8,000 / US$12,000 = **66.67%**.

After a certain day, assume simply that there are no trading fee and yield farming reward reinvested, the price of APT rises to US$12.5 and the price of USDC remains unchanged:

1. Alice's position now has roughly 600 APT and 7,500 USDC, according to Constant Product Formula *(x\*y = k)*. Total position value now becomes **US$15,000** (i.e. 600 APT \* US$12.5 + 7,500 USDC \* US$1).
2. Total debt value now becomes **US$12,500** (i.e. 1,000 APT \* US$12.5).
3. Now the debt ratio of this position would be US$12,500/ US$15,000= **83.33%.**
4. Since the liquidation threshold of this pair hit 83.33%, it will trigger the liquidation bot to close the position (i.e. remove 600 APT & 7,500 USDC from the liquidity pool, swap .
5. The net equity value before paying liquidation fee will be US$2,500. After paying 5% liquidation fee, Alice will receive 2,375 USDC (US$2,375) in her wallet.​

{% hint style="info" %}
The liquidation bot will adopt "minimize trading" principal to remove the liquidity and repay outstanding loans, there is a chance that the farmers may get back non-stable tokens or both farming pair tokens subject to the position status at that time.
{% endhint %}

### Liquidation Parameters <a href="#liquidation-parameters" id="liquidation-parameters"></a>

**Work Factor:** The maximum Debt Ratio when opening a position on a pair&#x20;

**Max. Leverage:** The maximum Leverage Level when opening a new position on a pair&#x20;

**Liquidation Threshold:** The maximum Debt Ratio when the liquidation will be executed


# Tokenomics

updated at 22 February 2023.

<figure><img src="/files/0YSOe88DqTaE5w8hLnya" alt=""><figcaption></figcaption></figure>

Eternal Finance issues a governance token, known as ETERN, to facilitate the governance of the Eternal Finance protocol and has no intrinsic or implied value beyond its functionality as a governance token.  ETERN token holders can participate in governance by staking their ETERN tokens for veETERN.\
\
ETERN token holders are accorded the opportunity to participate in governance activities that influence the future trajectory of the protocol. The token holders are authorized to make determinations on critical aspects of the protocol such as the interest rate model, fee rates, and the distribution of protocol fees and reserves accrued to the Eternal Finance protocol.

The total supply of ETERN tokens is limited to 1,000,000,000. As a result, the number of ETERN tokens in circulation is finite and the governance activities of ETERN token holders have the potential to impact the future of the Eternal Finance protocol.

### Token Utility of ETERN

* Share of Platform Fees
* veETERN enjoys higher mining reward than non-veETERN holders
* Voting through veETERN
  * Use of Treasury
  * Protocol Improvements
  * Mining Reward Allocation Point

<table><thead><tr><th width="188.33333333333331">Allocation</th><th width="127">Percentage</th><th>Vesting Details</th><th>Allocation Details</th></tr></thead><tbody><tr><td>Public Sale</td><td>6%</td><td>40% at TGE, 20% vesting monthly for 3 months</td><td>Allocates for Launchpad</td></tr><tr><td>DEX Yield</td><td>2%</td><td>100% at TGE</td><td>Allocates for paying DEX yield</td></tr><tr><td>Liquidity Pool</td><td>2%</td><td>100% at TGE</td><td>Liquidity Reserve</td></tr><tr><td>Mining Reward -Aptos</td><td>4%</td><td>Vest linearly for 48 months and start after TGE</td><td>Rewards our lending pool contributors and farming users</td></tr><tr><td>Mining Reward -Reserve</td><td>36%</td><td>Vest linearly for 48 months and start after TGE</td><td>Reward Reserve for future chain expansion</td></tr><tr><td>Ecosystem &#x26; Others</td><td>25%</td><td>4% at TGE day and vest the rest linearly for 48 months.</td><td>Pays strategic expenses including listing fees, audits, extra rewards for ecosystem and partners, and marketing fee, etc &#x26; Reserves for expanding liquidity pairs in DEXs</td></tr><tr><td>Team &#x26; Advisors</td><td>25%</td><td>Cliff period for 6 months then vest linearly for 48 months</td><td>Supports continuous development &#x26; rewards for the advice from our advisors</td></tr></tbody></table>


# Calculation Methodology

How the return is calculated?

We constantly crawl pool data and price info from Chain & Dexs to calculate your assumed position and gain over time. As the math in the pool can change every second, certain assumptions are made here to standardize the computation among different pools:&#x20;

* Your investment is started at (N days)\*24 hours ago, instead of 00:00 at (T - N) days; timezone issue is eliminated&#x20;
* Crypto assets that you added to the pool will not affect the pool's original value, as you are acting as an "observer" only&#x20;
* Fees & prices in USD are based on snapshot data at hourly interval&#x20;
* Prices of incentive token are default based on hourly closing price&#x20;
* Token prices in the pool are same as market price \[Impermanent Loss calculation]

#### Formulas

*Assumed pool share = principal / total initial pool value (liquidity)*&#x20;

*Assumed staking share = assumed pool share / staked total*

*Trading fee rewards = sum of hourly trading fee rewards received in USD \* assumed pool share*&#x20;

*Yield farming rewards= dex incentive token received \* assumed staking share \* price of incentive token*&#x20;

*Equity value = total pool value \* assumed pool share*&#x20;

*Price effect = equity value - trading fee rewards - principal*

For impermanent loss, you may refer to [Impermanent Loss Explained](/others/price-effect-vs-impermanent-loss) for the calculation and concept behind.


# Interest Rate

Updated at 03 March 2023

#### CAKE/ceBNB/APT/lzWETH/whWETH ***Borrowing Interest Rate*** <a href="#cro-borrowing-interest-rate" id="cro-borrowing-interest-rate"></a>

| Utilization Range | Minimum Interest Rate | Maximum Interest Rate | Multiplier | Base Rate |
| ----------------- | --------------------- | --------------------- | ---------- | --------- |
| 0%-50%            | 0%                    | 15%                   | 0.3        | 0         |
| 50%-90%           | 15%                   | 35%                   | 0.5        | -0.1      |
| 90%-100%          | 35%                   | 100%                  | 6.5        | -5.5      |

#### ETERN/lzUSDC/ceUSDC/whUSDC/whBUSD/ceUSDT/lzUSDT ***Borrowing Interest Rate*** <a href="#usdc-usdt-vvs-single-mmf-borrowing-interest-rate" id="usdc-usdt-vvs-single-mmf-borrowing-interest-rate"></a>

| Utilization Range | Minimum Interest Rate | Maximum Interest Rate | Multiplier | Base Rate |
| ----------------- | --------------------- | --------------------- | ---------- | --------- |
| 0%-50%            | 0%                    | 10%                   | 0.2        | 0         |
| 50%-90%           | 10%                   | 15%                   | 0.125      | 0.0375    |
| 90%-100%          | 15%                   | 100%                  | 8.5        | -7.5      |


# Fee Parameters

Updated at 22 Feburary 2023

#### Stop-loss Fee

<table><thead><tr><th width="183">Chain</th><th>Amount (USD) Per Position Per Close</th></tr></thead><tbody><tr><td>Aptos</td><td>$5</td></tr></tbody></table>

When the Net-Equity-Value-to-Capital ratio (inclusive of the Stop-loss Fee) hits your configured Stop-loss Ratio, Eternal Finance will close your position and pay gas cost for you. The gas cost will be covered by this Stop-loss Fee.

#### Liquidation Fee

When the Debt-to-Equity exceeds the liquidation threshold of the pair, your pair will be liquidated to secure debt repayment. 5% Fee is charged at a certain percentage of your Net Equity Value (i.e. after debt repayment).

#### Yield Harvesting Fee

$$
Harvest;Yield;Charge = Harvested;Yield\times 8%\
$$

When Eternal Finance helps to harvest your yield farming rewards by providing liquidity to the pool, 9% of the reward will be charged as gas fee and treasury reserve for the collection. For auto-compound farms, harvested yield after fee will be sold and converted as your liquidity provision.

Please note that the APR/APY shown already factored in this fee, what you see is what you get.&#x20;

#### Lending Charge

A lending charge (currently 19%) on earned yield is reserved by the Eternal Finance Protocol. The strategy for reserve management will be at the discretion of governance.

Please note that the APR/APY shown already factored in this fee, what you see is what you get..


# Liquidation Parameters

{% hint style="info" %}
The liquidation bot will adopt "minimize trading" principal to remove the liquidity and repay outstanding loans, there is a chance that the farmers may get back non-stable tokens or both farming pair tokens subject to the position status at that time.
{% endhint %}

### Liquidation Parameters <a href="#liquidation-parameters" id="liquidation-parameters"></a>

**Work Factor:** The maximum Debt Ratio when opening a position on a pair&#x20;

**Max. Leverage:** The maximum Leverage Level when opening a new position on a pair&#x20;

**Liquidation Threshold:** The maximum Debt Ratio when the liquidation will be executed

#### (Aptos) PancakeSwap Pools <a href="#cronos-vvs-pools" id="cronos-vvs-pools"></a>

| Pool             | Work Factor (Max. Beginning Leverage) | Liquidation Threshold |
| ---------------- | ------------------------------------- | --------------------- |
| ETERN-ceUSDC LP  | 66.67% (3x Leverage)                  | 83.33%                |
| lzUSDC-lzWETH LP | 66.67% (3x Leverage)                  | 83.33%                |
| ceBNB-ceUSDC LP  | 66.67% (3x Leverage)                  | 83.33%                |
| APT-lzUSDC LP    | 66.67% (3x Leverage)                  | 83.33%                |
| APT-whUSDC LP    | 66.67% (3x Leverage)                  | 83.33%                |
| lzUSDC-lzUSDT LP | 66.67% (3x Leverage)                  | 83.33%                |
| whUSDC-whBUSD LP | 66.67% (3x Leverage)                  | 83.33%                |
| ceUSDC-ceUSDT LP | 66.67% (3x Leverage)                  | 83.33%                |
| CAKE-APT LP      | 66.67% (3x Leverage)                  | 83.33%                |
| CAKE-lzUSDC LP   | 66.67% (3x Leverage)                  | 83.33%                |
| CAKE-ceUSDC LP   | 66.67% (3x Leverage)                  | 83.33%                |
| whUSDC-whETH LP  | 66.67% (3x Leverage)                  | 83.33%                |
| ceUSDC-ceWETH LP | 66.67% (3x Leverage)                  | 83.33%                |
| stAPT-lzUSDC LP  | 66.67% (3x Leverage)                  | 83.33%                |
| APT-ceUSDC LP    | 66.67% (3x Leverage)                  | 83.33%                |


# Audit Report

Ottersec Audit Report(updated at 20230228): <https://github.com/eternalfinanceio/audit/raw/main/Ottersec-Audit-20230228/Eternal-Finance-Ottersec-Audit.pdf>


# Automation

{% content-ref url="/pages/OmtG4vjeNcr8o2mmTQL6" %}
[Automated Compounding Bot](/others/automation/automated-compounding-bot)
{% endcontent-ref %}

{% content-ref url="/pages/e58QCBZulOhYHAFmcJfx" %}
[Automated Stop-loss Bot](/others/automation/automated-stop-loss-bot)
{% endcontent-ref %}

{% content-ref url="/pages/rnWHl7vqDYdWv6q5uo1W" %}
[Automated Hedging Bot](/others/automation/automated-hedging-bot)
{% endcontent-ref %}


# Automated Compounding Bot

Albert Einstein once said “**Compound interest is the eighth wonder of the world.** **He who understands it, earns it; he who doesn't, pays it**”.&#x20;

While the marvellous effect of compounding is proven in traditional financial world, it becomes even more crucial and effective in the crypto world thanks to the low transaction fee and speedy turnover cycle.

Our Automated Compounding Bot help yield farmers in two ways:

1. Auto harvest reward and compound your position - Our bot automatically converted the reward to more staking shares upon rewards confirmation, this action continuously amplify your yield farming position to chase for compounded yield return.
2. Save the gas cost with economy of scale - All the positions are gathered together to a vault, any actions altering the vault will lead to the auto-compound effects.&#x20;

The difference of yield farming with and without auto-compounding effect could be very significant. Assuming a farming position (without leverage) who is accumulating 5% trading fee (APR) and 15% yield farming reward (APR) and price of yield farming reward token keep unchanged, the performance with or without daily auto-compounding could be illustrated as follows:

<figure><img src="/files/BzIaVQD2Qv7iSAmaYoo2" alt=""><figcaption></figcaption></figure>

Please note that the above performance curve is only generated under daily compounding, in the real DeFi world it would be a lot more frequent.


# Automated Stop-loss Bot

While all leveraged yield farming protocols come with liquidation thresholds to protect the lenders, there is very little protection for leveraged yield farmers. On top of liquidation thresholds, Eternal Finance introduces Stop-loss ratio, offering an extra layer of protection for all leveraged yield farmers.&#x20;

Every positions are closely monitored by our Automated Stop-loss Bot. Unlike most of the stop-loss mechanism in the market which is based on debt ratio, our Stop-loss Bot monitors the **real-time** position’s value **in terms of USD**. Once the position net value drops below a predetermined protection threshold, the Bot will automatically close the farming position, **convert all the assets to USD pegged stable coins** and return them to the yield farmers.&#x20;

Some of the protocols returns both farming pair of assets back to yield farmers upon liquidation, based on minimum transaction mechanism. We notice that it is of paramount importance not to return the assets in non-stable tokens, as they are still subject to price fluctuation after the farming position is closed.&#x20;

Our Automated Stop-loss Bot let the farmers rest assured that their principals are being well protected on-chain, even you do not check the position status for days or weeks, your farming position is still under control with predetermined factor.


# Automated Hedging Bot

Experienced yield farmers may encounter the situation that though the yield farming rewards are accumulated incessantly, the value of the yield farming position keep dropping due to the price movement of the pair of farming tokens.

To the yield farmers who have originally been hodling both farming tokens (i.e. token-based thinkers), the depreciation of the farming position is mainly due to impermanent loss in terms to number of tokens.

To the yield farmers who place farms in stablecoins (i.e. USD-based thinkers), they are more focused on the return in terms of fiat value. Therefore, the value loss of their farming position is caused by price effect, along with the price drop of the farmed non-stable tokens.

{% hint style="info" %}
**Price effect** refers to the net equity value change due to changes in asset prices in the liquidity pool, compared to your principal. It might be positive or negative, depending on token price fluctuations and trading fee rewards in the pool.&#x20;

**Impermanent loss** refers to the "loss" when you deposited your assets to a liquidity pool to get a share in the pool (LP-tokens) followed by tokens' price change, compared with simply holding the assets on hand. It is the result of fluctuations in the underlying value of the assets being swapped, and happens whenever the relative price of the tokens changed. It is always negative.&#x20;

Please note that price effect is focusing on **ACTUAL** price change while impermanent loss is focusing on **RELATIVE** price change. Thus, it’s possible to achieve 0 impermanent loss but high price effect for the liquidity provision.&#x20;
{% endhint %}

Our Automated Hedging Bot help farmer to hedge the price effects as well as impermanent losses from time to time. Our bot will determine the best timing to rebalance your farming position so as to minimize the potential drawdown, retaining more yields gained as real profits rather than the compensations of the potential losses.

The bot does all the maths and transactions at the backend and rebalances the strategy to delta-zero (to match the amounts of non-stable token held with non-stable token borrowed) with the benefits of:

1. Time-saving of users on calculation, simulation and multiple operations.
2. Rebalancing the amount based on "Net" delta value, so it minimizes the transactional cost as well as slippage.
3. 24/7 continuous monitoring so user could be hassle-free&#x20;

#### The purpose of automated hedging algorithm

Rebalance the position only when it meets the following requirements:

1. The price trend of the non-stable coin is going through tremendous changes&#x20;
2. The accumulated interest of one of the assets is too high and affect the delta too much
3. The leverage level is too high or low to achieve the best risk-weighted rewards


# Risks

Eternal Finance always strives to provide a safe environment for all users of our protocol. We can’t be certain of a lot of things in this era though, and here are some of the major risks that we need to remind you about when navigating the DeFi world.&#x20;

### For Lenders

#### Untimely Liquidation Risk&#x20;

Under extreme market volatility underwater positions might not be liquidated in time. We try our best to lower the risk by having our strategies operating not only according to liquidation thresholds but also stop-loss ratios, offering extra protection to both lenders and borrowers.

### For Yield Farmers

#### Price Impact&#x20;

Price impact is the influence of a user's individual trade over the market price of an underlying asset pair. If the position you are trying to open is large relative to the pool size and requires swapping, a large price impact could be incurred.

#### Impermanent Loss&#x20;

Impermanent loss occurs when farming asset prices change. Our strategies reduce the impact of impermanent loss to minimum by borrowing non-stablecoin assets and thus greatly lowering the crypto exposure. Please do note that, however, even stablecoins can be subject to impermanent loss when they go off-peg, despite that such a situation is by itself unlikely. For more information about impermanent loss, you may refer to the session on the subject in our crash course DeFi in a Nutshell.

#### Liquidation&#x20;

When opening a leveraged position, you are borrowing crypto assets to amplify your potential return. When the debt ratio (debt value/ position value) of respective farm exceeds the liquidation threshold, your position will be liquidated to return the borrowed funds to the lender, with the remaining portion back to you. Our strategies operate on Stop-loss Ratios along with liquidation thresholds to help you recover the better part of your capital even in adverse market scenarios. For more information about the exact liquidation thresholds, visit Pool-specific Parameters. To learn more about liquidation, click [here](/our-products/liquidation-bot).

#### Stop-loss&#x20;

Our Stop-loss Bot tracks the latest net equity value of every position. Once the estimated closing value reaches the Stop-loss threshold, the bot will execute the closing action. Under extreme situations such as (i) sharp price changes, and (ii) unexpectedly large Price Impact that is a result of significant amounts being swapped in a shallow liquidity pool, users might receive less than the predetermined protected amount after the stop-loss.

### For All&#x20;

#### Smart Contract Risks&#x20;

While smart contracts of our protocol have been audited by third-party firms, there could theoretically still be vulnerabilities. We are working hard on turning Eternal Finance bullet-proof. Please learn more about our work and audit information here.

We are trying our best to get rid of all potential risks, and we are trying to be as transparent as possible to all our community members. It’s not only Defi; it’s everything in the world, afterall, that could be so unpredictable at times. As a rule of thumb, don’t put in what you cannot afford to lose.

**Blockchain's Technical Risks**&#x20;

While we tried our best to develop the most effective and best product for farmers, our protocol still runs on the selected blockchain. The blockchain itself may cause different problems, such as:

* Network congestion
* Transaction failure
* Validators halted
* Any other bugs that would result in an abnormal or unexpected situation

&#x20;This may affect our critical operations:

* Delayed Stop-loss transactions
* Delayed liquidation transaction

While we are doing our best to eliminate all the possible risks, DeFi is an industry where unpredicted events may often occur (the dreaded black swans). So please DYOR and invest the amount that you can afford to lose. Try to be as careful with your funds as we are with our code.&#x20;


# Price effect vs Impermanent loss

**Price effect** refers to the net equity value change due to changes in asset prices in the liquidity pool, compared to your principal. It might be positive or negative, depending on token price fluctuations and trading fee rewards in the pool.

**Impermanent loss** refers to the "loss" when you deposited your assets to a liquidity pool to get a share in the pool (LP-tokens) followed by tokens' price change, compared with simply holding the assets on hand. It is the result of fluctuations in the underlying value of the assets being swapped, and happens whenever the relative price of the tokens changed. It is always negative.

Please note that price effect is focusing on **ACTUAL** price change while impermanent loss is focusing on **RELATIVE** price change. Thus, it’s possible to achieve 0 impermanent loss but high price effect for the liquidity provision.

Here are two examples for illustration, but please note that the values here do NOT account for trading fee rewards for simplicity's sake.

**Case 1: Farming in a non-stablecoin-stablecoin Liquidity Pool (LP) in 50:50**

Consider the liquidity pool APT-USDC LP, with USD4,000 principal

Assume APT/USDC = 8

<figure><img src="/files/uPSzr3r0jCX5Eiwq52U3" alt=""><figcaption><p>(# of APT) x (# of USDC) = constant</p></figcaption></figure>

**Case 2: Farming in a non-stablecoins pair Liquidity Pool (LP) in 50:50**

Consider the liquidity pool APT-BNB LP, with USD4,000 principal

Assume APT/USDC = 8 and BNB/USDC = 300

<figure><img src="/files/ab0MCVG2nSNQAo1cjUdM" alt=""><figcaption><p>(# of APT) x (# of BNB) = constant</p></figcaption></figure>


