mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-08 02:31:19 +00:00
25 lines
644 B
Go
25 lines
644 B
Go
// Package pulse implements the PulseChain fork
|
|
package pulse
|
|
|
|
import (
|
|
"github.com/prysmaticlabs/prysm/v5/config/params"
|
|
"github.com/sirupsen/logrus"
|
|
)
|
|
|
|
// Applies the PulseChain burn to a pending validator reward.
|
|
func ApplyBurn(baseReward uint64) uint64 {
|
|
secondsPerSlot := params.BeaconConfig().SecondsPerSlot
|
|
|
|
// First we compensate for the increased block frequency.
|
|
afterBurn := baseReward * secondsPerSlot / 12
|
|
|
|
// Then we burn an additional 25%.
|
|
afterBurn = afterBurn * 3 / 4
|
|
|
|
logrus.WithFields(logrus.Fields{
|
|
"baseReward": baseReward,
|
|
"afterBurn": afterBurn,
|
|
}).Debug("Applied PulseChain Burn 🔥")
|
|
return afterBurn
|
|
}
|