Releases: kamiyoai/percli
Releases · kamiyoai/percli
v0.7.0
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 verifysigner == 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_checkedCPI - Pyth Network oracle reads (on-chain via
pyth-sdk-solana) - PDA-signed vault transfers for withdrawals
- Full Anchor 1.0 compatibility
CLI updates
deploynow requires--mint,--oracle,--matcherflagsdeposit/withdrawrequire--mint,--token-accountcrankreads Pyth on-chain (takes--oraclepubkey 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
What's New
Real Token Transfers
- Deposit/withdraw now move actual SPL tokens (e.g. USDC) via
transfer_checkedCPI - 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 > 0andamount > 0validation- Header deserialization returns error instead of panicking
Breaking Changes
deposit/withdrawamount type:u128→u64(matches SPL token amounts)crankno longer acceptsoracle_priceparameter — pass a Pyth feed account insteadkeepernow requires--pyth-feed <PUBKEY>(no longer optional)- Chain CLI commands require
--mintand--token-accountfor deposit/withdraw
Upgrade from Anchor 0.32 → 1.0
- Full Anchor 1.0 compatibility with Solana CLI 3.0
CpiContext::newtakesPubkey(notAccountInfo)
All 6 crates published on crates.io:
percolator-engine · percli-core · percli-program · percli-chain · percli-wasm · percli
v0.4.0
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_atomicsuffixes,SideModeenum, removedliquidation_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 percliPre-built Binaries
Download from the assets below — available for Linux (x86_64, aarch64), macOS (x86_64, aarch64), and Windows.