Closed altafan closed 2 years ago
I was thinking that maybe we should allow unbalanced from the start maybe: ie. want to sell NFT or just sell one side of the pair? since we declare the asset hahses now should not be a problem?
Eventually if trader tries to buy the 0 valued side, it will simply get error of not enough liquidity.
What do you think?
It should be possible to deposit only one asset of the pair via deposit/claim
I think the daemon shouldn't behave like that until it supports UNBALANCED strategy.
Well the pluggable already works. For the BALANCED I understand that 0 can't work for x * y formula. Even if we had the unbalanced already, how would work? The daemon will make BALANCED not activable or simply we will return an error?, ie having a dependency between strategy and balances
Well the pluggable already works
Correct.
For the BALANCED I understand that 0 can't work for x * y formula. Even if we had the unbalanced already, how would work? The daemon will make BALANCED not activable or simply we will return an error?, ie having a dependency between strategy and balances
It would just be up to the user to change the strategy of the market BEFORE sending the splitting the funds sent to the fragmenter. After all, this is what the operator has to do also for a market with pluggable strategy.
I'm going to add a check to "enable" the behavior of the description ONLY for markets with balanced strategy.
All other strategies should always allow single asset fragmentations without such restrictions.
the user to change the strategy of the market BEFORE
But we should make sure this does not become footgun ie. when we verify the deposit in case of BALANCED strategy, we should alert user with a clear instruction what to do next: change the strategy and claim again should be able to recover for this situation.
Not clear if this is the current behavior
@tiero while increasing the verbosity of the error messages, I took the opportunity to address also other issues regarding marginal bugs:
-1
value to ignore change to base/quote fee instead of using 0
.localhost:5001
for regtest instead of localhost:3001
@tiero I pushed a new commit 52dca41 in order to close #514.
Before this, every market fragmentation required to send both assets to the fragmenter account. Now, this behavior is maintained only in case the market has zero balance, otherwise the operator is allowed to fragment funds of only one asset of the pair.
-1
value to ignore change to base/quote fee instead of using0
.localhost:5001
for regtest instead oflocalhost:3001
Please @tiero review this.