Everlend Litepaper

Everlend
20 min readDec 7, 2021

SUMMARY

Everlend is a lending and borrowing aggregator that is integrated with all major money markets on Solana. Decentralized and reliable, it continuously provides users with the best yields and interest rates available on the market.

The user who provides liquidity or takes loans through Everlend is completely free of the need to monitor their portfolio and worry about the best rates or yield optimizations and scenarios. Rebalancing and Refinancing algorithms, which are the two main driving forces of the protocol, automatically move deposits and/or loans to ensure the best performance for each position.

The governance of the platform is performed through a DAO with the ELD governance token being its main instrument, and the SPL (Solana Program Library) reference implementation of governance used as a base. Additionally, users will have the opportunity to stake and/or lock their ELD tokens in DAO pools to help the protocol and earn a portion of the platform revenue in return.

Everlend is created by Attic Lab and incubated by Delphi Digital. Both teams are quite well-known in the crypto space and have huge expertise in building DeFi products. The Everlend team takes into account and utilizes the experience and achievements of other DeFi protocols like Compound, Maker, Aave, Curve, and Yearn Finance to build something truly unique and special.

The protocol is built on Solana and written in Rust, all the smart contracts are created from scratch specifically for Everlend¹.

INTRODUCTION

A lending protocol is one of the most common financial instruments on blockchain. What differentiates DeFi lending from a traditional one is that you don’t need to have a credit history which makes it accessible by anyone, instead users have to deposit a collateral to secure their loans. The principle of accessibility is a core idea and the main appeal of DeFi lending, something that has made it so popular over the past few years.

Ethereum is traditionally thought of as a home of DeFi and lending protocols in particular with such protocols as MakerDAO, Compound, AAVE, etc. being the household names that everyone knows and many have used at least once.

However, Ethereum is facing quite a scaling issue at the moment. High fees made Ethereum lending protocols a place for the rich: if you don’t transact a few hundred thousands and aren’t ready to pay tens of thousands of dollars in fees, you’ll soon figure out how economically impractical it is to do your business on Ethereum.

Regular users have to pay around $100 in fees on average to push their transactions through, and as a result they are either unable to respond to the market moves fast enough or have to account for the expenses they will face interacting with the network.

While waiting for the launch of Eth 2.0 regular token holders are forced to look for alternative L1 or L2 networks that could resolve these issues while offering them the same or even better user experience and competitive financial opportunities.

There are several networks that come to mind when one thinks of lending: Polygon, Optimism, BSC, Terra and Solana.

Everyone has realised by now what Solana’s advantages are: it’s fast, cheap, has a big and loyal user base and vibrant DeFi ecosystem and tooling. Given all that, it seemed like a natural solution to be building Everlend on Solana.

What is Everlend?

The Problem

At the moment there are several money markets on Solana offering borrowing/lending services (MangoMarkets, Tulip.Garden, PortFinance, Larix, Solend, Apricot finance, Jet protocol, Parrot finance, etc.) and a few Ethereum protocols have already expressed interest in porting some part of their solutions to Solana as well. The abundance of protocols leads to a natural problem of choosing the most suitable one.

The user who is seeking to provide liquidity or wants to borrow assets is faced with a challenging task of having to consider the following parameters before performing any actions:

  • Deposit yields
  • Loan interest rates
  • Utilization ratio for liquidity
  • Collateralization ratio for loans
  • Liquidation thresholds
  • Overall platform risk

and then having to constantly monitor all of the above in order to rebalance if necessary. This is by no means an easy task for the majority of people.

What is also very important is that there will always be a mismatch between the highest APY deposits and cheapest borrows. The best APY for lenders is the worst borrowing rate for borrowers.

Aggregation is a logical step to tackle this issue. A similar situation led to the creation of solutions like Yearn Finance. However, Yearn Finance only works with lenders and not with borrowers. Infact, there are virtually no dApps offering loan optimization to their users on the market at the moment. Everlend is set to change this and blaze the trail for others to follow.

The Solution

Everlend is a money market aggregator and optimizer for both deposits and loans.

