bonds

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateRequiredCollateral

func CalculateRequiredCollateral(games []*monTypes.EnrichedGameData) map[common.Address]Collateral

CalculateRequiredCollateral determines the minimum balance required for each DelayedWETH contract used by a set of dispute games. Returns a map of DelayedWETH contract address to collateral data (required and actual amounts)

Types

type BondMetrics added in v1.7.2

type BondMetrics interface {
	RecordCredit(expectation metrics.CreditExpectation, count int)
	RecordBondCollateral(addr common.Address, required *big.Int, available *big.Int)
}

type Bonds added in v1.7.2

type Bonds struct {
	// contains filtered or unexported fields
}

func NewBonds added in v1.7.2

func NewBonds(logger log.Logger, metrics BondMetrics, clock RClock) *Bonds

func (*Bonds) CheckBonds added in v1.7.2

func (b *Bonds) CheckBonds(games []*types.EnrichedGameData)

type Collateral added in v1.7.3

type Collateral struct {
	// Required is the amount of collateral required to pay out bonds.
	Required *big.Int

	// Actual is the amount of collateral actually head by the DelayedWETH contract
	Actual *big.Int
}

type RClock added in v1.7.3

type RClock interface {
	Now() time.Time
}

Jump to

Keyboard shortcuts

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