-
Notifications
You must be signed in to change notification settings - Fork 91
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
Upgrade sjoe #120
Upgrade sjoe #120
Conversation
v1.5.5
contracts/StableJoeStaking.sol
Outdated
uint88 public depositFeePercent; | ||
/// @notice Reentrancy guard | ||
bool public reentrant; |
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.
This only work because depositFeePercent
is zero atm. That's a bit dangerous imo, imagine we put this upgrade on hold for some reason, then later we update the deposit fee and decide to finally carry on the upgrade while forgetting about this
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.
Correct, but to me it's fine as it would just reset the value to 0. I'll use the right storage for safety, but I don't think it's necessary
The aim of this PR is to add a
sweep
function to sJoe for non-reward token (and not joe).This PR also use immutable variables in order to save gas, to keep the storage ordering
__gap
variables are added.A non-reentrant check was added for improved security.