You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Orders where the user doesn't have the required "effective balance" get filtered out. The effective balance here means min(token_allowance, token_balance) because the settlement contract can only spend this much money of the user.
At the moment we don't differentiate between missing balances and missing allowances and always report insufficient_balance.
Details
It would be nice to make the SolvableOrdersCache aware of allowance, balance and effective_balance to improve the logs.
Implementation suggestions:
Make BalanceFetching::get_balances() return what's currently account_balances::simulation::Simulation which already contains all the necessary information.
Change solvable orders cache to filter based on effective_balance and either report insufficient_balance or insufficient_allowance based on the respective values (balance should have higher prio).
In term of order_events I would still only store insufficient_balance to not over-complicate this in the DB.
The text was updated successfully, but these errors were encountered:
Background
Orders where the user doesn't have the required "effective balance" get filtered out. The effective balance here means
min(token_allowance, token_balance)
because the settlement contract can only spend this much money of the user.At the moment we don't differentiate between missing balances and missing allowances and always report
insufficient_balance
.Details
It would be nice to make the
SolvableOrdersCache
aware ofallowance
,balance
andeffective_balance
to improve the logs.Implementation suggestions:
Make
BalanceFetching::get_balances()
return what's currentlyaccount_balances::simulation::Simulation
which already contains all the necessary information.Change solvable orders cache to filter based on
effective_balance
and either reportinsufficient_balance
orinsufficient_allowance
based on the respective values (balance should have higher prio).In term of
order_events
I would still only storeinsufficient_balance
to not over-complicate this in the DB.The text was updated successfully, but these errors were encountered: