Edwin
Edwin bridges AI agents and DeFi protocols, providing a unified, secure interface while abstracting away blockchain complexity and protocol-specific implementations.
Created on 28th February 2025
•
Edwin
Edwin bridges AI agents and DeFi protocols, providing a unified, secure interface while abstracting away blockchain complexity and protocol-specific implementations.
The problem Edwin solves
The world of finance is experiencing two parallel revolutions. AI frameworks like LangChain, Eliza, and G.A.M.E have transformed software development, creating autonomous agents that reason and execute complex tasks. Simultaneously, DeFi protocols like Aave, Uniswap, and Morpho have built an open, programmable financial system managing billions in assets. Yet a critical gap exists - AI frameworks excel at decision-making but lack native DeFi capabilities, while DeFi protocols remain isolated from AI systems. Each protocol speaks its own language, uses unique interfaces, and requires specialized knowledge to integrate, creating a barrier between these two revolutionary technologies.
Edwin is a TypeScript library that serves as the bridge between AI agents and DeFi protocols. It provides a unified, secure interface for AI agents to interact with various DeFi protocols while abstracting away the complexity of blockchain operations and protocol-specific implementations.
User Interaction and Data Flow
User Interaction Flow
- Integration: Developers integrate Edwin as a standalone library or plugin for AI frameworks (Eliza, LangChain).
- Configuration: Users set up wallet credentials and enable desired DeFi actions.
- Command Execution: Standardized action commands abstract away protocol complexity.
- Multi-Chain Operations: Consistent interface works across different blockchains.
Data Flow Process
- Command Initiation: AI agent/user initiates a DeFi operation.
- Protocol Abstraction: Command maps to appropriate protocol interface.
- Security Processing: Transaction validation and security checks.
- Protocol Execution: Operation executes through protocol SDK to blockchain.
- Response Handling: Results return in standardized format.
Example
await edwin.actions.supply.execute({
protocol: 'aave',
chain: 'base',
amount: '100',
asset: 'usdc'
});
Behind the scenes, Edwin:
- Validates parameters
- Translates to protocol-specific interactions
- Handles blockchain operations
- Executes transaction
- Returns results
This pattern works across different protocols and actions, providing consistency despite underlying DeFi complexity. The architecture supports three layers: AI Layer (agent and plugin), DeFAI Layer (adapter, abstraction, security), and Protocol Layer (SDKs and interfaces).
The project architecture and development process
Core Components
- Protocol Abstraction Layer: Standardizes interfaces for different DeFi protocols (lending, DEX, staking).
- AI Framework Adapters: Enables integration with AI frameworks like Eliza and LangChain.
- Security Layer: Handles transaction validation and protocol whitelisting.
- Action System: Provides standardized, composable DeFi operations across protocols.
Implementation Details
Technology Stack
- Language: TypeScript for type safety
- Protocol SDKs: Integrates with existing DeFi protocol SDKs
- Blockchain Support: Multi-chain design supporting EVM and Solana
Architecture Pattern
Edwin uses a layered architecture:
AI Layer → Framework Adapter → Protocol Abstraction → Security Layer → Protocol SDKs → Blockchain
Security Implementation
- Transaction validation before execution
- Protocol whitelist verification
- Operation boundaries to prevent risky actions
- Multi-level checks throughout the execution pipeline
Protocol Integration
Protocols are integrated through standardized interfaces based on categories:
- Lending protocols implement lending interfaces
- DEX protocols implement trading interfaces
- Each adapter translates standard commands to protocol-specific operations
Extension Mechanism
Edwin is designed for extensibility through:
- Modular protocol adapters
- Pluggable framework integrations
- Standardized action interfaces
Development Process
- Open-source model allowing community contributions
- Protocol integrations developed as modular adapters
- Framework adapters created for major AI frameworks
- Security layers implemented with multiple validation levels
- Testing against real protocols in test environments
- Continuous integration pipeline for quality assurance
- Documentation generated for API interfaces and examples
Product Integrations
AI Frameworks
- Eliza: Integration enabling AI agents to execute DeFi operations
- LangChain: Framework adapter for AI model interactions with DeFi
Blockchain Networks
- EVM Chains: Support for all EVM-compatible chains
- Solana: Integration for high-throughput blockchain operations
DeFi Protocols
- Meteora: Solana-based LP integration
- Jupiter: DEX aggregator for optimized token swaps
- Aave: Lending protocol integration for supply/borrow operations
- Uniswap: DEX integration for token swaps and liquidity provision
Data Services
- Cookie: On-chain data provider for market information
- eOracle: Price feed integration for accurate asset valuation
Key differentiators and uniqueness of the project
Universal DeFi Abstraction
Edwin provides a truly protocol-agnostic interface, allowing AI agents to interact with any supported DeFi protocol using the same command structure regardless of the underlying implementation differences.
AI-Native Architecture
Unlike most DeFi tools built for human users, Edwin is specifically designed for AI agent interaction, with standardized commands optimized for machine reasoning and execution.
Multi-Chain by Design
Edwin supports multiple blockchains (EVM and Solana) through a unified interface, eliminating the need for chain-specific implementations when building DeFAI applications.
Security-First Approach
The multi-layered security model with transaction validation, protocol whitelisting, and operation boundaries provides enterprise-grade protection for autonomous financial operations.
Composable Action System
Edwin's action system enables complex financial strategies through simple, composable operations that can be chained together to create sophisticated DeFAI workflows.
Framework Agnosticism
While many AI tools are tied to specific frameworks, Edwin works across multiple AI frameworks (Eliza, LangChain) with a consistent interface, making it framework-agnostic.
Comparison with Alternatives
Unlike existing DeFi integration tools that focus on human interactions or single-protocol access, Edwin creates a comprehensive DeFAI layer that: Provides broader protocol coverage than single-protocol solutions, offers deeper AI integration than UI-focused DeFi tools, includes purpose-built security for autonomous operations missing in general-purpose DeFi SDKs, enables true composability across protocols not possible with siloed solutions.
Tracks Applied (9)
Build an AI Agent on ZKsync Era
zkSync ∎
Crypto Agent Evaluation Framework
Gravity by Galxe
Best AI Agents
Flow
Best DeFAI Project on Zircuit
zircuit
Build an onchain AI agent or agent framework plugin
Internet Computer
AI Agents
Story
Best AI application or agent on EigenLayer
EigenLayer
HyperLiquid x Okto DeFi Innovator
okto
INFRASTRUCTURE + SCALABILITY
Cheer Project
Cheering for a project means supporting a project you like with as little as 0.0025 ETH. Right now, you can Cheer using ETH on Arbitrum, Optimism and Base.
