Skip to content

Releases: kamiyoai/percli

v0.7.0

07 Apr 15:54

Choose a tag to compare

What's new in v0.7.0

Security hardening

  • Oracle pinning — oracle feed pubkey is stored in MarketHeader at deploy time; crank validates the oracle account matches, preventing wrong-asset price injection
  • Account ownership — first deposit claims the account slot via set_owner(); withdraw, settle, and close verify signer == owner
  • Trade matcher authorization — matcher authority pubkey stored in MarketHeader; only the authorized matcher can submit trades
  • Program ownership checks — all instructions verify market account is owned by the program (owner = crate::ID)
  • Self-trade prevention — trade instruction rejects account_a == account_b

On-chain improvements

  • SPL Token integration with transfer_checked CPI
  • Pyth Network oracle reads (on-chain via pyth-sdk-solana)
  • PDA-signed vault transfers for withdrawals
  • Full Anchor 1.0 compatibility

CLI updates

  • deploy now requires --mint, --oracle, --matcher flags
  • deposit/withdraw require --mint, --token-account
  • crank reads Pyth on-chain (takes --oracle pubkey instead of manual price)
  • Keeper auto-cranks with oracle pubkey

Published to crates.io: percolator-engine, percli-core, percli-program, percli-wasm, percli-chain, percli

v0.6.0 — SPL Tokens, Pyth Oracle, Security Hardening

06 Apr 14:43

Choose a tag to compare

What's New

Real Token Transfers

  • Deposit/withdraw now move actual SPL tokens (e.g. USDC) via transfer_checked CPI
  • PDA-controlled vault ([b"vault", market.key()]) holds all market collateral
  • Mint and token account validation enforced by Anchor constraints

On-Chain Pyth Oracle

  • Crank instruction reads price directly from a Pyth v2 price feed account
  • No more passing oracle price as a parameter — price is read and validated on-chain
  • Staleness check (60s max), Trading status required, exponent bounds [-18, 18]

Security Hardening

  • Program owner validation on all market account access (prevents fake account injection)
  • Pyth oracle account owner validation (must be owned by Pyth program)
  • Checked arithmetic for price exponent conversion (no silent overflow/truncation)
  • Future oracle timestamps rejected in staleness check
  • Self-trade prevention (account_a != account_b)
  • init_oracle_price > 0 and amount > 0 validation
  • Header deserialization returns error instead of panicking

Breaking Changes

  • deposit / withdraw amount type: u128u64 (matches SPL token amounts)
  • crank no longer accepts oracle_price parameter — pass a Pyth feed account instead
  • keeper now requires --pyth-feed <PUBKEY> (no longer optional)
  • Chain CLI commands require --mint and --token-account for deposit/withdraw

Upgrade from Anchor 0.32 → 1.0

  • Full Anchor 1.0 compatibility with Solana CLI 3.0
  • CpiContext::new takes Pubkey (not AccountInfo)

All 6 crates published on crates.io:
percolator-engine · percli-core · percli-program · percli-chain · percli-wasm · percli

v0.4.0

05 Apr 21:59

Choose a tag to compare

What's New

First release from the percolator fork. The engine is now a proper crate dependency (percolator-engine) instead of a vendored copy.

Changes from 0.3.1

  • Forked from upstream — clean workspace with the Percolator engine as a path dependency
  • Engine updated to v12.1.0 — all APIs migrated (_not_atomic suffixes, SideMode enum, removed liquidation_buffer_bps)
  • CI pipeline — split into core (fast) and chain (Solana/Anchor) jobs
  • Documentation — full README with install, commands, scenarios, agent mode, on-chain usage
  • Repo structure — CONTRIBUTING.md, SECURITY.md, CODE_OF_CONDUCT.md, issue/PR templates

Crates

Crate Version
percli 0.4.0
percli-core 0.4.0
percli-chain 0.4.0
percli-program 0.4.0
percli-wasm 0.4.0
percolator-engine 0.4.0

Install

cargo install percli

Pre-built Binaries

Download from the assets below — available for Linux (x86_64, aarch64), macOS (x86_64, aarch64), and Windows.