Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Define protocol fee params and forward to driver #2098
Define protocol fee params and forward to driver #2098
Changes from 9 commits
8f96168
2ce7191
53d450a
a999ef1
448d867
4cd02a2
2dd0134
6f26b5c
9c573c6
f783d68
1e79009
5ef6d5d
88e0152
b6ff257
a65d537
1164bf2
484ca6b
900aa34
723a4bf
7557415
b655bec
f3974c2
ac5ddac
cb3e54f
87743ec
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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: the
--help
text refers to apercentage
when it's actually a factor that is to be understood as a percentage. Slight difference that bit us in the past.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.
I think we are covered with the parsing function that makes sure it's a factor. We also have a factor in the variable name. I wanted to keep the comments focused on the meaning.
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.
It makes sure that the value entered is in
[0,1]
but it doesn't make sure that what you provided is actually what you intended. Take slippage for example where it makes sense to configure0.5%
. We had a CLI argument in the past that claimed it was a percentage so we passed in0.5
which then ended up allowing50%
relative slippage. Despite usingshared::arguments::parse_percentage_factor
it took us a while to notice the error. 😬This is true but I think with MFW's recent push to make the repo more contributor friendly it still makes sense to be precise in the
--help
text.It could be as short as:
Cap protocol fee with a percentage of the order's volume. (1.0 meaning 100%)
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.
Shouldn't the dto also have documentation (so that it can be generated for the swagger docs)?