Skip to content

Commit

Permalink
perf: remove deprecated rari pool
Browse files Browse the repository at this point in the history
  • Loading branch information
gosuto-inzasheru committed Jun 25, 2024
1 parent 8a6dca0 commit 4861e8e
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions contracts/BadgerVotingShare.sol
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ contract BadgerVotingShare {
IGeyser constant geyser_badger_wBTC_SLP =
IGeyser(0xB5b654efBA23596Ed49FAdE44F7e67E23D6712e7);

// Rari pool - fBADGER-22
ICToken constant fBADGER =
ICToken(0x6780B4681aa8efE530d075897B3a4ff6cA5ed807);

IBridgePool constant aBADGER =
IBridgePool(0x43298F9f91a4545dF64748e78a2c777c580573d6);

Expand Down Expand Up @@ -104,10 +100,6 @@ contract BadgerVotingShare {
return _badgerBalanceOf(_voter);
}

function rariBalanceOf(address _voter) external view returns (uint256) {
return _rariBalanceOf(_voter);
}

function remBadgerBalanceOf(
address _voter
) external view returns (uint256) {
Expand Down Expand Up @@ -239,16 +231,6 @@ contract BadgerVotingShare {
return (remBadgerBalance * rem_badger.getPricePerFullShare()) / 1e18;
}

/*
The voter may have deposited BADGER into the rari pool:
* check current rate
* balanceOf fBadger
*/
function _rariBalanceOf(address _voter) internal view returns (uint256) {
uint256 rate = fBADGER.exchangeRateStored();
return (fBADGER.balanceOf(_voter) * rate) / 1e18;
}

/*
The voter may have deposited BADGER into the across pool:
*/
Expand Down Expand Up @@ -341,7 +323,6 @@ contract BadgerVotingShare {
_badgerBalanceOf(_voter) +
_uniswapBalanceOf(_voter) +
_sushiswapBalanceOf(_voter) +
_rariBalanceOf(_voter) +
_remBadgerBalanceOf(_voter) +
_bremBadgerBalanceOf(_voter) +
_acrossBalanceOf(_voter) +
Expand Down

0 comments on commit 4861e8e

Please sign in to comment.