Closed
Description
Issue:
- in router we still do the balance check, but only check if the user spent at least the amount we calculate for the trade
- we use
reducible_balance
with modePreservation.Expendable
which behaves differently when the system.account.providers of the user account changes - during this trade, the number of providers changes, increased by one, leading to a different behaviour for the balance check, namely an off-by-ED error
Fix would be to always use reducible_balance with Preservation.Preserve so the ED is always deducted from balances, resulting in consistent behaviour.
First we need to fix a bug in orml package: open-web3-stack/open-runtime-module-library#986
Cases on prod:
- FIXED: https://hydradx.subscan.io/extrinsic/4836337-2
- FIXED: https://hydradx.subscan.io/extrinsic/0x015c2692a4fc4a7e718e80b599fa87ca5ff9a50a734208e49932b380d4ad4967
- FIXED: https://hydradx.subscan.io/extrinsic/0x41db07453b8c6764a07953743327b7ef9533eff29d31eb76c76c038e860a3cca
- FIXED: https://hydradx.subscan.io/block/4898096?tab=event&&event=4898096-4
Metadata
Metadata
Assignees
Labels
No labels