Technical Abstract
Xchange is built on a forked version of the Uniswap V2 Factory, Liquidity Pair, and Router contracts. There are two notable changes:
● The Liquidity Pair contract has added safeguards to allow it to support leveraged liquidity additions that ensure the leverage remains collateralized and can be liquidated in the event of loan default and appropriately manage Liquidity Tokens during an active Initial Liquidity Loan.
● The liquidity provider fee has been reduced from 0.3% to 0.2%. This reflects the reality that in many cases the liquidity providers for tokens are actually the token creators and the benefit they receive is more often via token price appreciation or token fees, not liquidity providing.
Additionally, the User Interface will allow a seamless experience trading across other Uniswap V2 style decentralized exchange pairs (such as uniswap or sushiswap).
Trading Functionality and Swap
Similar to Uniswap, token swaps in Xchange are a simple way to trade one ERC-20 token for another.
For end-users, swapping is intuitive: a user picks an input token and an output token. They specify an input amount, and the protocol calculates how much of the output token they’ll receive. They then execute the swap with one click, receiving the output token in their wallet immediately.
Lending Pool
Lending Pool Overview
To provide leverage to the system, the Lending Pool acts as the manager of both funds and loans. This contract will be interacted with by Xchange.
Lending Pool Funding
To fund the Lending Pool, ETH from the X7 token ecosystem has been accumulating in the Ecosystem Splitter and will be the first liquidity deposited into the Lending Pool. This ETH will be locked forever and will grow over time. Users are also able to contribute to the Lending Pool via Deposits.
Lending Functionality
Lending is a fully automatic process managed fully by Xchange’s interfacing with the Lending Pool via Initial Liquidity Loans.
For end-users, wanting to participate in lending: a user selects the amount of Ether to deposit or withdraw from the Lending Pool. Receipts for deposit are issued in X7 deposit, redeemable 1-to-1 with Eth, and may be staked for a portion of the loan fees.
Initial Liquidity Loan
An initial liquidity loan provides a mechanism to add initial liquidity to an automated market making trading pair with borrowed capital. The terms and conditions for borrowing this capital and returning it to the lender provide for the lender and the borrower to manage their cost of capital and repayment schedules in a way that supports the nature of the offering and the size and duration of the loan.
Initial Liquidity Loan Terms
Loan terms are defined by standalone smart contracts that provide the following:
- Loan origination fee
- Loan retention premium fee schedule
- Principal repayment condition/maximum loan duration
- Liquidation conditions and Reward
- Loan duration