LlamaRisk

PTParameterRegistry

Function index21 functions

The PTParameterRegistry stores the per-market settings read by the market-state, discount-rate, and risk-parameter CRE workflows. It does not receive reports or execute recommendations; it supplies the shared configuration used before those reports are calculated.

PropertyValue
Access modelTwo-step owner plus a separate updater

The examples assume REGISTRY and MARKET are set for the deployment being queried.

Example outputs

Example outputs remain TODO until a production deployment is published and can be queried.

REGISTRY=<registry-address>
MARKET=<pt-market-address>

Market parameter schema

getPtMarketParams and setPtMarketParams use the following tuple:

FieldTypeMeaning
enabledboolWhether workflows may process the market
modelVersionuint32Version attached to published model output
emaSpanuint32EMA span in observations
emaFreshnessSecondsuint64Maximum accepted age of stored EMA state
thresholdBpsuint64Discount-rate deviation threshold in basis points
kReferenceEndpointuint64Risk-model reference multiplier scaled by K_FACTOR_SCALE
emodeCategoryIdsuint16[]Aave eMode categories associated with the PT

All market configuration writes require the updater. Ownership and updater administration require the owner or pending owner as documented below.

Constants

K_FACTOR_SCALE

PTParameterRegistry.K_FACTOR_SCALE() → uint640xcc34871b

Returns fixed-point scale, currently 10_000.

Example
>>> PTParameterRegistry.K_FACTOR_SCALE()
TODO

MAX_BPS

PTParameterRegistry.MAX_BPS() → uint640xfd967f47

Returns maximum basis-point value, currently 10_000.

Example
>>> PTParameterRegistry.MAX_BPS()
TODO

Market parameters

getEmodeCategoryIds

PTParameterRegistry.getEmodeCategoryIds(address) → uint16[]0xa53f7226

Returns the eMode categories configured for a PT market.

InputTypeDescription
marketaddressPT market.
Example
>>> PTParameterRegistry.getEmodeCategoryIds(market)
TODO

getPtMarketParams

PTParameterRegistry.getPtMarketParams(address) → PtMarketParams0x19f2e8bd

Returns the complete registry configuration for a PT market.

InputTypeDescription
marketaddressPT market.
Example
>>> PTParameterRegistry.getPtMarketParams(market)
TODO

marketExists

PTParameterRegistry.marketExists(address) → bool0x712ca018

Returns whether a market has a registry entry.

InputTypeDescription
marketaddressPT market.
Example
>>> PTParameterRegistry.marketExists(market)
TODO

setPtMarketParams

PTParameterRegistry.setPtMarketParams(address,(bool,uint32,uint32,uint64,uint64,uint64,uint16[])) → void0xbe8bebef

Creates or replaces the complete PT market configuration.

InputTypeDescription
marketaddressMarket.
params(bool,uint32,uint32,uint64,uint64,uint64,uint16[])Complete parameter tuple.

Authorization: Updater

Example
>>> PTParameterRegistry.setPtMarketParams(market, params)
TODO

setEnabled

PTParameterRegistry.setEnabled(address,bool) → void0x17fe72bb

Sets enabled.

InputTypeDescription
marketaddressMarket.
enabledboolEnabled.

Authorization: Updater

Example
>>> PTParameterRegistry.setEnabled(market, enabled)
TODO

setModelVersion

PTParameterRegistry.setModelVersion(address,uint32) → void0xab11c0e3

Sets model version.

InputTypeDescription
marketaddressMarket.
modelVersionuint32Model version.

Authorization: Updater

Example
>>> PTParameterRegistry.setModelVersion(market, modelVersion)
TODO

setEmaSpan

PTParameterRegistry.setEmaSpan(address,uint32) → void0xc3897af1

Sets the EMA span.

InputTypeDescription
marketaddressMarket.
emaSpanuint32Non-zero EMA span.

Authorization: Updater

Example
>>> PTParameterRegistry.setEmaSpan(market, emaSpan)
TODO

setEmaFreshnessSeconds

PTParameterRegistry.setEmaFreshnessSeconds(address,uint64) → void0x9b5411e9

Sets the maximum EMA age in seconds.

InputTypeDescription
marketaddressMarket.
emaFreshnessSecondsuint64Non-zero freshness period.

Authorization: Updater

Example
>>> PTParameterRegistry.setEmaFreshnessSeconds(market, emaFreshnessSeconds)
TODO

setDeviationThresholdBps

PTParameterRegistry.setDeviationThresholdBps(address,uint64) → void0x27ff1f07

Sets the discount-rate deviation threshold in basis points.

InputTypeDescription
marketaddressMarket.
thresholdBpsuint64Threshold no greater than MAX_BPS.

Authorization: Updater

Example
>>> PTParameterRegistry.setDeviationThresholdBps(market, thresholdBps)
TODO

setKReferenceEndpoint

PTParameterRegistry.setKReferenceEndpoint(address,uint64) → void0x9808c29a

Sets the scaled reference-endpoint multiplier.

InputTypeDescription
marketaddressMarket.
kReferenceEndpointuint64Non-zero scaled multiplier.

Authorization: Updater

Example
>>> PTParameterRegistry.setKReferenceEndpoint(market, kReferenceEndpoint)
TODO

setEmodeCategoryIds

PTParameterRegistry.setEmodeCategoryIds(address,uint16[]) → void0xf6b54bcd

Sets the eligible eMode category IDs.

InputTypeDescription
marketaddressMarket.
idsuint16[]Non-empty category array.

Authorization: Updater

Example
>>> PTParameterRegistry.setEmodeCategoryIds(market, ids)
TODO

deleteMarket

PTParameterRegistry.deleteMarket(address) → void0xd960e94a

Deletes market.

InputTypeDescription
marketaddressMarket.

Authorization: Updater

Example
>>> PTParameterRegistry.deleteMarket(market)
TODO

deleteMarket removes the complete record and causes getPtMarketParams and getEmodeCategoryIds to revert for that market.

Updater and ownership

owner

PTParameterRegistry.owner() → address0x8da5cb5b

Returns the current owner.

Example
>>> PTParameterRegistry.owner()
TODO

pendingOwner

PTParameterRegistry.pendingOwner() → address0xe30c3978

Returns the current pending owner.

Example
>>> PTParameterRegistry.pendingOwner()
TODO

updater

PTParameterRegistry.updater() → address0xdf034cd0

Returns the current updater.

Example
>>> PTParameterRegistry.updater()
TODO

setUpdater

PTParameterRegistry.setUpdater(address) → void0x9d54f419

Sets updater.

InputTypeDescription
updateraddressNon-zero updater address.

Authorization: Owner

Example
>>> PTParameterRegistry.setUpdater(updater)
TODO

transferOwnership

PTParameterRegistry.transferOwnership(address) → void0xf2fde38b

Transfers ownership.

InputTypeDescription
owneraddressNew owner.

Authorization: Owner; starts two-step transfer

Example
>>> PTParameterRegistry.transferOwnership(owner)
TODO

acceptOwnership

PTParameterRegistry.acceptOwnership() → void0x79ba5097

Accepts ownership.

Authorization: Pending owner

Example
>>> PTParameterRegistry.acceptOwnership()
TODO

renounceOwnership

PTParameterRegistry.renounceOwnership() → void0x715018a6

Renounces ownership.

Authorization: Owner

Example
>>> PTParameterRegistry.renounceOwnership()
TODO

On this page