-
Notifications
You must be signed in to change notification settings - Fork 3
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
make all fee parameters configurable #23
Conversation
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.
Wouldnt be better to have 1 function to set all params ? Also some minimal validation would be nice, so someone won't screw by mistake.
I think another good practice would be to emit the event after in the setup with all parameters listed and the current owner |
@kosecki123 I would argue that having separate functions limit the room for error |
Ok, you mean after setting up any of the parameters or after feeSetup(..) call ? |
src/FeeCalculator.sol
Outdated
/// @param _depositFeeRatioScale The new deposit fee ratio scale. | ||
function setDepositFeeRatioScale(SD59x18 _depositFeeRatioScale) external onlyOwner { | ||
require( | ||
_depositFeeRatioScale >= zero && _depositFeeRatioScale <= one, |
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.
<= one should not be checked, this can by anything from zero to inf
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.
All those external functions should have the int256 as input and then casted to dest type. This is because the configs would be set either by other contract like multisig or from config scripts.
fixes #15