-
Notifications
You must be signed in to change notification settings - Fork 8
feat: add minimum platform fees #571
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
} | ||
}); | ||
|
||
match (fee_user, fee_searcher) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fee_user .into_iter() .chain(fee_searcher) .max()
None | ||
} | ||
}); | ||
let fee_searcher = self.minimum_platform_fee_list.iter().find_map(|fee| { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let fee_searcher = self
.minimum_platform_fee_list
.iter()
.find(|fee| &fee.mint == mint_searcher)
.map(|fee| fee.fee_ppm);
I feel using find and then map is a better approach. But your choice
@@ -7,7 +7,7 @@ repository = "https://github.com/pyth-network/per" | |||
license = "Apache-2.0" | |||
|
|||
[dependencies] | |||
express-relay-api-types = { version = "0.12.0", path = "../../auction-server/api-types" } | |||
express-relay-api-types = { version = "0.12.1", path = "../../auction-server/api-types" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also need to update the "express-relay-client" version
This PR adds a minimum platform fees list to the config and parses it to apply platform fees based on token mints.
In order to release this feature, we need to
swap_v2
instead ofswap
platform_fee_ppm
thereLonger term, we ought to