To put it simply, Everlend offers you the best yields on your deposits and the lowest rates on your borrows². As parameters of the underlying money markets change and new markets appear, Everlend will rebalance and refinance automatically to continually optimise the user’s position.

By using Everlend the user is offered the following features:

  • Liquidity aggregation and optimization. You always get the best yield on your deposits.
  • Loan optimization. Loans are refinanced and moved between protocols to ensure the user always pays the lowest rates on the market.
  • Everlend accepts any liquidity token or collateral that is supported by the underlying platforms.
  • Decoupling deposits and loans. Deposits and loans of the user can be processed through 2 or more different MM to maximize the gain (see the diagram above).
  • Battle tested risk framework. All the underlying money markets are assessed and scored. The final score is the key when deciding how much liquidity should be assigned to a particular lending protocol.

Below is the graphical representation of the platform architecture.

Deposit Management

All the liquidity that gets into the protocol is managed by two key components (modules): universal liquidity pools and a liquidity oracle.

Universal liquidity pools consist of five different interconnected pools: liquidity pool, income pool, safety fund, treasury pool and MM pool.

Each pool serves its own purpose.

Liquidity pool

The pool that receives user funds as deposits and distributes them to money markets as loans. It collects a percentage of profit from the income pool.

Income pool

The pool that accumulates all the platform profit and then distributes it to other pools: Liquidity pools, Safety Fund and Reserve pools.

Safety Fund

This pool is a crucial part of the security of Everlend. In the case of the shortfall event, up to 100% of the Safety Fund is used to make users whole. 50% of all the platform fees are redirected to the Safety Fund until it hits the threshold (the threshold is to be determined through governance).

Treasury

DAO Treasury is the growth fund set in the ELD token. The pool does not receive any portion of the platform fees unless decided otherwise by governance.

MM pool

A part of the liquidity from the liquidity pool can be moved to the pools on the underlying money markets. MM pools store the e-tokens which were received in exchange for the provided liquidity. Additionally, funds can be taken from this pool when a new loan is taken on the underlying money market on behalf of the user.

ELD Staking Pools

ELD holders have a possibility to stake their tokens and earn rewards for participating in the Everlend governance process. Staked/Locked ELD provides the right to participate in governance and boosts the protocol efficiency.

Liquidity Oracle (LO)

Liquidity Oracle is an integral off-chain part of the platform and the core component for rebalancing liquidity and refinancing borrow positions.

LO serves three purposes:

1. Keeping the utilization ratios at the recommended and safe levels (always leaving enough liquidity for withdrawals).

2. Continuously gathering information on the lending rates on all the underlying MMs, which is ubsequently used for rebalancing.

3. Shuffling liquidity in such a way that the platform can refinance a particular borrowing position (if possible).

LO continuously monitors and keeps track of the following:

  • Liquidity pool stats
  • Rates on the underlying money markets
  • Pool utilization ratios of the underlying money markets
  • Existing loans and their interest rates

Having collected all the information, LO then builds a liquidity distribution matrix for each individual asset within the protocol. Liquidity distribution matrix defines in what proportion the funds in the pool are to be distributed and/or kept in the pool for withdrawals and direct lending.

While building the liquidity distribution matrix LO takes into account both the maximum yield for the liquidity providers and minimum interest rate for the borrowers. Since these two are frequently mutually exclusive it has to reach a compromise.

Liquidity Oracle itself uses a reward function for optimization. The function consists of both liquidity provider and borrower rewards (including liquidity mining rewards). After finding the optimal solution LO saves it on-chain to be then used by the Rebalancer. Once rebalancing is complete LO runs again, most likely coming to a slightly different optimal solution.

Loan Management

All loans are governed by two entities: Borrowing Oracle and Borrowing Proxy.

Borrowing Oracle continuously monitors the rates on all of the supported lending platforms and provides the information to the Borrowing Proxy. This information is used for both opening new positions and optimizing the already existing ones (refinancing).

The borrowers have to deposit liquidity before they can take any loans. In return they receive e-tokens which can serve as deposit obligations or collateral. E-tokens are used by the Borrowing Proxy as collateral for giving out loans.

