MCPcopy Index your code
hub / github.com/Ellipsis-Labs/phoenix-v1

github.com/Ellipsis-Labs/phoenix-v1 @v0.2.4

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.2.4 ↗ · + Follow
449 symbols 1,222 edges 49 files 35 documented · 8% updated 25d agov0.1.1 · 2023-02-14★ 2756 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

phoenix

Phoenix is an on-chain orderbook that operates without a crank.

Documentation

Documentation and instructions on how to interact with the program are available on GitBook.

Licensing

The primary license for Phoenix is the Business Source License 1.1 (BUSL-1.1), which can be found at LICENSE.

Audits

Phoenix has been audited by OtterSec. The audit report can be found at audits/OtterSec.pdf.

Bug Bounty

Information on the bug bounty program for Phoenix can be found at SECURITY.md.

Build Verification

You can use Solana Verify CLI to verify that the program deployed at PhoeNiXZ8ByJGLkxNfZRnkUfjvmuYqLR89jjFHGqdXY matches the code in this repository. After installing the CLI, run:

solana-verify verify-from-repo -um --program-id PhoeNiXZ8ByJGLkxNfZRnkUfjvmuYqLR89jjFHGqdXY https://github.com/Ellipsis-Labs/phoenix-v1

This may take awhile as it builds the program inside Docker, then verifies that the build hash matches the deployed program hash. The verification process is much faster on a non-ARM machine.

Building and Testing Locally

To build the contract, run:

./build.sh

To run the tests, run:

./test.sh

Extension points exported contracts — how you extend this code

Market (Interface)
A wrapper around an matching algorithm implementation that allows arbitrary structs to be used as generic markets. [1 …
src/state/markets/market_traits.rs
WrapperU64 (Interface)
(no doc)
src/quantities.rs
OrderId (Interface)
(no doc) [1 implementers]
src/state/markets/market_traits.rs
RestingOrder (Interface)
(no doc) [1 implementers]
src/state/markets/market_traits.rs
WritableMarket (Interface)
(no doc) [1 implementers]
src/state/markets/market_traits.rs
OrderPacketMetadata (Interface)
(no doc) [1 implementers]
src/state/order_schema/order_packet.rs

Core symbols most depended-on inside this repo

assert_with_msg
called by 78
src/program/error.rs
as_ref
called by 58
src/program/validation/checkers/mod.rs
create_new_order_instruction
called by 43
src/program/instruction_builders/market_instructions.rs
place_order
called by 37
src/state/markets/fifo.rs
to_vec
called by 30
src/program/instruction.rs
get_header
called by 25
src/program/validation/checkers/phoenix_checkers.rs
clone_keypair
called by 25
tests/helpers.rs
create_new_multiple_order_instruction
called by 20
src/program/instruction_builders/market_instructions.rs

Shape

Method 194
Function 171
Class 66
Enum 12
Interface 6

Languages

Rust99%
TypeScript1%

Modules by API surface

src/state/markets/fifo.rs59 symbols
src/state/order_schema/order_packet.rs39 symbols
tests/test_phoenix.rs32 symbols
src/state/markets/test_market.rs30 symbols
src/program/instruction_builders/market_instructions.rs27 symbols
src/program/validation/loaders.rs21 symbols
src/state/markets/market_traits.rs19 symbols
src/program/processor/new_order.rs18 symbols
src/program/validation/checkers/phoenix_checkers.rs16 symbols
src/program/instruction_builders/market_authority_instructions.rs15 symbols
src/state/matching_engine_response.rs14 symbols
src/program/events.rs13 symbols

For agents

$ claude mcp add phoenix-v1 \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page