## Landing Protocol
**Abstract:**
Novel protocols in lending face hurdles around security/lindiness when trying to develop their own solutions. Landing attempts to fix this by providing a simple base solution that allows for a high amount of composability and innovation in lending logic.
A simple oracleless lending protocol is provided as PoC.
[Landing Github](https://github.com/mergd/landingprotocol)
### The Loan Coordinator
The Coordinator keeps tracks of the loans being made and enforces specific aspects of the loan lifecycle.
This simplicity and focus on only specific aspects of the loan lifecycle, in conjunction with state update hooks that allow for loan information to be synchronously updated to both borrowers and lenders – allowing for a greater degree of composability and innovation in business logic.
This limits lender harm to the following issues:
- calling the dutch auction arbitrarily
- unfairly rebalancing the interest rate
- griefing
-All of which can also be mitigated. In other words, the surface area for exploits and attacks becomes dramatically reduced.
The coordinator custodies the collateral, and in the case of a default/calling of the loan, the vault also manages dutch auctions for the collateral.
This contract is immutable and takes no fees and there are only a few restrictions:
- No rebasing nor fee on transfer tokens for either collateral or borrow
- The lender needs to be a contract and support the Lender interface
There are set intervals here: 8hrs, 1 day, 2 days, or 0 that this can be set to.
This 'cooldown time' for callability is meant for long tail assets such as NFTs, or illiquid positions that don't have robust oracles.
### Interest
By default loans are perpetual so the agreed upon interest accrues perpetually on a compounding basis. The cooldown also applies to rebalancing the interest rate on the loan, and is capped at 200%.
The lender counterparty needs to be a contract as it needs to support the loanVerify hook which allows the loan to begin. However, a contract can allow for user signatures, allowing for a practically P2P experience for this lending.
When the loan is called, the loan is put up for a dutch auction – and the proceeds of the auction compensate the lender's principle + interest + penalty, and the remaining is paid to the borrower.
Walking through a concrete example:
- A borrower has an stETH/cbETH LP and they want to borrow USDC
- They navigate to the UI, where a pool is set up that is offering some rates.
- The offer might be – borrow up to 60% of your LP in USDC at a 5% APY
After this period, the loan is perpetual – if neither the lender claims the collateral, or the borrower doesn’t repay. Instead, interest continues to accrue at the agreed rate (5%) during this period
### Liquidation
After the nonliquidation period is over (of if it's set at all), the lender can choose to call the loan and trigger a liquidation dutch auction at any time for any reason.

- An auction begins for the collateral where an increasing amount of collateral is offered for the entire debt amount.
- If there is any surplus collateral after this, it's returned to the borrower.
- If by the half way point, there's no bidders, all of the collateral is offered to the liquidator and instead, the amount of debt token decreases instead.
- If there’s a small liquidator bonus we can delay it and tie this to the amount of borrower surplus there is.
- If the loan isn’t underwater – the recorded surplus would be very high and liquidator wouldn’t see any rewards.
- If it’s low, or even negative (pool loses money), the maximum amount of rewards for a liquidator would be provided
- e.g. On a loan of 5k USDC on 5 ETH worth of collateral where the auction clears for 4 ETH, 1 ETH is returned to the user
In order to avoid these liquidations and maximize their LTV, borrowers can continue to roll their collateral with new terms after the minimum duration is ended – although they don’t lose if their collateral is liquidated since they also see the surplus – unless they have a very large position that incurs slippage.
Note that setting the auction duration to 0 directly skips this auction process and sends the collateral directly to the lender.
For additional composability, there are state-update hooks which can be used to update the Lender contract state with the latest accounting details.
There's some state update hooks for borrowers as well.
As an example for what the kinds of business innovation that can be offered by this framework, I propose MIN, a novel oracleless stablecoin.
### MIN: a decentralized stablecoin without oracles
There can be a decentralized stablecoin built on Landing protocol. No need to rely on factory since this is completely immutable.
Initially this is single collateral, but no reason why not to make it multicollateral
#### Origination:
The system makes a pessimistic assumption that the highest unliquidated position (known as the HUP) is below the current price of the collateral – suppose ETH. The system's ability to make high LTV loans is dependent on there being loans in the system to mark this HUP as high as possible.
Any loan can be originated as long as it's below the HUP at whatever fixed terms are available.
The question comes – HUP can easily go down, so how does it go up? The system allows for wiggle room at the LUP.
These params would be fixed, but there could be loans originated at 2% above the LUP, although there's increased APY for loans made above the LUP. Just as a sanity check, these loans cannot exceed 10% of the MIN supply in order to prevent any attacks on price, and only 1 loan can be made per period.
A simple fee token could also be provided to borrowers who make loans that exceed the HUP, where if the loan is paid back after the nonliquidatable period is over, the borrower gets rewarded – since they're helping with price discovery on the system

#### Liquidations:
Liquidators need to collateralize their ability to liquidate – so a kind of bond
The bond needs to be a percentage of the amount they can liquidate
- e.g. liquidator that bonds 10k can liquidate any positions up to 500k – 2% collateralization for bond.
- This is to prevent either stop hunting, or outright trolling of open positions.
The liquidator bond can’t be rehypothecated for multiple liquidation attempts, if the auction duration is short, this is fine.
- The liquidator’s performance is determined by the clearing price spread – the difference between the final dutch auction clearing price and the amount of debt the user had.
- the slashing can be linear in growth – e.g. if the spread exceeds 5%, every percent of extra spread leads to 2% of liquidator collateral being slashed and a portion of it is returned to user (maybe have a governance token, or a PSM style reserve?)
- A greater 'margin of error' for this liquidation corresponds to a lower effective LTV because it becomes profitable to liquidate a loan earlier.
If the liquidation penalty in the P2P lending protocol is set at 0.5% of principal+interest – this is the maximum reward that a liquidator can receive
- if the spread is below 5% the reward increases linearly from 0, and if it goes negative (protocol is now incurring bad debt), the reward is maxed out at 0.5%.
- This creates market pricing for liquidation rewards since liquidator is encouraged to liquidate as fast as possible as soon as it’s +ev!

### HUP
One of the key aspects of the system that needs to be competitive is having a dynamic HUP that is responsive to changes (notably increases) in the price of the collateral.
One way for this to occur, is to reward the current highest unliquidated loan with the interest income from others.
If there are many loans in the system, this role becomes more lucrative to take on.
This encourages competition to be the highest unliquidated price. Some delay can be added to prevent unsustainable increases in price.