By using Convex Optimization combined with EZKL, we can now prove trading strategies are optimal and enable new financial products on-chain that don't compromise on security.
Here's why this matters for the future of finance:
Traditional DeFi has a limitation:
The Ethereum Virtual Machine (EVM) can't handle complex calculations.
This means AMMs like Uniswap have been restricted to using simple formulas that don't always capture market complexity.
But EZKL changes this:
EZKL lets us generate zero-knowledge cryptographic proofs that show:
• A solution to an optimization problem is optimal
• A specific optimization algorithm was followed
• Each optimization step was calculated correctly
This unlocks entirely new possibilities for DeFi:
Two EZKL team members demonstrated this at ETHGlobal Singapore 2024.
They created COCSwap (Convex Optimization Calculation Swap).
It introduces new trading strategies that improve capital efficiency through zero-knowledge proofs.
Let's break down how it works:
First, understand convex optimization:
Picture a curve on a graph.
If you connect any two points with a straight line, and that line never dips below the curve - that's a convex function.
This property is crucial for trading:
A strictly convex function has only one minimum point.
This means when solving optimization problems, we're guaranteed to find the best solution.
No local minima to get stuck in.
This is particularly valuable for building AMMs:
Traditional AMMs are constrained by what's possible on-chain.
But EZKL allows us to:
• Run optimizations off-chain
• Prove the optimization solution is optimal
• Verify the result/update on-chain
This enables sophisticated trading strategies previously difficult in DeFi:
One example is Markowitz trading:
It optimizes the risk-return tradeoff for each trade from the AMM's perspective.
And every calculation can be cryptographically proven:
The current implementation shows both promise and challenges:
Gas costs are higher (~600k vs 184,523 for Uniswap).
But there are solutions being explored:
• Batching mechanisms
• Optimization of proof generation
• Testing for optimal conditions without loops
The real innovation is broader than AMMs:
EZKL can prove any convex optimization solution is correct.
This applies to:
• Portfolio optimization
• Control systems
• Matrix inversions
• General optimization problems
Some optimization problems don't need every step proven.
We can verify optimality through explicit conditions.
This is particularly valuable for closed-source optimization solvers.
The implications extend far beyond trading:
EZKL can enable:
• Proof of training for machine learning
• Verification of optimization processes
• Complex financial calculations
• Advanced market making strategies
All with mathematical guarantees.
This is a fundamental shift in DeFi:
Moving from simple formulas to proven optimal solutions.