Clobby is an Onchain Orderbook built on Solana.(Click on each image to view in full resolution)
- Users create a balance account for each market, to claim their base and quote assets.
- Users Place a bid/ask order in the market.
- The order will sit in the orderbook. The base/quote asset gets transferred from user account to market account.
- When an opposing order gets matched, the fill events and the out events are recorded in the
market_eventsaccount. - The market creator continously invokes
consume_eventsinstruction, which increases/decreases the base amount and quote amount of the maker/taker's balance account. - Users can invoke
settle_balanceinstruction, to get the assets from their balance account to their token account.
- Clone the Project.
- Run
anchor testto start the tests. - Build and Deploy the Program
-
anchor build-anchor deploy - Run the tests
- Navigate to the client folder
cd client- Replace the ProgramID inindex.test.ts- Runbun test --timeout 60000in the terminal to run the tests.
If you feel an issue or something needs to be fixed , please raise an Issue or a PR. Your contributions are welcomed most !! 🙏