All loans have a collateral ratio (CR) which is based on the riskiness of the asset itself. If the price of the collateral drops or the value of the loan increases, the position becomes undercollateralizedand the liquidation procedure is triggered on the underlying money market.

Everlend CR is effectively inherent from the aggregated money market.

Borrowing Proxy

Borrowing proxy is the main contract that handles all borrowing. This is also the contract users interact with when taking loans. Borrowing proxy interacts with Borrowing Oracle to verify the lowest available cost of loans on all underlying money markets, it then takes the share tokens from the borrower as collateral and calls the underlying money market interface contract.

Income management

The profit of the protocol is generated from 2 streams:

  • Deposit management fee
  • Refinancing fee

As an aggregator Everlend charges two types of fees: management fee and performance fee.

For operating user liquidity the platform takes a flat management fee of 2% that is charged upon each deposit and/or withdrawal and is based on rebalancing efficiency.

Upon each refinancing occurrence a performance fee of 20% is charged by the protocol. The fee is charged retroactively which means that the fee is charged on each following occurrence of the refinancing cycle for the cycle that has happened before. In such a way the user is never charged for future rewards but only for the received ones.

Both management and performance fees only apply to the gained or saved up funds.

All the fees are directed to the Income Pool and the distribution is triggered by the Income Distributor. Income Distributor is an off-chain entity that can be triggered by anyone as long as its use is economically viable.

The fees from deposit management and refinancing are distributed in the following proportions:

  • 50% goes to the ELD stakers
  • 50% goes to the Safety Fund until a threshold is reached
  • 0% goes to the Treasury (unless changed by DAO)

Rebalancing and Refinancing

Rebalancing

The concept of rebalancing or liquidity yield optimization is not new and serves as a foundation for many DeFi projects. In essence it is the process of moving liquidity depending on the yields offered by the underlying services. Yields, however, are not the only thing that should be taken into account.

Everlend rebalancing is an on-chain process which changes actual liquidity distribution share according to the distribution matrix built by the Liquidity oracle. Since rebalancing between protocols affects the solution of the optimal liquidity distribution problem every time it is run, rebalancing is always gradual and happens continuously. This means that each rebalancer execution cycle rebalances a fraction of liquidity and lets the Liquidity oracle adjust its distribution matrix before conducting rebalancing again. As a result, this forms a feedback loop which eventually brings liquidity distribution to the set point provided by the LO.

After the rebalancing cycle is finished all the inputs and outputs are logged.

Refinancing

In simple terms, this is the process of repaying a loan using the available liquidity and entering the same debt position on a different money market with better borrow rates.

Refinancing starts with the Borrowing oracle which monitors interest rates on all of the underlying money markets and compares them with the rates of existing positions. As soon as a platform that offers a lower interest rate on a particular loan is found, the information is passed on to the Liquidity Oracle. The Liquidity oracle assesses the amount of liquidity necessary to close the position and reopen it elsewhere and the amount of liquidity available in the corresponding pool. If there is enough liquidity in the corresponding pool the Refinancer is called to send all the necessary transactions.

However, what happens if there is not enough liquidity in the pool to perform refinancing? In this case the Liquidity oracle is triggered and tasked with freeing up the amount of liquidity sufficient for refinancing to take place.

Note that the process depicted above is asynchronous. As described in the Rebalancing section, the process of rebalancing is never done at once but is rather gradual. Thus, it can take several rebalancing cycles before enough liquidity is obtained and the loan can be refinanced.

For refinancing to be executed several points are considered beforehand:

  • Available liquidity for repaying the loan or taking a new one.
  • How the withdrawal of liquidity will affect the utilization ratio and subsequently yields (optimal liquidity distribution)
  • Whether the same collateralized asset is accepted on a destination money market
  • Available liquidity for placing the collateral, since the collateralization ratio may vary from protocol to protocol.
  • The profitability of refinancing considering the cost of all the txs involved.

All the calculations and modelling are happening within the Borrowing and Liquidity oracles before the Refinancer is called to perform the actual transactions.

Both Rebalancer and Refinancer are on-chain entities that will be initially triggered in a centralized way but in the future will operate based on the strategies built by anyone and approved through the governance process.

Loss Protection System

