Skip to content

Commit

Permalink
fix: holdings should properly calc provided eth
Browse files Browse the repository at this point in the history
  • Loading branch information
dmccartney authored and InvisibleSymbol committed Aug 1, 2023
1 parent d9b9b92 commit ec9f5fa
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions rocketwatch/utils/sea_creatures.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,8 @@ def get_holding_for_address(address):
eth_balance += solidity.to_float(token.results[0]) * price_cache["rpl_price"]
if "RETH" in contract_name:
eth_balance += solidity.to_float(token.results[0]) * price_cache["reth_price"]
# get minipool count
minipools = rp.call("rocketMinipoolManager.getNodeMinipoolCount", address)
eth_balance += minipools * 16
# add eth they provided for minipools
eth_balance += solidity.to_int(rp.call("rocketNodeStaking.getNodeETHProvided", address))
# add their staked RPL
staked_rpl = solidity.to_int(rp.call("rocketNodeStaking.getNodeRPLStake", address))
eth_balance += staked_rpl * price_cache["rpl_price"]
Expand Down

0 comments on commit ec9f5fa

Please sign in to comment.