Skip to content

Kamino-Finance/scope

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Scope

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.

Limitations

  • 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.

Building without Kamino kTokens

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 the yvaults_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