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

Add min limit when add/remove booster #416

Merged
merged 4 commits into from
Jul 3, 2024
Merged

Add min limit when add/remove booster #416

merged 4 commits into from
Jul 3, 2024

Conversation

nz-neooo
Copy link
Contributor

No description provided.

@nz-neooo nz-neooo requested a review from ianhe8x June 27, 2024 02:25
@@ -298,6 +299,8 @@ contract RewardsBooster is Initializable, OwnableUpgradeable, IRewardsBooster, S
deploymentPool.accRewardsPerBooster = accRewardsPerBooster;
totalBoosterPoint += _amount;

require(deploymentPool.boosterPoint >= minimumDeploymentBooster, 'RB015');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought you should check deploymentPool.accountBooster[_account]

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add a test to cover this scenaio? when there is boost bigger than min for a deployment and a user tries to add boost smaller than min, it should fail.

@ianhe8x
Copy link
Contributor

ianhe8x commented Jun 30, 2024

@nz-neooo what do you think of can not get booster reward if boosted token less than minimum, since now it is impossible except for existing boosters. Should we remove this amount check in the contract?

@nz-neooo
Copy link
Contributor Author

nz-neooo commented Jul 1, 2024

Now it's limited to the total deployment booster. If we want to apply "minimum", limited to the account will be simple and clear.

@ianhe8x ianhe8x merged commit 9d7b544 into develop Jul 3, 2024
2 checks passed
@ianhe8x ianhe8x deleted the add-booster-limit branch July 3, 2024 01:12
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.

2 participants