Everlend DAO Loss Protection System aims to protect lenders from the risk of borrowers defaulting. It has three tiers:

1. Liquidations

2. Safety Fund

3. Everlend DAO staking pool

The first tier is activated on the underlying money market when collateral price drops below Margin Collateral Ratio. The second tier complements the first one, and is used automatically when a regular liquidation does not cover the losses from collateral depreciation. DAO staking pool acts as a third backstop in case of protocol defaults. In exchange for underwriting the protocol risk, the stakers receive a portion of protocol fees and the right to participate in governance.

Shortfall Event

A Shortfall Event is initiated by the ELD holders in two cases: a) when liquidation of problematic positions and reserve funds are insufficient to recover the losses caused by collateral depreciation, b) when liquidation of problematic positions and reserve funds are insufficient to recover losses caused by the borrowed asset appreciation. On initiation of the Shortfall Event, the market of the problem asset is put on hold and the use of the asset(s) as collateral or loan temporarily becomes unavailable and the protocol starts recovering losses (in case of the borrowed asset appreciation both markets are put on hold).

The funds from the Safety Fund are the first in line. In case of the shortfall event up to 30% of the Safety Fund is put on the Dutch auction to recover the losses on depreciated assets. The funds received from the auction are used to recover losses of a corresponding asset pool.

If 30% of the Safety Fund turns out to be insufficient to cover the losses, the ELD staking pool serves as the next backstop in line. Up to 30% of the ELD holdings can be slashed to make users whole.

If there’s a deficit event that depletes Safety Fund and 30% of the assets staked and locked in the Everlend DAO, the DAO can decide either to mint additional ELD, issue IOUs to be paid in the future or use treasury funds to cover the deficit.

Tokenomics

Token Architecture

The ELD token architecture is designed to ensure that the Everlend DAO has skin in the game, underwriting protocol risk and protecting lenders from the consequences of potential Shortfall Events in underlying protocols. Everlend utilises a two-tranche architecture to protect users, comprised of the Safety Fund held in stablecoins and the ELD staking pool, held in ELD tokens.

ELD Staking and Locking

ELD holders will be able to participate in the DAO (and receive governance rights and protocol fees) by staking or locking their tokens in the DAO in the following ways:

  • Staking ELD in the xELD pool: ELD holders may stake their ELD in the xELD pool to receive xELD tokens, activate their governance power and accrue a share of protocol fees (funded with one-half of the Everlend DAO’s share of protocol trading fees). xELD is inspired by SushiSwap’s xSUSHI token / xSUSHI pool.
  • Locking xELD in the vxELD pool: xELD holders may lock their xELD in the vxELD pool to receive vxELD points, amplify their governance power and receive an additional share of protocol fees. vxELD is inspired by Curve’s pioneering veCRV model.
  • Staking ELD/USDC: ELD holders will also be able to stake their ELD/USDC LP tokens into governance, maximising their yield. This will be a separate pool (yELD) which will have the same functionality as the xELD pool.

As was mentioned before, funds staked or locked into the DAO act as the second backstop in case of a shortfall event. Being the second backstop in case of a deficit means that users who stake or lock their tokens in the DAO will only be slashed whenever a deficit wipes out the Safety Fund. In that case, we propose that DAO stakers and lockers be slashed up to a maximum of 30%* of their holdings. If there’s a deficit event that wipes out the Safety Fund and 30% of the assets staked and locked in the ELD Staking Pools, the DAO can decide either to mint ELD, issue IOUs to be paid in the future or use treasury funds to cover the deficit.

Another important aspect worth noting is that, given that the DAO is composed of three pools of funds (the xELD pool, the vxELD pool and the yELD pool), protocol fees that flow to the DAO will need to be divided between these three pools. Initially, we propose that DAO fees are divided equally* between these three pools.

ELD supply and distribution

