Stellar

Deterministic oracle integration

Consume and operate the Stellar zero-coupon-bond oracle.

The Stellar oracle is a single-PT deterministic pricing contract and a factory for deploying instances. It does not read market data or Core state after initialization.

Pricing model

price(t) = future PT value / (1 + initial implied APY)^((maturity - t) / 365 days)

The implementation uses 18-decimal fixed-point time and rate math with an I256 port of Balancer LogExpMath. Positive division truncates, so intermediate time fractions and the final present value round downward.

Initialization fixes the PT address, maturity, initial implied APY, start time, and decimal metadata. The owner can update the future PT value. At or after maturity, the output is the current future PT value rather than an immutable maturity snapshot.

Query behavior

MethodBehavior
price(timestamp)Returns a price record for the supplied timestamp, or None before creation or on a math failure. Future timestamps clamp pricing time to maturity.
lastprice(asset)Returns the current modeled price. The asset argument is not used for selection.
decimals()Returns metadata describing the expected output scale; it does not rescale the configured future value.

The interface is a single-asset SEP-40-shaped subset. It does not expose the full multi-asset reference surface such as asset enumeration, resolution, or plural price history. Select the PT-bound oracle explicitly rather than relying on the lastprice asset argument.

Administration and TTL

  • The owner updates future PT value and controls two-step ownership transfer.
  • The upgrader changes the oracle WASM and can rotate the upgrader.
  • Renouncing ownership does not remove upgrade authority.
  • Long-lived oracle instances require permissionless bump calls because reads do not extend TTL.
  • The factory owner chooses the WASM hash for future deployments; factory deployment is permissionless.

Document who produces the future PT value, its update cadence and bounds, whether updates remain allowed after maturity, and how owner/upgrader keys are secured. These are price-model assumptions, not implementation details.

Deployment constraints

Factory deployment accepts a salt, oracle owner, PT, maturity, initial APY, future PT value, and decimals; the deployed oracle's upgrader is set to its owner. Use a collision-resistant salt derived from the intended configuration and maintain an authoritative PT-to-oracle registry.

Construct deployment calls from the deployed factory's contract specification. See Deployed Contracts for the factory address. Deploying an oracle does not register it with a consumer; check the consumer's configuration separately.

Difference from the Solidity oracle

The prior Solidity oracle dynamically reads PT maturity, decimals, underlying conversion, and supports several pricing models behind a Chainlink-style interface. The Stellar implementation stores its configuration, exposes the single ZCB model, and uses the SEP-40-shaped query surface.

On this page