-
Notifications
You must be signed in to change notification settings - Fork 1
OIP1: Asset Feature - MLP2 (Market Liquidity Pool 2) #2
Description
OIP: 001
Title: Asset Feature - MLP2 (Market Liquidity Pool Version 2)
Author: [bench] <https://github.com/froooze>
Status: Draft
Type: Protocol
Created: 2020-06-11
Abstract
- MLP2 is an asset lending feature, to provide liquidity for asset exchanges, at the current price level
- Simplified version of the Bancor Protocol without connector weight
- Stepless liquidity with no order book for any asset pair
- Blockchain as borrower and liquidity provider
- ONS as central node and base currency
- Market fees are shared to asset lender and blockchain
Motivation
- User has no easy way to provide liquidity to markets
- Most order books have low liquidity and high market spread
- Order books are dependent on certain price levels
Rationale
- Provide an easy, effective and robust liquidity feature for every user, asset and asset pair on the protocol level
- Generate demand for ONS and income for Onest Blockchain
Solution
- Every
assetpair can have theMLP2asset feature - The
MLP2asset feature is based on the x * y = k modell x=amount_asset_X,y=amount_asset_Y,k=invariantMLP2is separated in passive and active liquidity, to allow one asset deposit/withdraw
Exchange
- The ratio of
amount_asset_X/amount_asset_Yorprice_assetdefines the asset exchange rate - The
invariantis not changed during the asset exchange amount_asset_X* sqrt(price_X) =amount_asset_Y* sqrt(price_Y)
Passive liquidity
- Passive liquidity gets created, when there is an unequal amount of assets, because only one asset was removed/added from/to the
MLP2. - Passive liquidity needs an equal amount of the corresponding asset, to become active liquidity.
- Passive liquidity, which was created by removing assets from
MLP2, are prioritized for active liquidity over newly added assets. - The reduction of passive liquidity is defined by the smaller order of both assets.
Add/remove asset(s) from MLP2
Add an equivalent amount of both assets
- No passive liquidity
- No waiting time
- Highest market fee share
Remove an equivalent amount of both assets
- Passive liquidity is not changed
Add only one asset
- Instantly, when it is the inverse asset of the passive liquidity
- Waiting time, when it is the asset of the passive liquidity
- Lower market fee share
Remove only one asset
- No waiting time
- Active liquidity gets reduced
- Passive liquidity can get increased or decreased
MLP2 start values
MLP2 after quadruple ONS price or asset sell for half amount_ONS
MLP2 Charts
amount_ONS*amount_asset=invariant- sqrt(
price_ONS) *amount_ONS= constant - sqrt(
price_asset) *amount_asset= constant price_ONS*price_asset= 1
Fee structure
The asset owner, defines the fee structure for the MLP2
The market fee share to network is defined by the network.
ONS market pairs
- Only paid in ONS
- Only for ONS ->
assettrading - Added partial after the exchange to the
MLP2 - Shared to both assets lenders
Other market pairs
- Paid in both assets
- Paid in both directions
- Added both partial after the exchange to the
MLP2 - Shared to both asset lenders
- Network cut gets settled by the corresponding ONS market pair
Example fee schedule
0.6% ONS -> asset market fee
- 75% for the MLP2 asset holder (= 0.45%)
- 5% for referral system (= 0.03%)
- 5% for the reserve pool (= 0.03%)
- 15% for the asset owner (= 0.09%)
0.3% asset -> asset market fee
- 75% for the MLP2 asset holder (= 0.225%)
- 5% for referral system (= 0.015%)
- 5% for the reserve pool (= 0.015%)
- 15% for the asset owner (= 0.045%)
Price Distribution
Network Example with different MLP asset features
Market Dynamics
- Every asset exchange uses the full inventory of the
MLP2asset feature - Every
assetis backed by same value of the otherasset - When ONS price decreases, demand for ONS is increased
MLP2 price changes
ROS = (Relative Order Size) = amount_order/active_mlp
Premium on the exchange rate compared to the current price_asset
| ROS | Premium | delta_price_asset |
|---|---|---|
| 0.1% | 0.1% | 0.2% |
| 1% | 1% | 2% |
| 5% | 5% | 11% |
| 10% | 11% | 23% |
| 20% | 25% | 56% |
| 50% | 100% | 400% |
Orderbook
- Supported with extra liquidity
- Reduced market spread
- Any trading pair can have liquidity with ONS as central node
- Asymmetric
market feereducesasset/assetmarket spread
Price feed
The MLP2 asset feature is not only exchange feature, but also a price feed indicator, which oscillates around the market price.
Manipulation
- Shorting ONS on
MLP2generatesmarket feeand market spread - Shorting ONS generates extra demand for ONS
- Arbitrage pays no
market feeand gets an advantage to increase ONS price on DEX
Comparison
Lending options
| Case | MPLP | MLP2 |
BSIP-70 |
|---|---|---|---|
| Motivation | interest rate | market fee | interest rate |
| Borrower | peer | blockchain | peer |
| Input | debt asset | any asset or asset pair | any asset |
| Purpose | increase CR & debt |
increase liquidity | lending/trading |
| Collateral | no | no | yes |
| Order book | no | no | yes |
Implementation
| Case | MLP2 |
Uniswap2 |
|---|---|---|
| Market fee | a-/symmetric | symmetric |
| Assets | ONS assets | ERC-20 |
| Non-core markets | yes | yes |
| One asset support | yes | no |
| Fee share | yes | no |
Specifications
Network_parameter
fee_share_for_reserve
MLP_parameters
asset_idmlp_fee_ratefee_share_assetfee_share_mlpfee_share_referral
MLP_object
asset_iddelta_asset_balanceuser_idmlp_function_id
MLP_asset_functions
x = active_amount_asset_X
y = active_amount_asset_Y
x_p = passive_amount_asset_X
y_p = passive_amount_asset_Y
Add both assets
if (y/x == delta_asset_X / delta_asset_Y) {
x += delta_asset_X
y += delta_asset_Y
}
Add one asset
if (delta_asset == passive_asset) {
mlp_passive += delta_asset
}
if (delta_asset_1 != passive_asset) {
mlp_passive -= delta_asset_2
mlp_active += delta_asset_1
}
Remove both assets
x -= delta_asset_X + market_fee_share_X
y -= delta_asset_Y + market_fee_share_Y
market_fee_share = ∫(market_fees * mlp_share)dn
Remove one asset
if (delta_asset_1 == passive_asset) {
mlp_active -= (delta_asset_1 + market_fee_share_1)
mlp_passive += delta_asset_2
}
if (delta_asset_1 != passive_asset) {
mlp_active -= (delta_asset_1 + market_fee_share_1)
mlp_passive -= delta_asset_2
}
market_fee_share = ∫(mlp_fee_rate * fee_share_mlp * mlp_active/(mlp_active + mlp_passive))dn
Exchange ONS to asset
mlp_fee = amount_ONS * fee_rate_mlp * fee_share_mlp // calculate fee cut for MLP2
x += mlp_fee // add fee to MLP2
k = x * y // calculate invariant
x += amount_ONS * (1 - fee_rate_mlp) // amount to exchange
amount_asset = y - k / x // amount to return
Exchange asset to ONS
k = x * y // calculate invariant
y += amount_asset // amount to exchange
amount_ONS = x - k / y // amount to return
Exchange asset_1 to asset_2
mlp_fee = amount_asset_1 * fee_rate_mlp * fee_share_mlp // calculate fee cut for MLP2
x += mlp_fee // add fee to MLP2
k = x * y // calculate invariant
x += amount_asset_1 * (1 - fee_rate_mlp) // amount to exchange
amount_asset_2 = y - k / x // amount to return
Flow Chart
Discussion and Summary for Shareholders
- This is a very important feature, to strengthen our infrastructure, use case and core token value
- This enables every user to take part in value creation and earning market fees at the same time
Risks
- Adding only one asset to the liquidity allows to increase rewards or looses.
Copyright
This document is placed in the public domain.