The maximum supply is set at one billion of ELD tokens which are going to be distributed according to the chart below:

  • 47% of the ELD supply goes to the DAO
  • 25% out of 47 are to be used for Liquidity Mining with 11% being distributed during the first year⁵.
  • 30% of ELD tokens go to the team and advisors. They have the longest vesting schedule
  • 17% of the ELD supply goes to the investors and early backers.
  • 5% is dedicated to the Growth Fund which will be utilized for immediate partnerships and grants until the DAO is set up and functioning.
  • 1% of ELD tokens are to be airdropped to the platform users. The eligibility conditions will be announced closer to the token launch date.

Important note, the Everlend team in accordance with the vision described in the litepaper aims for fully decentralized governance of the Everlend platform.

Liquidity Mining

Taking inspiration from Curve, Everlend’s liquidity mining program will also be managed by DAO. The emission of ELD tokens will be split between parts of the network that currently require stimulation in order to maintain protocol growth and development.

Issuance of tokens will be distributed towards 3 type of network participants:

  • yELD token holders — ELD/USDC liquidity providers are rewarded with the emission of ELD tokens to incentivize them to build the deep liquidity for Everlend Token.
  • Lenders — emission is distributed to lenders to incentivise support of new markets and increase the capital base in the early stage of the development. Moreover lenders are able to boost their ELD rewards if they lock their xEverelend or vxEverlend tokens in the boosting contract together with their lending positions.
  • Borrowers — emission is distributed to borrowers in the form of cashback. Borrowers can also boost their ELD rewards by locking up xELD or vxELD in the boosting contract to offset the cost of their borrowed position.

ELD tokens stakers (xELD or vxELD token holders) can also benefit from the emission, by locking up their xELD or vxELD together with their positions in the boosting contract.

Governance

Everlend protocol is governed by users with staked ELD. The main areas of the protocol governance are: Everlend markets management, DAO Treasury management, and Everelend protocol development.

Everlend Markets management

The management of the Everlend aggregator will essentially revolve around adding/removing protocols to be aggregated, protocol fee management, and risk parameters.

Besides that, ELD stakers could change other protocol parameters: collateral auction parameters, a share of the Safety Fund used during a Shortfall event etc.

DAO Treasury management

EverlendDAO Treasury is a part of ELD initial supply which will be used to fund Everlend protocol development and promotion. These funds are controlled by the ELD stakers. Anyone could submit a proposal for Everlend protocol development or promotion. If this proposal passes initial community review and gets required support, then ELD stakers could vote to fund the proposal. ELD holders can also vote for diversification of the Treasury.

Everlend protocol development

Anyone can submit an Everlend Improvement proposal offering new protocol features or other changes to its code. If this proposal passes initial community review and gets required support, then ELD holders could vote for implementing this proposal or against it.

Smooth decentralization

None of the successful DeFi projects had a full-fledged DAO from day one. At early stages of a protocol development the protocol team should have an ability to save the protocol from different threats, and to react quickly. Also not all parts of these projects were decentralized from day one.

Evelend is not an exception — at the first stage, the Everlend team will play a Guardian role. ELD holders could submit proposals and vote for them, but implementation of these proposals is on the Everlend team. The same with the protocol parts: some of them start as a centralized solution.

As Everlend protocol and its community matures, and ELD holders become more experienced, the protocol team could start a process of smooth decentralization. The result of this transition is a full-fledged EverlendDAO where ELD holders are the only entity responsible for the protocol’s success, and a protocol functioning in a fully decentralized way.

Long-term vision and further exploration

Everlend money market

Building a money market to complement the aggregator would simplify a lot of the processes and offer additional solutions for the user. It is obviously not possible until the aggregator features are implemented and battle tested.

Cross-chain

The Wormhole bridge can be utilized as a gateway for any crypto project and assets to be moved to Solana and effectively Everlend. There is no reason why a user can’t borrow coins native to one chain, e.g. SOL while using the coins of the other chain as a collateral, e.g. Atom. Such a solution allows to lower the barrier for regular people and also helps to aggregate liquidity in one place instead of dispersing it ineffectively among many networks. To a regular user all this level of complexity of cross-chain transfers is hidden by the user interface and all the transfers are optimized through Stellar-like bundled transactions.

Rebalancing and Refinancing strategies

Rebalancing and refinancing leave a lot of room for experimenting and possibly building products on top of them. We envision there will be a separate group of users — strategists focusing solely on finding and optimizing lend/borrow strategies.

