-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add price improvement protocol fee (#353)
This PR implements a protocol fee on price improvement as introduced in ... A new case was added to the batch rewards SQL query for computing a price improvement fee. Price improvement is computed from a quote (depending on order kind). If price improvement is positive and smaller than surplus, the protocol fee is a fraction of price improvement. Otherwise it is zero or a fraction of surplus, respectively. Four cases are tested - normal sell order - normal buy order - sell order with bad quote, fee capped at fraction of volume - sell order with negative price improvement, thus zero profotol fee This PR should be merged and tagged before the end of this accounting period. The change to the batch rewards query should be mirrored on dune-sync.
- Loading branch information
Showing
4 changed files
with
137 additions
and
14 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