Skip to content

Commit

Permalink
Added check if voters are registered while calculating voter reward i…
Browse files Browse the repository at this point in the history
…n the Incentives Pool contract
  • Loading branch information
u-hubar committed Jun 26, 2024
1 parent e44e82f commit 05b7da7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion contracts/v2/paranets/ParanetNeuroIncentivesPool.sol
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ contract ParanetNeuroIncentivesPool is Named, Versioned {
event ParanetIncentivizationProposalVoterRewardClaimed(address indexed voter, uint256 amount);

string private constant _NAME = "ParanetNeuroIncentivesPool";
string private constant _VERSION = "2.1.2";
string private constant _VERSION = "2.1.3";

HubV2 public hub;
ParanetsRegistry public paranetsRegistry;
Expand Down Expand Up @@ -518,6 +518,10 @@ contract ParanetNeuroIncentivesPool is Named, Versioned {
}

function getClaimableProposalVoterRewardAmount() public view returns (uint256) {
if (voters.length == 0 || voters[votersIndexes[msg.sender]].addr != msg.sender) {
return 0;
}

uint256 neuroReward = getTotalProposalVoterIncentiveEstimation();

uint256 voterRewardLimit = ((((address(this).balance +
Expand Down

0 comments on commit 05b7da7

Please sign in to comment.