Skip to content

Prepare solmath 0.2.0 release - #1

Merged
DJBarker87 merged 5 commits into
mainfrom
release/v0.2.0
Jul 14, 2026
Merged

Prepare solmath 0.2.0 release#1
DJBarker87 merged 5 commits into
mainfrom
release/v0.2.0

Conversation

@DJBarker87

Copy link
Copy Markdown
Owner

Summary

  • prepare the 0.2.0 release with a minimal default surface and explicit model feature flags
  • add fully on-chain Kim Boundary Integration American pricing, exponential NIG pricing, continuous arithmetic-Asian/TWAP pricing, rainbow options, and checked public APIs
  • remove the American closed-form and ROM paths so KBI has no live builder, uploaded operator, or off-chain pricing dependency
  • harden fixed-point arithmetic, overflow behavior, approximation kernels, and feature isolation for Solana/SBF consumers
  • expand validation, benchmark reproducibility, integration guidance, security documentation, and formal ULP proofs

American KBI results

Accuracy is absolute dollars at a $100 strike against QuantLib 1.41 QdFp accurateScheme.

Corpus Leg Median P95 P99 Maximum
Production, 100K requested Call $0.0000156 $0.0006946 $0.0013619 $0.0027441
Production, 100K requested Put $0.0000160 $0.0007078 $0.0014208 $0.0032638
Adversarial, 10K requested Call $0.0000234 $0.0011672 $0.0017998 $0.0029456
Adversarial, 10K requested Put $0.0000279 $0.0013621 $0.0019915 $0.0027250

Deployed Agave measurements over 2,000 accepted quotes per leg:

Leg Average math CU P99 math CU Maximum full instruction CU
Call 381,096 388,749 390,628
Put 371,876 388,879 390,786

The isolated KBI SBF artifact is 293,360 bytes, a 108,512-byte linked delta over the identical 184,848-byte Anchor baseline.

NIG results

  • production maximum error: $0.0005653 per $100 notional
  • adversarial maximum error: $0.0013966 per $100 notional
  • deployed maximum: 382,441 full-instruction CU
  • isolated SBF artifact: 311,464 bytes, a 126,616-byte linked delta

Arithmetic assurance

  • 13/13 Kani harnesses pass with 545/545 bit-precise checks
  • U256 carry assembly, long-division limb bounds, and Knuth-D3 correction bounds are verified compositionally
  • both fp_sqrt paths now return the exact integer floor through proved Newton/bisection transitions and an exact fallback
  • approximation certificates, critical-invariant tests, and independent reference corpora are included

Release validation

  • cargo fmt --check
  • strict Clippy correctness, suspicious, performance, and panic/unwrap gates
  • no-default, default, and all-feature test matrices
  • Rust 1.79 MSRV and thumbv7em-none-eabi no-std checks
  • rustdoc warnings denied and examples checked
  • exact packaged-crate tests: 344 tests and 23 doctests
  • cargo publish --dry-run --allow-dirty
  • final source archive: 59 files, 256,381 bytes, 9,859 bytes below the 260 KiB release cap

Review notes

  • KBI and NIG are quote-only paths near the 400K CU ceiling; downstream programs must budget account, CPI, and token work separately.
  • The Kani U256 result is compositional and does not claim monolithic verification of the complete Knuth multiply-subtract routine, compiler lowering, or SBF execution.
  • Repository-only reference generators and large integration corpora are excluded from the published crate.

@DJBarker87
DJBarker87 merged commit 79cd09f into main Jul 14, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant