Skip to content

The Normal Wormhole Updater uses Wormhole Queries to bring cross and off-chain data to the Normal Protocol on Solana

License

Notifications You must be signed in to change notification settings

normalfinance/wormhole-updater

 
 

Repository files navigation

Logo

Normal Wormhole Updater

The Normal Wormhole Updater uses Wormhole Queries to bring cross and off-chain data to the Normal Protocol on Solana.

Features

  • 🤑 Asset prices unsupported by Solana oracles
  • 🏦 Real-time lending, staking, and LP yield rates
  • 🖼️ NFT floor prices and metadata
  • ❓ Prediction market outcomes
  • and more...

Documentation

Learn more about developing with Queries in the docs.

Read more on how the Normal Protocol uses this Wormhole Updater in our docs.

Accounts

  • GuardianSignatures stores unverified guardian signatures for subsequent verification. These are created with post_signatures in service of verifying a root via Queries and closed when that root is verified with verify_query or can be explicitly closed with close_signatures by the initial payer.
  • State stores config variables relevant to receiving and verifying a staking pool rate and making it available for consumption.

Instructions

  • post_signatures posts unverified guardian signatures for verification during update_root_with_query.
  • verify_query with a Query response and GuardianSignatures account, verifies the signatures against an active guardian set and logs the Query response. This is where you would add additional verification relevant to your use case and process the result.
  • close_signatures allows the initial payer to close a GuardianSignatures account in case the query was invalid.
  • update_pool takes the cross chain query response for the stake pool on Ethereum and stores the result.
  • get_rate reads the current total_active_stake from State if not stale.

Testing

anchor test

Building

Wormhole Testnet / Solana Devnet

anchor build -- --no-default-features --features testnet

Mainnet

anchor build

Authors

Contributing

Contributions are always welcome!

See contributing.md for ways to get started.

Please adhere to this project's code of conduct.

Feedback

If you have any feedback, please reach out to us at [email protected]

License

Apache-2.0

About

The Normal Wormhole Updater uses Wormhole Queries to bring cross and off-chain data to the Normal Protocol on Solana

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 54.0%
  • Rust 46.0%