reward emissions

This commit is contained in:
Ricardo Guilherme Schmidt 2023-06-21 10:59:30 -03:00
parent e9d71449c1
commit b70666c26d
No known key found for this signature in database
GPG Key ID: 3F95A3AD0B607030
1 changed files with 5 additions and 4 deletions

View File

@ -8,7 +8,7 @@ contract StakeManager is ERC20 {
ERC20 stakedToken;
uint256 public constant MP_APY = 1;
uint256 public constant MP_APY = 1;
uint256 public constant STAKE_APY = 1;
uint256 public constant MAX_BOOST = 1;
uint256 public constant MAX_MP = 1;
@ -69,9 +69,10 @@ contract StakeManager is ERC20 {
}
function getRewardsEmissions() public view returns(uint256){
uint256 totalStaked = this.totalSupply;
uint256 share = this.multiplierSupply +totalSupply;
function getRewardsEmissions(address _vault, uint256 _totalReward) public view returns(uint256){
uint256 totalShare = this.totalSupply + this.multiplierSupply;
uint256 userShare = accounts[_vault].balance + accounts[_vault].multiplier;
return (userShare / totalShare) * _totalReward;
}