Optimized
DeFi & Math
Primitives

Banner

Introducing DeFiMath

The math layer for on-chain finance

Pricing options on-chain used to mean off-chain oracles or hand-rolled approximations. DeFiMath gives you 40+ Solidity primitives - Black-Scholes, Greeks, implied vol, rates, statistics - at gas costs lower than a single storage read, with precision under 1e-12.

2,876 gas - full Black-Scholes option pricing (call or put)

< 1e-12 error - verified against off-chain reference implementations

40+ primitives - Black-Scholes, binaries, Greeks, IV solver, futures, rates, statistics. See the full list

0 dependencies - pure Solidity ^0.8.31, MIT licensed

100% test coverage - every branch, every edge case

DeFiMath features

Custom Development

We can help you with your next Solidity Project

Contact us today to discuss your project and find out how we can help you bring your vision to life.

Development & Optimization

Development & Optimization

Testing & Audits

Testing & Audits

Web3 Integrations

Web3 Integrations

Let's connect and solve problems together

Support

Support

Need help with integrations? We can help you get started.
Community

Community

Join the conversations, we are building a strong Solidity community.
Academy

Academy

Join our newsletter to unlock tutorials and resources.