Crate phoenix

Source
Expand description

Phoenix is a limit order book exchange on the Solana blockchain.

It exposes a set of instructions to create, cancel, and fill orders. Each event that modifies the state of the book is recorded in an event log which can be queried from a transaction signature after each transaction is confirmed. This allows clients to build their own order book and trade history.

The program is able to atomically match orders and settle trades on chain. This is because each market has a fixed set of users that are allowed to place limit orders on the book. Users who swap against the book will have their funds settle instantaneously, while the funds of users who place orders on the book will be immediately available for withdraw post fill.

Modules§

phoenix_log_authority
This is a static PDA with seeds: [b“log“] If the program id changes, this will also need to be updated
program
quantities
We define wrapper types around primitive number types to ensure that we only do arithmetic on quantities that make sense.
state

Statics§

ID
The static program ID
security_txt

Functions§

check_id
Confirms that a given pubkey is equivalent to the program ID
entrypoint
Safety
id
Returns the program ID
process_instruction