DeFiMath (@defi_math) header
DeFiMath (@defi_math) profile picture

The math layer for on-chain finance. Black-Scholes in 2,582 gas, 40+ gas-optimized Solidity primitives across derivatives, rates & stats. MIT.

Joined April 2025
Photo by DeFiMath (@defi_math)Photo by DeFiMath (@defi_math)Photo by DeFiMath (@defi_math)Photo by DeFiMath (@defi_math)Photo by DeFiMath (@defi_math)Photo by DeFiMath (@defi_math)
On-chain options on futures just got cheap. DeFiMath v4.0.0 ships Black-76: European call/put on a future, full Greeks, and an IV solver — a call in 2,552 gas, 5e-12 precision, pure Solidity. defimath.com/docs/black-76/
1
1
7
46,896
Exponential function in Solidity, 289 gas. Two-stage range reduction shrinks the input to an interval of width 0.0108. On that sliver a Padé[3/3] is accurate to 1.7e-19 - so the approximation isn't what limits precision. Fixed-point truncation is. defimath.com/blog/solidity-e…
1
2
63
DeFiMath v4.1.0 is out. New: stdNormPDF — the standard normal density φ(x), in Solidity. ⛽ 320 gas 🎯 3.0e-16 max abs error 2.4× cheaper than the next on-chain impl, and ~half the cost of Φ(x) Drop-in from v4.0.0. npm i defimath-lib defimath.com/docs/math/stdno…
1
1
8
55,468
Goodbye, Poseidon! An epic 8-year, 8-figure rabbit hole in post-quantum cryptography reaches its dream conclusion. The Ethereum Foundation is abandoning Poseidon for L1, pivoting to SHA or BLAKE. This milestone unlocks ultimate security for lean Ethereum and foreshadows a golden era of hash-based cryptography. Since 2018, the Ethereum Foundation has invested in magic cryptographic bricks, so-called "SNARK-friendly hashes". In 2019, Poseidon was born. It held strong and became the dominant SNARK-friendly hash, securing billions via zkrollups and zkVMs. In a stunning reversal, breakthrough SNARK designs show that SNARK-friendly hashes aren't necessary after all. Off-the-shelf traditional hash functions like SHA2 and BLAKE2s can now match Poseidon in a SNARK. In hindsight the key was not SNARK-friendly hashes, but hash-friendly SNARKs. The secret is doing maths over the smallest prime number: 2. So-called "binary fields" natively speak the language of bits, aligning with the boolean operations inside traditional hashes. This is a stark departure from "prime fields", where awkward large-prime arithmetic makes bit manipulation painfully expensive. We're talking sci-fi cryptography. 1M traditional hash calls proven per second, on a laptop. Just 100x overhead vs native CPU boolean compute. Nobody predicted such performance, not even the handful of binary-field visionaries. Hat tip to the research geniuses: Jim and Ben with Binius in 2023; Ron, Benedikt and William with Flock in June. With SHA2, the lean aesthetic of minimal assumptions reaches its climax. The EF's principled stance on pure hash-based cryptography has aged like fine wine. We now enjoy foundations the world can trust for decades and centuries, foundations worthy of the dream of an internet of value. Speed of deployment is a secondary win. There's no longer a need to wait years for Poseidon cryptanalysis to bake. Emile and Thomas from the EF post-quantum team are moving at breakneck speed with binary fields. The strawmap now points to a production-grade leanVM in 2027, with CL, DL, EL deployments in 2028. As AI becomes exceptional at cryptanalysis, the contrarian bet to avoid riskier structures like lattices and isogenies is visibly paying off. The past weeks have been brutal. Lattice-based "HAWK" and isogeny-based "SQIsign", both signature schemes in NIST's Round 3, have suffered blows. Sources I trust say more blood is coming. On AI, the open autoresearch trend kicked off by ECDSA[.]fail is spreading fast, with amazing outcomes from zk[.]golf and SNARK[.]fast. Days ago SNARK[.]fast crossed 1.8M BLAKE3/sec proven on an M3 Max. Stay tuned for fresh autoresearch challenges dropping tomorrow. Also tomorrow: Ethproofs call #10, dedicated to binary fields. Possibly the most noteworthy Ethproofs call yet. Experts leading the charge will present the future of hash-based SNARKs at 2pm UTC. What an incredible time to be alive. To witness history, DM me for a calendar invite :) Today I can confidently claim that hash-based cryptography has won out for blockchain post-quantum signatures. SNARK succinctness compresses arbitrarily many signatures into one small proof per block. SNARK flexibility yields k-of-n threshold signatures, complex multisigs, and more. Ultimate security. Uncompromising performance. Full programmability. Believe in something. Believe in hashes.
162
357
148
2,049
485,187
DeFiMath retweeted
Hi everyone, I'm looking for a job, and after a few months of applying to open listings without success, I'm writing in the hope that this network can help.
4
3
1
12
2,090
DeFiMath v3.7.0 is out. One change drives the whole release: exp was rebuilt. Two-stage range reduction into a [3,3] Padé approximant. 327 → 289 gas, with a tighter error bound. Thread below 👇👇👇
1
1
5
15,881
5/6 Gas is now pinned to exact values in CI. A test fails on regression and on improvement, so every change shows up in the PR diff. 640 Hardhat tests. Foundry layer: 92 properties × 32,000 runs = 2.94M executions per run.
1
1
14
DeFiMath retweeted
Ethereum is for shipping. Here are some of the things the Ethereum ecosystem launched, upgraded, and announced over the past month. 0/ @RobinhoodApp launched Robinhood Chain (@RobinhoodCrypto) on mainnet, an Ethereum Layer 2 built on the @arbitrum stack, enabling 24/7 trading of tokenized stocks and ETFs for users in over 120 countries through Robinhood Wallet. The network surpassed $1B in DEX volume in just over a week. 1/ @aztecnetwork achieved Stage 2 rollup decentralization under @l2beat's framework, removing governance control over its core protocol and taking another step toward trust-minimized infrastructure. 2/ @VitalikButerin shared updates to Ethereum's evolving technical roadmap, outlining the next phase of Lean Ethereum and the protocol's long-term direction. 3/ @ethlabs_org launched as a non-profit R&D lab for Ethereum and ETH. Their mission is to make Ethereum the settlement layer of the global economy. 4/ @ethereuminsti launched as an independent non-profit dedicated to accelerating the institutional adoption of Ethereum, its L2s, applications and overall ecosystem. 5/ @aave introduced Stable Vaults, fixed-rate stablecoin yield vaults designed for seamless integration into consumer applications. 6/ @zama launched the First DeFi Yield Venue for Confidential USDC (cUSDC) in partnership with @Morpho and @SteakhouseFi, bringing private stablecoin lending to Ethereum. 7/ @swissknifexyz launched a new Privacy Protocol Tracker, making it easier to compare fees, wait times, supported chains, and other metrics across Ethereum privacy protocols. 8/ Global tickets for @EFDevcon 8 went live, alongside speaker applications for this year’s conference in Mumbai, India. 9/ @Optimism and @toss__official signed an agreement to explore bringing the Korean Won onchain, expanding blockchain-based financial infrastructure for one of South Korea's largest fintech platforms. 10/ @OctantApp completed Epoch 12, its first full quadratic funding round using a zero-knowledge vote coprocessor and new voting application, distributing 88.1 WETH to Ethereum public goods projects. 11/ @0xprivacypools launched the trusted setup ceremony for Privacy Pools V2 ahead of its next protocol deployment. 12/ Gwei Name Service launched an ownerless, immutable Ethereum naming system built without administrative ownership. 13/ @ammalgam launched on Ethereum mainnet, introducing oracle-free lending without impermanent loss. 14/ @lodestar_eth added support for Fast Confirmations, allowing Ethereum node operators to confirm transactions in a single slot using validator attestations. 15/ @PrivacyBoost introduced preconfirmations for private transfers, allowing transfers to be treated as usable in around one second before final settlement. 16/ The @ethereumfndn published Ethereum Basics for Governments and Institutions, a new primer introducing Ethereum as a credibly neutral digital public utility for policymakers and enterprise leaders. 17/ @OndoFinance launched @OndoPerps, enabling tokenized stocks to be used as collateral for perpetual futures across equities, commodities, and indices. 18/ @base introduced Base Privacy, giving enterprises infrastructure to trade, pay, and settle onchain with built-in confidentiality and compliance features. 19/ @BGDA_UK launched BAGEY, a natively tokenized UK regulated fund on Ethereum where the blockchain serves as the legal register of record. 20/ @sparkfinance launched the Stablecoin FX Layer on @Uniswap v4, introducing shared liquidity infrastructure that lets stablecoins access a common liquidity layer. 21/ @Trueo_ launched user-created prediction markets, allowing anyone to create a market by asking a question and letting participants trade on the outcome through a fully onchain prediction market. 22/ @kpk_io integrated @OpenCover Covered Vaults, allowing depositors to add opt-in onchain insurance to curated vaults, with coverage underwritten by @NexusMutual. 23/ @PropellerSwap launched Turbine on Ethereum mainnet, enabling large trades to settle with lower slippage by sourcing liquidity across onchain, offchain, and peer-to-peer markets. 24/ Hosted by @web3privacy, the Neocypherpunk Summit brought together around 1,000 builders and researchers in Berlin to advance privacy, open-source infrastructure, and human rights. 25/ @eth_systems launched as a company building modular privacy infrastructure for institutional Ethereum.
374
541
95
2,689
318,115
Something is brewing 👀 SQRT in Solidity: 245 gas → 197 gas. ~20% cheaper, same precision guarantees, full uint256 domain, no reverts. Shipping soon in DeFiMath. Follow me for updates.
1
1
4
106
DeFiMath v3.6.0 is out 🚀 ✅ sqrt & cbrt now accept the full uint256 domain — no more upper-bound reverts ⛽ sqrt: 245→197 gas (−20%), cbrt: 368→340, sqrtTime: 184→163 🐛 pow overflow bugfix — adversarial exponents now revert instead of returning garbage Savings cascade into Options, Rates & Statistics. npm install defimath-lib defimath.com/news/2026-07-19…
1
1
8
5,857
Solidity just got better! Read the 0.8.36 release notes below 👇👇👇
Happy birthday Solidity! 🎂 And we're marking the occasion the best way we know how: Solidity v0.8.36 is out! This release brings Amsterdam EVM support, important bugfixes for the inheritance linearization and Yul optimizer, and continued progress on stack-too-deep mitigation. Full changelog 👇
1
5
134
Building options, perps, or structured products on EVM? The math shouldn’t be your gas bottleneck. DeFiMath: Black-Scholes in 2,729 gas, plus the cheapest exp/ln/sqrt primitives in Solidity. Open source. defimath.com
1
5
8,640
Top 5 launches today on StartupBase 1. DefiMath (@defi_math) 2. Insturix (@insturix) 3. Opentrends 4. DMpro (@dmproai) 5. Feedback Kit startupbase.io/launches/dail…
1
4
84
Love it
🚨Solidity devs: single command in your AI prompt now gets you to ~80% stateful fuzz-testing coverage. Introducing Fizz, fully open source. From repo to invariants, tests, runs and coverage report. Help more people - like & retweet. Stay safe🫡 pashov.com/fizz
3
137