-
Notifications
You must be signed in to change notification settings - Fork 97
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
Add cap for partner fee #2552
Add cap for partner fee #2552
Conversation
74a03a2
to
878609e
Compare
2ebafd3
to
15e801e
Compare
Issue for making the max partner fee cap configurable in the autopilot #2554 |
d3c1a50
to
fb19923
Compare
fb19923
to
abdeda0
Compare
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.
lgtm, few nits
@@ -77,20 +82,22 @@ mod tests { | |||
|
|||
// surplus fee policy without caps | |||
let fee_policy_1 = domain::fee::Policy::Surplus { | |||
factor: 0.1, | |||
max_volume_factor: 1.0, | |||
factor: FeeFactor::try_from(0.1).unwrap(), |
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.
nit: this should work like 0.1.try_into().unwrap() but feel free to ignore
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.
LG
Description
Add a maximum cap (0.01) for the partner fee in case it is 0.01 or above.
Changes
Factor
to enforce the limits of the value [0, 1) and provides a function to cap the partner feeHow to test
Related Issues
Fixes #2541