Open froooze opened 5 years ago
@ryanRfox maybe assign 78 to this? Since 77 was assigned to #161
This will add a huge amount of liquidity in circulation and act the same exact way as the centralized exchanges non-stop liquidity bots, it will help the BTS value and run the market dynamics.
This looks very promising. I think the combination of this with BSIP 70 could simultaneously help attract both a) more traders and b) more liquidity providers, thus potentially kicking off a sustainable, virtuous cycle of liquidity and adoption.
Time is always of the essence (of course), but this actually seems more foundational than BSIP 70, so I am eager to see what some of the devs and others familiar with the platform's market mechanics think about it.
Copying Uniswap is an interesting concept, but one I did not get until after I read several articles and then saw an Youtube interview with the founder. https://epicenter.tv/episode/292/
Uniswap is not an easy or fast concept to get. But once you get it is a very fascinating concept.
I have long been fascinated with Bancor. Bancor has some problems, but the market maker incentives spread between the liquidity providers forming a type of dividend for those providing liquidity which seems to work well in markets for small traders. It appears that crypto has brought out a number of interesting market making/order matching ideas that never really took off in other markets such as wall street or futures.
I think this approach needs further study and a better simpler presentation. This would help more widespread review. It might be better to point now comers to a less technical document somewhere. It would be a fundamental change in how the market works. The exchange using the concept is less that one year old and there are some people who now appearing to discovering and utilizing various strategies to optimize earnings and potentially exploiting a few loop holes.
The atmosphere in BitShares may not be right for serious consideration of the strategy now. (BitAsset settlement and the upvoting of refund 400K has stalled progress.)
I look forward to seeing what other traders think of this exciting concept.
@sschiessl-bcp
@sschiessl-bcp
Have you changed anything in here?
Have you changed anything in here?
Not really, what changed?
@ryanRfox Can you comment on assigning this BSIP ?
Anything that increases liquidity gets the thumbs up from me - not familiar with uniswap so not 100% clear on how it works at first reading.
Basically funds from multiple assets can be put in a shared liquidity pool and then the blockchain acts in the background as a sort of trustless bot / liquidity provider in the background providing swaps between the various assets that have contributed?
I'm a visual guy, a sketch would help 🙈
not familiar with uniswap so not 100% clear on how it works at first reading.
Uniswap is a simplified version of the Bancor Protocol, because it doesn't need a connector weight, to define the asset ratio. Uniswap uses the natural ratio from BTS/asset
pair, which is indirect proportional to the price.
The MLP
price dictates the exchange rate of an asset. When pool price is different from market price, the seller or buyer gets an advantage and MLP
price gets closer to the market price.
Basically funds from multiple assets can be put in a shared liquidity pool and then the blockchain acts in the background as a sort of trustless bot / liquidity provider in the background providing swaps between the various assets that have contributed?
Yes, any asset
can have a MLP
and get a market pair with BTS, except BTS itself. The user can decide, which asset is supported with extra liquidity from MLP
.
I'm still missing explanatory text for people unfamiliar with the referenced concepts (like me). In particular, Abstract and Summary should provide more detail and be in prosa.
I agree that the concept is difficult to understand without explanations in prose.
You should add a section that describes the effect on funds invested into the pool. As long as the assets oscillate around a more or less fixed base price everything is fine - investors participate in the fee income. As the trade price moves further away from the original investment price, the participation in the price appreciation (or loss) gets smaller and smaller. This may be seen as a pro or a con, depending on investment goals. :-) (For a pool consisting of assets A and B, and price p=B/A, the total value in terms of B is equal to SQRT(k*p), i. e. the total value doubles if the price quadruples.)
This also means that when BTS is in a downtrend against USD for example, then investors would probably remove their funds and then sell for USD to cut their losses. Similarly, if BTS is in an uptrend, investors would also withdraw their funds but sell USD for BTS to participate in BTS appreciation. It is therefore doubtful if the pool would help liquidity when it's needed the most.
A big bonus of this protocol over Bancor is that it works without costly log
and exp
computations.
(For a pool consisting of assets A and B, and price p=B/A, the total value in terms of B is equal to SQRT(k*p), i. e. the total value doubles if the price quadruples.)
Yes, pool_value
~ sqrt(price_BTS
)
Should we allow asset pairs without BTS as base pair? This would bring some flexibility and extra trading routes.
This also means that when BTS is in a downtrend against USD for example, then investors would probably remove their funds and then sell for USD to cut their losses. Similarly, if BTS is in an uptrend, investors would also withdraw their funds but sell USD for BTS to participate in BTS appreciation. It is therefore doubtful if the pool would help liquidity when it's needed the most.
Yes, this is always possible, but MLP
is more for user, who don't want to trade or setup a DEXbot worker, but invest and earn passive income. Most funds on the blockchain are not on the orderbook and do nothing.
A big bonus of this protocol over Bancor is that it works without costly
log
andexp
computations.
This and no need to set/use the connector weight parameter.
Thanks - sounds like it would be a good addition and a nice method for people to assist in providing liquidity without running dexbot.
Have the team estimated the time for implementation? Maybe we can get a few people together committing to try it with some funds once its live?
Re: the discussion on base. I think we need to have a big focus on the tokenomics of bitshares moving forward so I think BTS should be at the centre of every new initiative.
On that basis I'd view the ideal solution being BTS as the base / background behind all asset pairs.
MLP version updated!
If it's an "OIP" then I would like to close it. If it's a BSIP then please update wording in the interest of BitShares.
Actually, I didn't see why the mechanism would work (it should be in the "Rationale" section, see another comment above: https://github.com/bitshares/bsips/issues/213#issuecomment-544573281). Also, the document lacks of risk analysis for participants, only talked how they would earn, but no talk about how they would lose.
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 BTS price or asset sell for half amount_BTS
MLP2 Charts
amount_BTS
*amount_asset
=invariant
price_BTS
) *amount_BTS
= constantprice_asset
) *amount_asset
= constantprice_BTS
*price_asset
= 1Fee structure
The asset owner, defines the fee structure for the
MLP2
Themarket fee share to network
is defined by the network.BTS market pairs
asset
tradingMLP2
Other market pairs
MLP2
Example fee schedule
0.6% BTS -> 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 BTS 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 BTS to asset
mlp_fee
=amount_BTS
fee_rate_mlp
fee_share_mlp
// calculate fee cut for MLP2x
+=mlp_fee
// add fee to MLP2k
=x
y
// calculate invariantx
+=amount_BTS
(1 -fee_rate_mlp
) // amount to exchangeamount_asset
=y
-k
/x
// amount to returnExchange asset to BTS
k
=x
*y
// calculate invarianty
+=amount_asset
// amount to exchangeamount_BTS
=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.
See Also
182 - Debt Asset Feature - MPLP (Margin Position Liquidity Pool)
164 - BSIP74: Margin Call Fee Ratio
194 - Share market fees to network
Sources