UserA has a balance of 50 tmsc
A: Balance 50
UserA sends a offer to sell 30 tmsc
A: Balance 20 - Reserved 30
UserB sends a purchase offer 10 tmsc (not yet paid)
A: Balance 20 - Reserved 20 - Reserved for Purchase Offer 10
UserA changes sell offer to 5 tmsc
A: Balance 35 - Reserved 5 - Reserved for Purchase Offer 10
What is the maximum tmsc can UserA simple send to UserC?
The maximal amount user A can send is 20 tMSC. Once the Purchase Offer expires the amount will be changed to 30.
The maximum amount userA can send is 35 (since 5 and 10 are withheld from the 50 balance). When the purchase offer expires it max is 45.
Bitoy - this doesn't seem right to me, it seems like this approach could end up harming users.
To frame this example using slightly different values:
1. UserA has 50 MSC
(Balance 50)
2. UserA lists 30 MSC for sale
(Balance 20 available, 30 reserved)
3. UserB sends purchase offer for all 30 MSC
(Balance 20 available, 30 reserved for purchase offer)
4. UserA changes offer to 20 MSC for sale
(Balance TBC1 available, TBC2 reserved, 30 reserved for purchase offer)
5. UserC sends purchase offer for 20 MSC
(Balance TBC3 available, TBC4 reserved, TBC5 reserved for purchase offer)
So UserA has attempted to reduce the size of a listed offer, this can't be allowed to result in a scenario in which the revised offer is treated as new and unreserved (and could result in all 50 of UserA's coins being sold).
The amount remaining available to UserA should be: Unsold balance - the greater of (all reserved purchases OR the revised offer amount).
So in the example above:
1. UserA has 50 MSC
(Balance 50)
2. UserA lists 30 MSC for sale
(Balance 20 available, 30 reserved)
3. UserB sends purchase offer for all 30 MSC
(Balance 20 available, 30 reserved for purchase offer)
4. UserA changes offer to 20 MSC for sale
(Balance 20 available, 30 reserved, 30 reserved for purchase offer)
5. UserC sends purchase offer for 20 MSC
(Balance 20 available, 30 reserved, 30 reserved for purchase offer)
Now - what if UserA was actually trying to sell the other 20 MSC? I would expect them to increase the sell offer to 50 (although we still need to be sure this interpreted as an adjustment and not another 50, which is quite possible the same problem in reverse!).
Does this make any sense? Cheers