LlamaRisk

Parameters and configuration

The PT implementation splits configuration across several surfaces. Where a value lives determines who can change it and whether the workflow must be redeployed.

Configuration surfaces

SurfaceControlsChange path
PTParameterRegistryShared per-PT methodology parameters and eligibilityRegistry updater transaction
Router routeWorkflow destination, enablement, replay guard, publication delay, scalar stepOwner or route updater transaction
AgentHub and RangeValidationModuleAgent enablement, injection delay, directional execution rangesAgent administration transaction
Workflow configurationNetworks, addresses, schedule, gas, write simulation, risk deadbands, target definitionsDeployment-owned configuration and workflow deployment
Methodology codeEquations, encodings, domain checks, and fixed constantsCode review, tests, rebuild, redeployment, and route update

No canonical deployment target or schedule is defined here. Deployment-owned configuration supplies those operational values.

PTParameterRegistry

PtMarketParams contains only the fields shared through the on-chain PT registry:

FieldTypeUsed byMeaning
enabledboolAll workflowsWhether this PT is eligible for new records
modelVersionuint32All workflowsMethodology version included in record provenance
emaSpanuint32Market stateNumber of observations in the EMA smoothing span
emaFreshnessSecondsuint64Discount and risk parametersMaximum age of both the EMA observation and its source block
thresholdBpsuint64Discount rateRequired absolute adapter-versus-market price deviation
kReferenceEndpointuint64Risk parametersReference pool-proportion multiplier scaled by 10,000
emodeCategoryIdsuint16[]Risk parametersGoverned eMode categories eligible for evaluation

The registry requires a non-zero EMA span, freshness interval, reference multiplier, and non-empty eMode list. thresholdBps cannot exceed 10,000.

kReferenceEndpoint = 25_000 represents 2.5×. It uses 10,000 as a fixed-point scale, not ordinary percentage basis points.

Workflow configuration

Every workflow receives its schedule, source-chain identifiers, write-chain identifiers, contract addresses, and gas limit from deployment configuration.

The executable workflows also configure the router receiver, Forwarder, RiskOracle, AgentHub, and agent ID used for write simulation and publication.

The risk-parameter workflow also defines:

FieldMeaning
ltDeviationThresholdBpsPublish deadband for liquidation threshold
ltvDeviationThresholdBpsPublish deadband for loan-to-value
lbDeviationThresholdBpsPublish deadband for liquidation bonus
targets[]Methodology definitions available to the deployment

Each target contains:

FieldMeaning
emodeIdAave eMode category identifier
labelHuman-readable operational label
categoryKeyMethodology category label
underlyingKeyUnderlying asset label
ltCapBpsMaximum methodology liquidation threshold
lbFloorBpsMinimum methodology liquidation bonus

The registry list and deployment target list must intersect. Adding an ID only to the registry does not create a methodology target; adding one only to workflow configuration does not make it eligible.

Router controls

Each executable workflow route can define:

ControlMeaning
enabledWhether the workflow identity may publish
minDelaySecondsMinimum interval per workflow, market, and update type
maxStepBpsRelative scalar movement limit; not applied to tuple payloads
maxReportAgeSecondsMaximum accepted age of the signed consensus timestamp

The router also requires strict timestamp ordering when its report-age guard is enabled. Disabling the route is the correct way to stop it without changing report encoding.

AgentHub and range controls

AgentHub provides a second timing and enablement boundary for execution. It tracks the last successfully injected update separately from the router's last publication.

RangeValidationModule supplies maximum increase and decrease values for each update type. Each direction can be:

  • absolute, expressed in the parameter's native units; or
  • relative, expressed against the current value.

Market-specific ranges take precedence over default ranges. The current workflows fail closed when required agent or range wiring is missing.

Fixed implementation constants

ConstantValuePurpose
Year31,536,000 secondsMatches the PT adapter's 365-day convention
LTV/LT buffer200 bpsDerives LTV below liquidation threshold
Maximum market proportion96%Bounds the stressed Pendle reference endpoint
Oracle price floor1e-9Avoids zero in intermediate calculations
Maximum EMA log rate10Rejects unsupported implied-rate input
K_FACTOR_SCALE10,000Fixed-point scale for kReferenceEndpoint

Changing these values changes methodology semantics and requires code-level review rather than a registry transaction.

Coordinating controls

The same recommendation can encounter controls at several layers:

  • a workflow publication deadband decides whether a difference is material;
  • router timing and replay controls decide whether the report may be stored;
  • AgentHub timing decides whether a stored recommendation may be injected; and
  • range validation and protocol invariants decide whether the action is safe.

A tighter downstream control is not bypassed by a looser workflow. It prevents execution or causes the publication preflight to reject the report.

Disable and pause controls

ControlScopeEffect
Registry enabled = falseOne PT across all three workflowsWorkflows skip new records
Router route disabledOne executable workflow identityRouter rejects that workflow
Router pausedAll router routesRouter rejects routed reports
Agent disabledOne execution pathRecommendation may remain stored, but that agent does not act

None of these controls reverses an Aave parameter change that was already executed.

On this page