Skip to content
Edwin

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

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

  1. Integration: Developers integrate Edwin as a standalone library or plugin for AI frameworks (Eliza, LangChain).
  2. Configuration: Users set up wallet credentials and enable desired DeFi actions.
  3. Command Execution: Standardized action commands abstract away protocol complexity.
  4. Multi-Chain Operations: Consistent interface works across different blockchains.

Data Flow Process

  1. Command Initiation: AI agent/user initiates a DeFi operation.
  2. Protocol Abstraction: Command maps to appropriate protocol interface.
  3. Security Processing: Transaction validation and security checks.
  4. Protocol Execution: Operation executes through protocol SDK to blockchain.
  5. 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

  1. Protocol Abstraction Layer: Standardizes interfaces for different DeFi protocols (lending, DEX, staking).
  2. AI Framework Adapters: Enables integration with AI frameworks like Eliza and LangChain.
  3. Security Layer: Handles transaction validation and protocol whitelisting.
  4. 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

Edwin brings DeFAI capabilities to zkSync Era by enabling AI agents to interact with the chain's DeFi protocols through ...Read More
zkSync ∎

zkSync ∎

Crypto Agent Evaluation Framework

Edwin provides essential DeFi infrastructure for Gravity's Crypto Agent Evaluation Framework by offering a standardized ...Read More
Gravity by Galxe

Gravity by Galxe

Best AI Agents

Edwin brings DeFAI capabilities to Flow by providing specialized adapters for Flow's resource-oriented programming model...Read More
Flow

Flow

Best DeFAI Project on Zircuit

Edwin integrates with Zircuit to enable privacy-preserving DeFAI operations, leveraging Zircuit's confidential execution...Read More
zircuit

zircuit

Build an onchain AI agent or agent framework plugin

Edwin provides a specialized agent framework plugin that enables Internet Computer canisters to interact with DeFi proto...Read More
Internet Computer

Internet Computer

AI Agents

Edwin enhances Story Protocol's IP ecosystem by enabling AI agents to interact with financial aspects of intellectual pr...Read More
Story

Story

Best AI application or agent on EigenLayer

Edwin enhances EigenLayer by bringing AI intelligence to restaking operations, adding a DeFi layer to EigenLayer's core ...Read More
EigenLayer

EigenLayer

HyperLiquid x Okto DeFi Innovator

Edwin bridges AI agents with HyperLiquid's perpetual markets and Okto's institutional DeFi platform. By providing a unif...Read More
okto

okto

INFRASTRUCTURE + SCALABILITY

Edwin serves as critical infrastructure that bridges AI frameworks and DeFi protocols, enabling secure and standardized ...Read More

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.

Discussion

Builders also viewed

See more projects on Devfolio