zeitgeistpm / ui

Zeitgeist general prediction markets application.
https://app.zeitgeist.pm
Apache License 2.0
16 stars 4 forks source link

Pool join/exit validation #2320

Open Robiquet opened 6 months ago

Robiquet commented 6 months ago

join: 3.1 The ratio between pool_shares_amount and pool.liquidity_shares_manager.total_shares() must be at least 139_098_411 (1.39...%). exit: 4.1 If the pool survives the withdrawal (i.e. the user doesn't withdraw the last pool shares), then the new liquidity parameter must be at least 10_000_000_000. Otherwise, the pool isn't liquid enough and the only option to withdraw all of your funds. 4.2 If the pool survives, then the ratio between the remaining pool shares and pool.liquidity_shares_manager.total_shares() (total_shares calculated after withdrawal) must be at least 139_098_411 (1.39...%). Otherwise, the LPs position is too small and the only option is to withdraw all of your funds.