{"repo":"MerkleBlue/defimath","free":true,"listed":false,"github":"https://github.com/MerkleBlue/defimath","clone":"git clone https://github.com/MerkleBlue/defimath.git","description":"DeFiMath is open-source, high-performance Solidity library for Ethereum smart contract development","language":"JavaScript","stars":17,"topics":["black-scholes","defi","ethereum","math","smart-contract","solidity","derivatives-pricing","option-pricing"],"license":"MIT","category":"blockchain-web3","readme_excerpt":"DeFiMath [![License: MIT][license-badge]][license] [license]: https://opensource.org/licenses/MIT [license-badge]: https://img.shields.io/badge/License-MIT-blue.svg Gas-optimized Solidity library for DeFi math. Black-Scholes option pricing at 2,582 gas , with a broad set of primitives across math, interest rates, statistics, and derivatives. DeFiMath is a pure-Solidity library of DeFi math primitives. 40+ functions across four modules: low-level math, derivatives, interest rates, and statistics. No external runtime dependencies. MIT-licensed. Why DeFiMath - Unlocks new use cases. Gas-efficient enough to make real-time options pricing, on-chain IV solving on every quote, and risk-adjusted vault fees economically viable. Use cases that were previously off-chain workarounds now fit in a single transaction. - Breadth. 40+ primitives spanning math ( exp , ln , sqrt ), derivatives (Black-Scholes & Black-76 + Greeks, binary options, IV solver), interest rates (compound, present value, IRR, YTM), and statistics (volatility, Sharpe, VaR, CVaR, max drawdown). - Pure Solidity. 16KB published, zero runtime dependencies, easy to audit. - Validated precision. Sub-5e-12 relative error on options pricing. Every math primitive carries an explicit, enforced error bound — from 2e-18 ( sqrt ) to 1e-12 ( pow ) — measured as relative error where the result is ≥ 1 and absolute error near a root or for bounded functions like stdNormCDF and erf ; see the per-function tables below. Validated against s","default_branch":null,"files":null,"tree":[],"storefront":"/r/MerkleBlue","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/MerkleBlue/defimath/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}