Deterministic financial math.
Identical results everywhere.
Precision arithmetic for DeFi protocols. Same calculation, same result—x86, ARM, or WASM. 28 significant digits. 7 rounding modes.
1use precision_core::Decimal;2 3// Identical results on x86, ARM, and WASM4let a = Decimal::from_str("0.1").unwrap();5let b = Decimal::from_str("0.2").unwrap();6let result = a.checked_add(b).unwrap();7 8assert_eq!(result.to_string(), "0.3");9// Always. Every platform. Every time.Built for protocols like
Built for precision. Designed for DeFi.
Start with the open-source library. Scale with the commercial dashboard.
Open-Source Libraries
MIT Licensedprecision-core, financial-calc, and risk-metrics. Battle-tested arithmetic with 28 significant digits and 7 rounding modes.
- 128-bit decimal precision
- Cross-platform determinism
- no_std compatible
WASM Bindings
npm@dijkstra-keystone/keystone-wasm. Same precision guarantees in the browser. 65KB optimized bundle.
- Browser & Node.js
- TypeScript definitions
- Async initialization
Risk Dashboard
CommercialMulti-protocol DeFi monitoring. Track positions across Aave, Compound, and Uniswap with real-time alerts.
- Health factor tracking
- Liquidation warnings
- Webhook alerts
Shipped, tested, documented
Real infrastructure for financial computation. Published on crates.io, determinism-verified across platforms, ready for production.
Core Arithmetic
- 28 significant digits
- 7 rounding modes
- Banker's rounding (IEEE 754)
- Overflow-safe operations
Financial Functions
- Black-Scholes pricing
- Options Greeks (δ, γ, θ, ν, ρ)
- Implied volatility solver
- Compound interest / NPV
DeFi Integration
- RedStone oracle integration
- Health factor calculations
- Liquidation math
- Options pricing (Black-Scholes)
Verification & Testing
- SP1 zkVM proving
- Kani formal verification
- Motsu contract testing
- no_std + WASM targets
Deployed to mainnet
Production Stylus contracts using Keystone precision arithmetic. Deployed to Arbitrum One, verified and callable. Part of a 5-contract example suite covering lending, AMM, vaults, options pricing, and oracle integration.
stylus-lending
12.2 KBHealth factor, liquidation price, max borrow
0x4dff9348...ebee1585stylus-amm
16.9 KBSwap output, price impact, liquidity math
0x9615cc2f...32da93cdstylus-vault
14.4 KBERC4626 shares, compound yield, APY
0xdaf8f1a5...622a41faGas Benchmarks: Stylus vs Solidity
| Operation | Stylus | Solidity | Savings |
|---|---|---|---|
| APY calculation (365 loops) | 75,316 | 148,881 | 49% |
| Compound yield (30 loops) | 59,513 | 33,205 | — |
| Share price | 58,742 | 22,606 | — |
Stylus excels at computation-heavy operations (100+ iterations).
Same input. Same output.
Every platform.
Standard floating-point arithmetic:
0.1 + 0.2 = 0.30000000000000004Keystone produces byte-identical results whether you run on x86 servers, ARM mobile, or WASM in browsers. No reconciliation failures. No cross-platform bugs. No audit surprises.
All platforms produce identical output.
Transparent pricing
Start free with the open-source libraries. Upgrade when you need monitoring.
Libraries
Open-source, forever. MIT licensed.
- precision-core, financial-calc, risk-metrics
- WASM bindings
- Community support
Dashboard
For developers and small teams.
- Multi-protocol monitoring
- Real-time health tracking
- Email & webhook alerts
Protocol
For DeFi protocols. Volume-based pricing.
- Dedicated infrastructure
- Custom integrations
- SLA & audit support
Start with the library.
Scale with the dashboard.
Deterministic computation for DeFi protocols.