Skip to content

Commit

Permalink
Removed RPL stake test that isn't needed in saturn 0
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaspanf committed Oct 18, 2024
1 parent eb0a556 commit 6afa5c2
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions rocketpool-cli/node/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,6 @@ func getStatus(c *cli.Context) error {
math.RoundDown(eth.WeiToEth(status.RplStake), 6))
if status.BorrowedCollateralRatio > 0 {
rplTooLow := (status.RplStake.Cmp(status.MinimumRplStake) < 0)
rplTotalStake := math.RoundDown(eth.WeiToEth(status.RplStake), 6)
rplWithdrawalLimit := math.RoundDown(eth.WeiToEth(status.MaximumRplStake), 6)
if rplTooLow {
fmt.Printf(
"This is currently %s%.2f%% of its borrowed ETH%s and %.2f%% of its bonded ETH.\n",
Expand All @@ -305,33 +303,9 @@ func getStatus(c *cli.Context) error {
"This is currently %.2f%% of its borrowed ETH and %.2f%% of its bonded ETH.\n",
status.BorrowedCollateralRatio*100, status.BondedCollateralRatio*100)
}
fmt.Printf(
"It must keep at least %.6f RPL staked to claim RPL rewards (10%% of borrowed ETH).\n", math.RoundDown(eth.WeiToEth(status.MinimumRplStake), 6))
fmt.Printf(
"RPIP-30 is in effect and the node will gradually earn rewards in amounts above the previous limit of 150%% of bonded ETH. Read more at https://github.com/rocket-pool/RPIPs/blob/main/RPIPs/RPIP-30.md\n")
if rplTotalStake > rplWithdrawalLimit {
fmt.Printf(
"You can now withdraw down to %.6f RPL (%.0f%% of bonded eth)\n", math.RoundDown(eth.WeiToEth(status.MaximumRplStake), 6), (status.MaximumStakeFraction)*100)
}
if rplTooLow {
fmt.Printf("%sWARNING: you are currently undercollateralized. You must stake at least %.6f more RPL in order to claim RPL rewards.%s\n", colorRed, math.RoundUp(eth.WeiToEth(big.NewInt(0).Sub(status.MinimumRplStake, status.RplStake)), 6), colorReset)
}
}
fmt.Println()

remainingAmount := big.NewInt(0).Sub(status.EthMatchedLimit, status.EthMatched)
remainingAmount.Sub(remainingAmount, status.PendingMatchAmount)
remainingAmountEth := int(eth.WeiToEth(remainingAmount))
remainingFor8EB := remainingAmountEth / 24
if remainingFor8EB < 0 {
remainingFor8EB = 0
}
remainingFor16EB := remainingAmountEth / 16
if remainingFor16EB < 0 {
remainingFor16EB = 0
}
fmt.Printf("The node has enough RPL staked to make %d more 8-ETH minipools (or %d more 16-ETH minipools).\n\n", remainingFor8EB, remainingFor16EB)

// Minipool details
fmt.Printf("%s=== Minipools ===%s\n", colorGreen, colorReset)
if status.MinipoolCounts.Total > 0 {
Expand Down

0 comments on commit 6afa5c2

Please sign in to comment.