constants

package
v1.5.4 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2026 License: Apache-2.0 Imports: 2 Imported by: 6

Documentation

Index

Constants

View Source
const (
	InactiveTier = iota
	BronzeTier
	SilverTier
	GoldTier
)
View Source
const AnvilChainID = 31337
View Source
const CalibnetChainID = 314159
View Source
const ChainHeadLookbackEpochs = 3

the ChainHeadLookbackEpochs epochs is the protocol wide parameter that is subtracted from ChainHead height to look at real time on chain info

View Source
const CredentialEpochsValid = CredentialMinutesValid * EpochsInMinute
View Source
const CredentialMinutesValid = 5

a credential is valid for 5 minutes

View Source
const EpochsInDay = builtin.EpochsInDay
View Source
const EpochsInWeek = EpochsInDay * 7
View Source
const EpochsInYear = EpochsInDay * 365
View Source
const HoursInDay = 24
View Source
const LocalnetChainID = 31415926
View Source
const MainnetChainID = 314
View Source
const MinutesInHour = 60
View Source
const SecondsInMinute = 60

Variables

View Source
var CHUNKSIZE = big.NewInt(EpochsInDay)
View Source
var DefaultWindow = EpochsInWeek * 3
View Source
var FAULTY_SECTOR_TOLERANCE = big.NewFloat(0.001)
View Source
var INFINITY_POOL_ID = big.NewInt(0)

the infinity pool is the first pool created, and has a 0 id cache this here to not fetch it from the contracts every time we need it

View Source
var LIQUIDATION_DTL = big.NewInt(92e16)
View Source
var LP_PLUS_ISSUANCE_SECONDS = SecondsInMinute * MinutesInHour * HoursInDay * 7 // 7 days
View Source
var LP_PLUS_ISSUANCE_SECONDS_PRE_LAUNCH = SecondsInMinute * MinutesInHour // 1 hour
View Source
var LP_PLUS_MAINNET_WINDOW_START_TS int = 1765900800 // Tue Dec 16 2025 08:00:00 GMT-0800 (PST)
View Source
var MAX_BORROW_DTL = big.NewInt(75e16)
View Source
var MAX_BORROW_DTL_GOLD_TIER = big.NewInt(90e16)
View Source
var MAX_UINT256 = new(big.Int).Sub(new(big.Int).Exp(big.NewInt(2), big.NewInt(256), nil), big.NewInt(1))
View Source
var RepeatBorrowEpochTolerance = EpochsInDay
View Source
var SPTierDTL = map[uint8]*big.Int{
	InactiveTier: big.NewInt(75e16),
	BronzeTier:   big.NewInt(80e16),
	SilverTier:   big.NewInt(857e15),
	GoldTier:     big.NewInt(90e16),
}

Tier DTL mapping for dynamic borrowing limits

View Source
var SP_PLUS_TIERS = uint8(4)
View Source
var WAD = big.NewInt(1e18)

Functions

This section is empty.

Types

type Method

type Method string
var (
	MethodBorrow          Method = "borrow"
	MethodPay             Method = "pay"
	MethodAddMiner        Method = "addMiner"
	MethodRemoveMiner     Method = "removeMiner"
	MethodWithdraw        Method = "withdraw"
	MethodPushFunds       Method = "pushFunds"
	MethodPullFunds       Method = "pullFunds"
	MethodSetRecovered    Method = "setRecovered"
	MethodDefaultDTL      Method = "setAgentDefaultDTL"
	MethodSPPlusDowngrade Method = "downgrade"
)

these method names must match the names in the Agent contract in order to get the right function signature

type Route

type Route string
var (
	RouteAgentPolice   Route = "ROUTER_AGENT_POLICE"
	RouteAgentFactory  Route = "ROUTER_AGENT_FACTORY"
	RoutePoolRegistry  Route = "ROUTER_POOL_REGISTRY"
	RouteMinerRegistry Route = "ROUTER_MINER_REGISTRY"
	RouteWFIL          Route = "ROUTER_WFIL_TOKEN"
	RouteVCIssuer      Route = "ROUTER_VC_ISSUER"
	RouteCredParser    Route = "ROUTER_CRED_PARSER"
	RouteAgentDeployer Route = "ROUTER_AGENT_DEPLOYER"
	RouteInfinityPool  Route = "ROUTER_INFINITY_POOL"
)

Jump to

Keyboard shortcuts

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