-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Breakdown fees protocol 3/3: DB field and returning on /get_trades (#…
…2910) # Description Related to #2862 Exposes executed protocol fees from database on /get_trades endpoint. Database fee field is an array of <token, amount> so that we have the flexibility now (and also in the future) to save taken fee in whatever token we want. This was inspired by discussion where even for the same order we considered defining taken protocol fee in sell token for "surplus" variant, while, for "volume" variant it's more logical to define it in non-surplus token (sell token for sell order and buy token for buy order) so that the taken fee doesn't depend on the amount of surplus provided in a solution. # Changes <!-- List of detailed changes (how the change is accomplished) --> - [ ] Add new columns `protocol_fee_tokens` and `protocol_fee_amounts` to `order_execution` database table. - [ ] Expand `executedProtocolFees` field on `Trade` struct to return both executed protocol fees and fee policies. ## How to test Updated db test. Existing tests. e2e test updated to prove correctness.
- Loading branch information
Showing
15 changed files
with
366 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.