-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement market creator incentives (#1057)
* Integrate creator_fee in config and market & pool creation * Make creator_fee decideable by market creator Also replaces CreatorFee config element by MaxCreatorFee config element. I am against this change but I got outvoted by stakeholders, reasoning can be found at https://hackmd.io/@lZVVinJVS6WI4IpRgmbsLA/H17iRm6Kn * Finalize adjustable creator fee changes * Plan helper function * Partially implement market creator fees * Implement market fees for swap_exact_amount_in * Add tests for swap_exact_amount_in fees (WIP) * Finalize creator fee for swap_exact_amount_in * Fix bugs * Finalize fee handling logic * Use BASET_ASSET constant in tests * Use const for pool and market id * Add swap_in tests * Complete swap_in with creator fee tests * Use const for default weights * Use imported Error instead of absolute path * Implement limit tests when using creator fee * Implement max price tests when using creator fee * Complete swap_out with creator fee tests * Fix no-base<->no-base swap out creato fee test * Implement limit tests with swap_out when using creator fee * Implement max price tests for swap_out when using creator fee * Implement test to verify swap out amount is correct * Add test that verifies fee boundaries during pool creation * Add creator_fee migration * Adjust all tests to new create_market call * Format * Update changelog * Update changelog * Fix invalid test * Add fee limit test in prediction markets crate * Fix swaps benchmarks (invalid market id) * Update license headers * Satisfy clippy * Repair fuzz tests * Fix swaps fuzz tests (invalid market id) * Add market parameter test for create_cpmm_market_and_deploy_assets * Adjust swap benchmarks to use worst-case execution * Make handle_creator_fees infallible * Add ED tests for creator fees * Update copyright
- Loading branch information
Showing
32 changed files
with
2,085 additions
and
654 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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.