-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replacement for #2406 and #2421 Implements task 1 from #2382 Fixes #1494 # Description Implements surplus and protocol fees calculation, **based on the solution (received from solvers) trades, which are in a settlement smart contract format**. This ensures that these values are calculated after the protocol fee is already applied and the whole settlement is prepared for settling. This is important because the autopilot (and reward script) will use the same math so we are aligned 1:1. The main calculation is in `crates/driver/src/domain/competition/settled/mod.rs`. CIP38 scoring is currently called in a read only mode. The score is calculated but not used. ## How to test Tested locally with e2e tests. Surplus + protocol fee is always equal to legacy `quality` - `surplus_fee` which is expected.
- Loading branch information
Showing
14 changed files
with
495 additions
and
44 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
Oops, something went wrong.