Conversation
…ee, use non zero address, add funding spend fee
|
@shamardy |
|
@shamardy |
|
@shamardy |
|
@shamardy |
|
@shamardy |
19 similar comments
|
@shamardy |
|
@shamardy |
|
@shamardy |
|
@shamardy |
|
@shamardy |
|
@shamardy |
|
@shamardy |
|
@shamardy |
|
@shamardy |
|
@shamardy |
|
@shamardy |
|
@shamardy |
|
@shamardy |
|
@shamardy |
|
@shamardy |
|
@shamardy |
|
@shamardy |
|
@shamardy |
|
@shamardy |
Before this PR, the legacy swap functions were used to estimate trade fees (tx fees) for TPU swaps, so those estimations may not have been quite accurate.
This PR adds trade fee estimation functions for TPU swap steps (like send taker funding, spend taker funding, send maker payment etc).
As refactoring, a new SwapTotalFeeHelper trait is added to abstract getting fees for balance checking in swaps.
TODO: add more tests to validate taker and maker max_volume/trade_preimage estimations for TPU swap fee estimations added in this PR.