Skip to main content
Governance owns the controller and administers the price aggregator. Propose a typed AdminOperation, wait for its delay, then execute the scheduled call. Signatures omit the Soroban-injected Env argument. Construction uses __constructor(admin: Address, min_delay: u32). It sets the owner and grants that address all five roles. min_delay must be nonzero. Types are defined in Data types. Errors are listed in Errors.

Roles

Deployment, scheduling, and views

Proposal authorization

Every propose call requires PROPOSER. These variants also require the same proposer address to be the current owner (#44 NotAuthorized):
  • TransferGovOwnership, TransferCtrlOwnership
  • UpgradeGov, UpgradeController, UpgradePool, UpgradePositionNft, UpgradePriceAggregator, MigrateController
  • UpdateGovDelay, SetPriceAggregator, ConfigureAssetOracle, EditOracleTolerance, SetSwapAggregator
  • ApproveBlendPool, SetAccumulator, GrantGovRole
RevokeGovRole cannot target the owner or the proposing address (#44). Its target cannot cancel its own revocation (#46). Revocation also rejects the last proposer (#48).

Immediate emergency calls

These calls bypass the timelock within the limits shown below. Revoking PROPOSER, EXECUTOR, or CANCELLER requires the timelocked RevokeGovRole operation.

Clear listing flags

EditAssetInSpoke can retain or tighten flags. It cannot clear paused, frozen, or no_seize (#317). To clear flags:
  1. Read the controller’s get_spoke_asset_flags_epoch(spoke_id, hub_asset).
  2. Propose RelaxSpokeAssetFlags(RelaxSpokeAssetFlagsArgs) with that expected_epoch and the intended three flag values.
  3. Execute the scheduled controller call after the standard delay.
The proposal checks the epoch. Execution checks it again. A later flag write, including an explicit write of unchanged flags, invalidates the old proposal (#319). Read the current flags and epoch, then propose a new operation. A risk-only edit that keeps the flags does not change the epoch. Removing and relisting an asset preserves and advances the epoch, respectively.

Recovery and ownership

Executor authorization

execute, execute_self, and execute_canceller_reset all take executor: Option<Address>:
  • Some(address) — that address must authorize the call and hold EXECUTOR.
  • None — no executor check runs, so execution is open to anyone.
The operation must be ready and unexpired in either case. None permits any caller to execute the scheduled operation without changing its target or arguments.

AdminOperation variants

Controller-targeted: Price-aggregator-targeted, executed through execute: ConfigureAssetOracle, EditOracleTolerance, UpgradePriceAggregator(hash). Governance-self, executed through execute_self: UpgradeGov(hash), UpdateGovDelay(ledgers), GrantGovRole, RevokeGovRole, TransferGovOwnership, SetPriceAggregator. The latter updates governance’s stored price-aggregator address and forwards that address to the controller. RemoveSpoke sets the deprecation flag. DeployPool and UpgradePool take the Wasm hash directly. No token-approval or pool-template registration is required.

Variant payload types

Operation argument maps

These named structs encode as maps. SpokeAssetArgs and PositionLimits are defined in Data types. RelaxSpokeAssetFlagsArgs is defined in Clear listing flags.

Execution model

Controller- and price-aggregator-targeted operations run through execute, which forwards the scheduled call to that target and returns its result. Governance-self operations run through execute_self instead. They use typed inline execution because Soroban does not allow a contract to make the generic self-call that execute relies on. propose uses a zero predecessor. For external execution, use the same target, function, encoded arguments, zero predecessor, and salt as the scheduled call. ConfigureAssetOracle resolves asset decimals before scheduling; EditOracleTolerance converts the width into reciprocal ratio bounds. Use resolve_asset_oracle and resolve_oracle_tolerance to check those values. Sensitive operations are UpgradeGov, UpgradeController, UpgradePool, UpgradePositionNft, UpgradePriceAggregator, GrantGovRole, RevokeGovRole, TransferGovOwnership, TransferCtrlOwnership, SetSwapAggregator, SetPriceAggregator, SetPositionManager, and ForceSocializeBadDebt. Other AdminOperation variants use the standard delay. Canceller reset uses the recovery delay. The sensitive floor is an audit-period value at contract revision a2486b25. Read the deployed delay and verify its code before planning execution. A ready operation expires after 120960 additional ledgers (#40). UpdateGovDelay cannot reduce the configured delay and cannot exceed 241920 ledgers (#39). Successful execution clears the scheduled state. Testing-only immediate forwarders are excluded from production builds.