probability

package
v0.0.0-...-07d62d3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 4, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProbabilityScale = 1000000000
	Decimals         = 1000000
)

Variables

This section is empty.

Functions

func CalculateAtx

func CalculateAtx(secondsSinceLastBlock *big.Rat, fluidTransfers int) *big.Rat

CalculateAtx using the duration since the last block and the number of fluid transfers

func CalculatePayoutsCombined

func CalculatePayoutsCombined(sourcePayouts map[applications.UtilityName][]worker.Payout, winningBalls int) map[applications.UtilityName]worker.Payout

func CalculatePayoutsSplit

func CalculatePayoutsSplit(sourcePayouts map[applications.UtilityName][]worker.Payout, winningBalls int) (map[applications.UtilityName]worker.Payout, map[applications.UtilityName]worker.Payout)

returns the amount won by the sender and receiver with given balls and payouts

func NaiveIsWinning

func NaiveIsWinning(balls []uint32, emission *worker.Emission) int

NaiveIsWinning examines the random numbers we drew and determines if we won

func WinningChances

func WinningChances(trfMode worker.TrfMode, gasFee, atx, payoutFreq *big.Rat, distributionPools []worker.UtilityVars, winningClasses, averageTransfersInBlock int, blockTimeInSeconds uint64, emission *worker.Emission) (winningTier uint, payouts map[applications.UtilityName][]worker.Payout, probabilities []*big.Rat)

n, payouts[]

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL