-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OIP1: Asset Feature - MLP2 (Market Liquidity Pool 2) #2
Comments
What is new?
|
Exchange ExamplesFee Schedule0.5% ONS ->
ONS -> HONEST.USD ExchangePool Inventory
Fee Distribution
Pool Change
Fee Addition
The HONEST.USD -> ONS ExchangePool Inventory
Pool Change
HONEST.USD -> HONEST.CNY ExchangeEvery
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Abstract
Motivation
Rationale
Solution
asset
pair can have theMLP2
asset featureMLP2
asset feature is based on the x * y = k modellx
=amount_asset_X
,y
=amount_asset_Y
,k
=invariant
MLP2
is separated in passive and active liquidity, to allow one asset deposit/withdrawExchange
amount_asset_X
/amount_asset_Y
orprice_asset
defines the asset exchange rateinvariant
is not changed during the asset exchangeamount_asset_X
* sqrt(price_X
) =amount_asset_Y
* sqrt(price_Y
)Passive liquidity
MLP2
.MLP2
, are prioritized for active liquidity over newly added assets.Add/remove asset(s) from MLP2
Add an equivalent amount of both assets
Remove an equivalent amount of both assets
Add only one asset
Remove only one asset
MLP2 start values
MLP2 after quadruple ONS price or asset sell for half amount_ONS
MLP2 Charts
amount_ONS
*amount_asset
=invariant
price_ONS
) *amount_ONS
= constantprice_asset
) *amount_asset
= constantprice_ONS
*price_asset
= 1Fee 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
asset
tradingMLP2
Other market pairs
MLP2
Example fee schedule
0.6% ONS -> asset market fee
0.3% asset -> asset market fee
Price Distribution
Network Example with different MLP asset features
Market Dynamics
MLP2
asset featureasset
is backed by same value of the otherasset
MLP2 price changes
ROS = (Relative Order Size) = amount_order/active_mlp
Premium on the exchange rate compared to the current
price_asset
Orderbook
market fee
reducesasset
/asset
market spreadPrice feed
The
MLP2
asset feature is not only exchange feature, but also a price feed indicator, which oscillates around the market price.Manipulation
MLP2
generatesmarket fee
and market spreadmarket fee
and gets an advantage to increase ONS price on DEXComparison
Lending options
MLP2
CR
&debt
Implementation
MLP2
Specifications
Network_parameter
fee_share_for_reserve
MLP_parameters
asset_id
mlp_fee_rate
fee_share_asset
fee_share_mlp
fee_share_referral
MLP_object
asset_id
delta_asset_balance
user_id
mlp_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
)dnRemove 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)
)dnExchange ONS to asset
mlp_fee
=amount_ONS
*fee_rate_mlp
*fee_share_mlp
// calculate fee cut for MLP2x
+=mlp_fee
// add fee to MLP2k
=x
*y
// calculate invariantx
+=amount_ONS
* (1 -fee_rate_mlp
) // amount to exchangeamount_asset
=y
-k
/x
// amount to returnExchange asset to ONS
k
=x
*y
// calculate invarianty
+=amount_asset
// amount to exchangeamount_ONS
=x
-k
/y
// amount to returnExchange asset_1 to asset_2
mlp_fee
=amount_asset_1
*fee_rate_mlp
*fee_share_mlp
// calculate fee cut for MLP2x
+=mlp_fee
// add fee to MLP2k
=x
*y
// calculate invariantx
+=amount_asset_1
* (1 -fee_rate_mlp
) // amount to exchangeamount_asset_2
=y
-k
/x
// amount to returnFlow Chart
Discussion and Summary for Shareholders
Risks
Copyright
This document is placed in the public domain.
Sources
The text was updated successfully, but these errors were encountered: