defi-core
Core DeFi domain types for Rust — chains, tokens, pools, trades, and a comprehensive error model.
defi-core defines the shared vocabulary the rest of the Orkid stack is built on: Chain, Token, Pool, Trade, Route, and error types that model real DEX failure modes (insufficient liquidity, slippage exceeded, expired deadlines). Use it when you need well-typed DeFi primitives instead of ad-hoc structs.
Install
cargo add defi-coreWhen to use
Building any Rust service that touches DEX routing, quoting, portfolio accounting, or on-chain trade modeling.
Links
- Package: https://crates.io/crates/defi-core
- Repository: https://github.com/orkid-labs/defi-core
- Documentation: https://docs.rs/defi-core