Skip to content

Commit

Permalink
fix(RoninBaseTreasury): resolve comment
Browse files Browse the repository at this point in the history
  • Loading branch information
TuDo1403 committed Dec 1, 2024
1 parent 9edffd2 commit f0e83d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ronin/basefee-treasury/RoninBaseFeeTreasury.sol
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ contract RoninBaseFeeTreasury is EIP712, Initializable, HasContracts, GlobalConf
function _calcMinVoteFor(
uint256 totalVotePower
) internal view returns (uint96 minVoteFor) {
minVoteFor = ((totalVotePower * _threshold.num) / _threshold.denom).toUint96();
minVoteFor = (totalVotePower - _calcMinVoteAgainst(totalVotePower)).toUint96();
require(minVoteFor != 0, ErrZeroMinVotePower());
}

Expand All @@ -497,7 +497,7 @@ contract RoninBaseFeeTreasury is EIP712, Initializable, HasContracts, GlobalConf
function _calcMinVoteAgainst(
uint256 totalVotePower
) internal view returns (uint96 minVoteAgainst) {
minVoteAgainst = (totalVotePower - _calcMinVoteFor(totalVotePower)).toUint96();
minVoteAgainst = (totalVotePower * (_threshold.denom - _threshold.num) / _threshold.denom).toUint96();
require(minVoteAgainst != 0, ErrZeroMinVotePower());
}

Expand Down

0 comments on commit f0e83d2

Please sign in to comment.