Scope sees all prices in one glance.
Scope is a price oracle aggregator living on the Solana network. It copies data from multiple on-chain oracles' accounts into one "price feed".
Scope pre-validate the prices with a preset of rules and perform the update only if they meet the criteria.
The repository contains two useful codebases:
scope
on-chain program.scope-types
to use as a dependency when accessing Scope prices in another smart contract.
- The association between a price at a given index in the price feed and the token pair associated with this price need is not stored on-chain. The label might indicate this association.
- A price feed is currently limited to 512 prices.
- If you do not have access to the Kamino source code, Scope can still be built. See Building without Kamino ktokens for more details.
If you do not have access to the Kamino source code, you can still build scope without the default yvaults
feature:
- Replace the
yvaults
dependency in./programs/scope/Cargo.toml
with theyvaults_stub
package:
[dependencies]
# Comment out the git repo
#yvaults = { git = "ssh://[email protected]/hubbleprotocol/yvault.git", features = ["no-entrypoint", "cpi", "mainnet"], optional = true }
# Add this line
yvaults = { path = "../yvaults_stub", package = "yvaults_stub", optional = true }
- Build scope with the following command:
cargo build-sbf --manifest-path=./programs/scope/Cargo.toml --no-default-features