Options on order execution rights + volatility-aware TWAP execution for 1inch limit orders
Vector Plus introduces three novel trading strategies that fundamentally change how DeFi orders are executed. Instead of just placing a limit order and hoping for the best, traders can now buy options on the right to execute someone else's order, adjust position sizes based on real-time market volatility, and spread large orders across time with MEV protection.
The options system is completely new - you're not buying options on ETH or USDC, but on the execution rights of existing limit orders. If someone has a sell order for 10 ETH at $2000, you can buy a call option that gives you the right to execute that order if the price hits $2100. It's like having a lottery ticket that pays off when market conditions align.
The volatility calculator watches market conditions and automatically adjusts how much of an order to execute. During calm markets, it might execute larger chunks. When things get crazy (like during major news events), it scales way back or pauses entirely. Think of it as having a cautious trading partner who taps you on the shoulder when things look dicey.
The TWAP executor breaks large orders into smaller pieces over time, but adds randomization so MEV bots can't predict when the next chunk will hit. Instead of executing exactly 1 ETH every 10 minutes (which bots would front-run), it might execute 0.85 ETH at minute 8, then 1.15 ETH at minute 12. Unpredictable to bots, but still gets your order filled efficiently.
This project lives entirely within the 1inch ecosystem, implementing their IAmountGetter interface so the strategies work seamlessly with existing limit orders. No new tokens, no separate DEX - just smarter execution logic.
The core is built in Solidity with three main contracts: one for volatility calculations, one for options trading, and one that combines TWAP with volatility awareness. Each contract is designed to be gas-efficient (50k-120k gas) and can work independently or together.
The volatility system uses a risk scoring algorithm that compares current market conditions to baseline volatility. When volatility spikes above certain thresholds, it automatically reduces position sizes using mathematical formulas rather than arbitrary limits. Emergency pauses kick in during extreme events (like flash crashes).
For MEV protection, the TWAP system uses deterministic randomness - it combines the order hash with timestamps to generate unpredictable (but verifiable) execution patterns. This means even the order creator can verify the randomness was applied correctly, but MEV bots can't predict future execution times.
The options pricing uses simplified Black-Scholes calculations adapted for execution rights rather than underlying assets. Since these aren't traditional options, we had to rethink how strike prices and expiration work when the "underlying" is an execution opportunity rather than an asset price.
Everything is deployed with Foundry, tested against real mainnet data via fork testing, and includes a Rust CLI for easy configuration. The modular design means developers can use just the volatility calculator, just the options system, or combine everything through the unified interface contract.