← Back to home

FEAWS

Production grade DeFi protocol using TWAP + yield-aware orders via 1inch for treasury optimization

Problem Statement

1inch Limit Order Protocol Extension: Yield-Gated TWAPFEAWS implementsadvanced strategies and hooksfor the 1inch Limit Order Protocol, specificallyyield-gated TWAP swapsthat combine:Time-weighted average price (TWAP)executionYield-aware predicates(only execute when destination asset yield ≥ threshold)Custom order hooksvia 1inch LoP predicatesAdvanced order typesbeyond basic limit orders1. Vision & Value PropositionFEAWS (Flexible Execution Automated Yield Swaps) allows treasuries and advanced traders to ladder into or out of positionsonly when the real-time yield of the destination asset meets a configurable threshold. It unites the capital-efficiency of TWAP/DCA with capital-productivity awareness (staking/lending yield), delivering smarter order execution on Ethereum & L2s.Key benefits:Lower slippage & better prices– tranches smooth market impact.Yield-aware deployment– capital moves only when it earns the desired return.100 % on-chain & trustless– leverages 1inch Limit Order Protocol (LoP) predicates.Reusable building blockfor treasury automation, robo-advisors, and yield strategies.2. Problem StatementTreasury desks often dollar-cost average into yield-bearing assets (e.g. stETH, aUSDC) but:Bulk swaps create slippage.Static DCA ignores whether the yield is attractive.Manual monitoring is error-prone and lacks execution discipline.

Solution

Tech StackSmart ContractsSolidity 0.8.23- Latest stable version with custom errorsHardhat 2.19+- Development environment, testing, deploymentFoundry- Advanced testing with fuzzing and gas optimizationOpenZeppelin 5.0- Security-audited base contracts1inch Limit Order Protocol v4- Core order executionOracle & AutomationChainlink Functions- Off-chain APY data fetching (primary)Gelato Automate- Backup oracle update mechanismChainlink Price Feeds- Token price validationThe Graph- Event indexing for strategy trackingRelayer BotNode.js 20+with TypeScript 5.3ethers.js v6- Ethereum interactionPostgreSQL- Strategy and tranche state managementRedis- Caching and job queuingDocker- Containerized deploymentPM2- Process management and monitoring4 FrontendNext.js 14- React framework with App Routerwagmi v2- React hooks for Ethereumviem- TypeScript Ethereum libraryRainbowKit- Wallet connection UITailwindCSS- Styling frameworkRecharts- Data visualization5 Development ToolsGitHub Actions- CI/CD pipelineTenderly- Smart contract monitoringSlither- Static analysis security scannerGas Reporter- Gas optimization tracking

Hackathon

ETHGlobal Unite

2025

Contributors