0xcrypto102 / TradeTest

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Get Started

Please make sure that you install the Solana/Anchor/Rust on your development environment

https://book.anchor-lang.com/getting_started/installation.html

How to build

anchor build

How to deploy

anchor deploy

How to test

anchor run test

Logic

  • Init the program
  • Deposit SOL to vault by owner
  • Deposit USDC to token vault by owner
  • Allow users to deposit SOL and withdraw USDC (based on SOL price from Pyth)
  • Allow users to deposit USDC and withdraw SOL (based on SOL price from Pyth)

How to get the token price in solana

https://www.quicknode.com/guides/solana-development/3rd-party-integrations/pyth-price-feeds

About


Languages

Language:Rust 65.2%Language:TypeScript 34.8%