Today we'll build a crypto exchange - an order book exchange, like NYSE or NASDAQ, on Solana. The full code to the exchange used in this repo is: https://github.com/quicknode/solana-program-examples/tree/main/finance/order-book/anchor Haven't built a crypto program yet? Check out https://www.youtube.com/watch?v=B5eBWWQfQuM 00:00 Intro 00:21 What are limit orders, and what are order books? 00:48 What can you do with a crypto exchange? 00:54 AMM versus order-book based exchanges 01:23 What you're going to build today, and prerequisities 02:05 Base tokens and quote tokens 02:18 Creating a market to trade NVDAx/USDC 02:58 How to make order books stay fast as more orders come in 03:43 Vaults for NVDA, USDC and USDC fees. 04:12 Registering users as traders 04:40 Placing orders: Alice asks to sell 10 NVDAx at 265 05:10 Placing orders: Bob bids to buy 5 NVDAx at 250 05:26 Matching orders: Carol asks to sell 3 NVDAx at 245 - and matches Bob 06:20 How settlement works 07:00 Admins taking fees - Maria collects what she earned 07:19 Summary
The information provided is not trading advice. kdj.com does not assume any responsibility for any investments made based on the information provided in this article. Cryptocurrencies are highly volatile and it is highly recommended that you invest with caution after thorough research!
If you believe that the content used on this website infringes your copyright, please contact us immediately (info@kdj.com) and we will delete it promptly.