Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,12 @@ Allow two users to swap digital assets with each other, each getting 100% of wha

[anchor](./tokens/escrow/anchor) [native](./tokens/escrow/native)

### Central Limit Order Book

Order-book exchange — users post limit bids and asks at chosen prices, tokens are locked in program vaults, and orders cross against the opposing side using price-time priority. Fees route to a dedicated fee vault, maker/taker proceeds land in unsettled balances, and funds are withdrawn via `settle_funds`. A minimal teaching example of the mechanics behind Openbook and Phoenix.

[anchor](./defi/clob/anchor)

### Minting a token from inside a program with a PDA as the mint authority

[Mint a Token from inside your own onchain program using the Token program.](./tokens/pda-mint-authority/README.md) Reminder: you don't need your own program just to mint an NFT, see the note at the top of this README.
Expand Down
7 changes: 7 additions & 0 deletions defi/clob/anchor/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.anchor
.DS_Store
target
**/*.rs.bk
node_modules
test-ledger
.yarn
20 changes: 20 additions & 0 deletions defi/clob/anchor/Anchor.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[toolchain]
# Pin Solana to the version used across the repo's Anchor 1.0 examples so the
# bundled test validator and BPF toolchain stay in lock-step.
solana_version = "3.1.8"

[features]
resolution = true
skip-lint = false

[programs.localnet]
clob = "C69UJ8irfmHq5ysyLek7FKApHR86FBeupiz4JnoyPzzx"

[provider]
cluster = "Localnet"
wallet = "~/.config/solana/id.json"

[scripts]
# LiteSVM Rust tests live under `programs/clob/tests/` and include the built
# `.so` via `include_bytes!`, so a fresh `anchor build` must run first.
test = "cargo test"
13 changes: 13 additions & 0 deletions defi/clob/anchor/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[workspace]
members = ["programs/*"]
resolver = "2"

[profile.release]
overflow-checks = true
lto = "fat"
codegen-units = 1

[profile.release.build-override]
opt-level = 3
incremental = false
codegen-units = 1
Loading
Loading