Skip to content

Commit

Permalink
enfore a minimum liquidator ratio
Browse files Browse the repository at this point in the history
  • Loading branch information
darcys22 authored and Doy-lee committed Sep 9, 2024
1 parent febf756 commit 2030c4f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions contracts/ServiceNodeRewards.sol
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ contract ServiceNodeRewards is Initializable, Ownable2StepUpgradeable, PausableU
uint256 recipientRatio_
) public initializer {
if (recipientRatio_ < 1) revert RecipientRewardsTooLow();
if (liquidatorRewardRatio_< 1) revert LiquidatorRewardsTooLow();
isStarted = false;
totalNodes = 0;
blsNonSignerThreshold = 0;
Expand Down Expand Up @@ -172,6 +173,7 @@ contract ServiceNodeRewards is Initializable, Ownable2StepUpgradeable, PausableU
error InvalidBLSSignature();
error InvalidBLSProofOfPossession();
error LeaveRequestTooEarly(uint64 serviceNodeID, uint256 timestamp, uint256 currenttime);
error LiquidatorRewardsTooLow();
error MaxContributorsExceeded();
error MaxClaimExceeded();
error MaxPubkeyAggregationsExceeded();
Expand Down
2 changes: 1 addition & 1 deletion scripts/deploy-local-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ async function main() {
await rewardRatePool.getAddress(), // foundation pool address
120_000_000_000, // staking requirement
10, // max contributors
0, // liquidator reward ratio
1, // liquidator reward ratio
0, // pool share of liquidation ratio
1 // recipient ratio
]);
Expand Down
2 changes: 1 addition & 1 deletion test/unit-js/ServiceNodeRewardsTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ describe("ServiceNodeRewards Contract Tests", function () {
await foundationPool.getAddress(), // foundation pool address
staking_req, // testnet staking requirement
10, // max contributors
0, // liquidator reward ratio
1, // liquidator reward ratio
0, // pool share of liquidation ratio
1 // recipient ratio
]);
Expand Down

0 comments on commit 2030c4f

Please sign in to comment.