Disclaimers

This paper is only a presentation of information, ideas and speculation regarding possible technologies, the possible uses of those technologies and a possible community of users and builders of those technologies. The statements contained in this paper do not provide any advice, representation, warranty, certification, guarantee or promise relating to these technologies, any uses thereof or any of the other matters discussed in this paper, nor does this paper provide an offer or agreement to make such technologies available, maintain or update such technologies, or sell or buy any asset or enter into any transaction. This paper and the matters described in this paper have not been reviewed, approved, endorsed or registered with any regulator or other governmental entity, and the authors of this paper are not licensed by any regulator or other authority to provide any legal, financial, accounting, investment or other advice or services. The forward-looking statements in this paper are subject to numerous assumptions, risks and uncertainties, and thus the events described or predicted therein are subject to change or to fail to occur in accordance therewith. We undertake no obligation to update, supplement or amend any statement that becomes inaccurate or incomplete after the date on which this paper is first published, or to alert the public as to any such inaccuracy or incompleteness, whether such inaccuracy or incompleteness arises as a result of new information we receive, changes of our plans, unanticipated events or otherwise. The technologies and assets described in this paper are highly experimental and risky, have uncertain and potentially volatile value, and should be directly evaluated by experts in blockchain technologies before use. Use them solely at your own risk. You should not rely on this paper as a basis for making any financial or other decision.

Appendix A

Primer: Money Market Basics

A money market or a lending protocol is considered to be a basic financial primitive and an essential piece of the DeFi landscape for any network. Providing the possibility to lend excessive liquidity to those who have a better use for it is a crucial first step to building a robust financial ecosystem and a necessary measure that ensures overall asset efficiency.

Every money market contains two types of users: liquidity providers (lenders) and borrowers, quite often it can be the same person that acts as both.

All the liquidity is stored in pools based on the asset types and is used for giving out loans. For tapping into liquidity the borrowers pay interest which is then shared with lenders. Each pool may have a different yield which is based on parameters like utilization ratio and asset risk management parameters.

In order to take a loan the user needs to deposit a collateral for their position. The borrowers need to bring in more collateral dollar wise than the amount they are willing to borrow. Besides, the level of overcollaterization shouldn’t go below a certain level (liquidation threshold) otherwise the position might become fully or partially liquidated.

Liquidation is a way for the platform to safeguard itself from losing lenders money. Money markets are perfect for traders, investors and users who would like to receive continuous passive income without much trouble.

In order to take a loan the user needs to deposit a collateral for their position. The borrowers need to bring in more collateral dollar wise than the amount they are willing to borrow. Besides, the level of overcollaterization shouldn’t go below a certain level (liquidation threshold) otherwise the position might become fully or partially liquidated.

Liquidation is a way for the platform to safeguard itself from losing lenders money. Money markets are perfect for traders, investors and users who would like to receive continuous passive income without much trouble.

Appendix B

Primer: Solana

Solana is one of the networks that stands out from the rest by offering the highest TpS across the whole decentralized blockchain space, easily handling the current demand and volume of several big networks combined even during peak hours and thus creating new business models which were not possible before. On top of that, Solana strives to create a safe haven for developers and projects building on or migrating to it and currently has over 100 teams building their products and even subnetworks.

Solana has a vibrant DeFi ecosystem backed by all major exchanges, funds, market makers, etc. and has all the necessary DeFi tooling present on the protocol and smart contracts level: Wormhole bridge, Pyth oracles, several AMMs, liquid staking (Lido, Marinade), stake pools, etc. creating solid underlying financial infrastructure and basic DeFi primitives is one of the main goals for any network that wants to focus on DeFi.

A lending protocol is a basic DeFi primitive and a vital piece of this infrastructure as a tool that allows people to perform leverage trading, participate in IDOs and other investment opportunities and offers a whole lot of farming opportunities.

Because of all these advantages it seems like a logical and natural solution to build a lending protocol on a chain that can solve major Ethereum issues.

--

--

Everlend

Decentralized, cross-chain lending protocol with yield farming and liquid staking powered by Solana and built by Attic Lab and Everstake.