Introduction
An oracle brings off-ledger data into a Scrypto component; this guide covers push and pull oracles on Radix and one production failure. Components run deterministically on the Radix Engine, the software that runs every transaction on Radix, and can read only data already on the ledger: they cannot make HTTP calls or read external APIs. Asset prices, exchange rates and random numbers all have to be brought in by an oracle.
Push Oracles
A push oracle is an off-ledger service that submits transactions on a schedule to update price data on the ledger. A Scrypto component stores the latest values and exposes a read method that other components call.
Architecture
- An off-ledger relayer watches data sources such as exchange APIs and aggregator feeds.
- The relayer signs and submits a transaction calling
update_price(asset, price, timestamp)on the oracle component. - The oracle component, protected by an admin badge, stores the update in its component state or a
KeyValueStore. - Consumer components call
get_price(asset)to read the latest value.
Trade-offs
- Pros: simple consumer integration, predictable data freshness, works with any data type.
- Cons: the relayer pays a transaction fee for every update, data goes stale between updates, and the feed stops if the relayer goes offline.
Mitigations
Include a timestamp in each price update and have consumers reject prices older than a threshold, such as 5 minutes. Run several independent relayers and take the median of their prices, so no single relayer sets the price. A staleness check does not catch a feed that is updated on time with a wrong value, which is how Weft Finance was drained in August 2026.
Pull Oracles
A pull oracle delivers data within the consumer's transaction rather than pre-posting it on-ledger. The oracle provider signs the data off-chain, and the consumer's transaction manifest includes both the signed data payload and a verification call to the oracle contract.
Architecture
- The consumer's frontend fetches a signed price attestation from the oracle provider's API.
- The frontend constructs a transaction manifest that first calls the oracle component's
verify_and_store(signed_data)method, then calls the consumer component's business logic. - The oracle component verifies the provider's signature and exposes the data for the remainder of the transaction.
Trade-offs
- Pros: Data is always fresh (fetched at transaction time), no relayer infrastructure needed, the consumer's own transaction pays the fee.
- Cons: More complex frontend integration, requires the oracle provider to run a signing API, consumer must handle the multi-step manifest.
RedStone on Radix
RedStone announced an integration with Radix in June 2025. Its Radix price adapter is a Scrypto blueprint that takes a signed payload as a method argument: get_prices checks the signers and returns the prices within the same transaction, and write_prices stores them in the component for read_prices to return later.
Supra on Radix
Supra announced in December 2023 that it would offer push and pull price feeds on Radix for more than 100 crypto asset pairs, plus decentralised randomness through a verifiable random function (VRF). The VRF is useful for on-ledger gaming, lotteries, and fair NFT distribution, where a manipulable random source would be exploitable. As of November 2026, Supra's pull-oracle network list names Radix testnet only.
When a feed is fresh and wrong
On 30 August 2026 Weft Finance, a lending market on Radix, was drained through a push oracle that was neither stale nor unsigned. The feed was rewritten every ten minutes, as designed, with a price that had been wrong by about seven orders of magnitude for two days.
What the ledger records
Weft reads collateral values from a single push oracle it registers as "Default PriceFeed" (component). A relayer account calls update_prices on it every ten minutes with a map of twenty assets, authorised by one non-fungible badge. Three of those badges exist, and the badge resource carries no on-ledger metadata, so nothing on the ledger says who holds price authority.
On 28 August 2026, in one of those routine calls (transaction), the price of $HUG went from about 0.00013 $XRD, a figure the feed had carried unchanged for at least four weeks, to about 1,290 $XRD, the range the same feed uses for dollar stablecoins. It stayed in that range for the next 53 hours, moving a little on each update, through 324 further transactions on the component. On 30 August a borrow drew about 71m $XRD of debt against about 540,000 $HUG that the same transaction had bought for about 71 $XRD. The last update before that borrow priced $HUG at about 1,330 $XRD.
Why a staleness check does not help
Every one of those 324 updates carried a current timestamp, and most carried a value that differed from the one before it, so a consumer rejecting anything older than five minutes would have accepted all of them.
Checks that address the failure
- Cap the move per update. The $HUG price rose about ten-million-fold between two updates ten minutes apart. A per-asset cap on the change between updates rejects such an update instead of lending against it.
- Bound each asset to a plausible range and stop lending against it outside that range.
- Cross-check against a venue you can read on the ledger. The real $HUG price was available inside the attacking transaction itself, on the Ociswap pool that sold the $HUG. A component that compares the feed with on-ledger pool state checks one source against a second, independent one.
- Price against depth, not quantity. At the feed's price the collateral was worth about 718m $XRD, while the whole $HUG market held about a thousand dollars of pooled liquidity, so no liquidation could have sold the collateral for anything near the debt.
- Keep an off switch that does not need a redeploy: a per-asset disable the protocol can reach without shipping new code.
What the operator did next
From 31 August 2026 the operator's ten-minute update prices ten native Radix tokens at 0.0000000001 $XRD each: $WEFT, $HUG, $EARLY, $OCI, $ASTRL, $DFP2, $CAVIAR, $SRG, $FLOOP and $MOX (transaction). The ten wrapped and bridged assets in the same map keep market prices. A price of effectively zero removes a token from use as collateral without any change to the component. As of 25 November 2026 the update still writes ten tokens at that floor and market prices for the other ten.
Next Steps
- Transaction Manifest Language β drive your components from the outside, the way users will
- Permissioned and Regulated Assets β withdraw and deposit rules, freeze, recall, and the account-side deposit controls
