Skip to content
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

Merged
merged 8 commits into from
Dec 4, 2023

Conversation

PawelTroka
Copy link
Contributor

@PawelTroka PawelTroka commented Nov 30, 2023

fixes #15

Copy link
Contributor

@kosecki123 kosecki123 left a 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.

@kosecki123
Copy link
Contributor

I think another good practice would be to emit the event after in the setup with all parameters listed and the current owner

@PawelTroka
Copy link
Contributor Author

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.

@kosecki123 I would argue that having separate functions limit the room for error
validation yes, has been added

@PawelTroka
Copy link
Contributor Author

I think another good practice would be to emit the event after in the setup with all parameters listed and the current owner

Ok, you mean after setting up any of the parameters or after feeSetup(..) call ?

/// @param _depositFeeRatioScale The new deposit fee ratio scale.
function setDepositFeeRatioScale(SD59x18 _depositFeeRatioScale) external onlyOwner {
require(
_depositFeeRatioScale >= zero && _depositFeeRatioScale <= one,
Copy link
Contributor

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

@kosecki123 kosecki123 self-requested a review December 4, 2023 12:20
Copy link
Contributor

@kosecki123 kosecki123 left a 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.

@kosecki123 kosecki123 merged commit 6ad8bb8 into main Dec 4, 2023
1 check passed
@0xmichalis 0xmichalis deleted the feature/make-all-fee-parameters-configurable branch May 23, 2024 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make all fee parameters configurable
2 participants