Fix: settlement remains unsettled for fee on transfer tokens
Alexangelj opened this issue · comments
Description
BLESS INVARIANT TESTING.
I found a failing invariant test very deep (40 call depth, >256 runs):
Looking at the call, it's clear it should be getting the expected value:
However user balance is increasing by a smaller amount.
I didn't notice but "FOT" is fee on transfer token...
Fix
- Make sure the settlement checks the PAYMENTS were fully paid, instead of just checking the balance of tokens is positive.
- Clearly label the tokens with better names. Another note is that the pool's in the invariant test suite will randomize tokens, so an "Asset" token could be in the "Quote" storage slot, leading to confusion.