Skip to content

VK-RED/clobby

Repository files navigation

CLOBBY

Clobby is an Onchain Orderbook built on Solana.(Click on each image to view in full resolution)

Image Image Image

Architecture

  • 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_events account.
  • The market creator continously invokes consume_events instruction, which increases/decreases the base amount and quote amount of the maker/taker's balance account.
  • Users can invoke settle_balance instruction, to get the assets from their balance account to their token account.

Setup Guide

  • Clone the Project.
  • Run anchor test to 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 in index.test.ts - Run bun test --timeout 60000 in the terminal to run the tests.

Test Results

Image

CONTRIBUTIONS

If you feel an issue or something needs to be fixed , please raise an Issue or a PR. Your contributions are welcomed most !! 🙏

About

Clobby is an Onchain OrderBook built on Solana.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published