← Back to home

ClearSign DeFi

ERC-7730 files for 13 DeFi protocols - making smart contract transactions readable 🔍

Problem Statement

ClearSign DeFi is a comprehensive implementation of the ERC-7730 standard that transforms how users interact with DeFi protocols by making smart contract transactions human-readable and secure.The project addresses a critical problem in DeFi: users often sign transactions without understanding what they're approving, leading to security vulnerabilities and poor user experience. Our solution provides ERC-7730 JSON files for 13 major DeFi protocols, enabling wallets to display clear, understandable information instead of raw transaction data.Key Features:13 Major Protocols : Uniswap V2/V3, Aave V3, Compound V3, Curve, Balancer V2, 1inch, SushiSwap, PancakeSwap, Lido, Yearn, Convex, and MakerDAO60+ Smart Contract Functions : Comprehensive coverage of swaps, lending, staking, and liquidity operationsMulti-Chain Support : Ethereum, Polygon, Arbitrum, Optimism, BSC, and FantomDeveloper Tools : Automated validation, testing framework, and documentationSecurity Focus : Clear transaction details help users avoid malicious approvalsImpact: This project directly improves DeFi security and accessibility by making complex transactions understandable to everyday users, potentially preventing millions in losses from unclear transaction signing.

Solution

Core Technologies:ERC-7730 Standard : Official Ethereum standard for structured data displayNode.js & AJV : JSON Schema validation using the official ERC-7730 schemaJSONPath : For precise data extraction from transaction parametersMulti-chain Architecture : Support for 6+ blockchain networks Technical Implementation:Schema Validation Pipeline : Built a robust validation system that fetches the official ERC-7730 schema from ethereum.org and validates all JSON files using AJV with custom configurations to handle schema reference issues.Smart Contract Analysis : Analyzed 13 major DeFi protocols to identify the most commonly used functions and their parameter structures, creating comprehensive field mappings for human-readable display.JSONPath Integration : Implemented sophisticated path expressions (e.g., $.path[0] , $.path[-1] ) to extract token addresses, amounts, and other critical data from complex transaction structures.Format Standardization : Standardized field formats across all protocols:addressName : ENS-compatible address displayamount : Token amounts with proper decimal handlingdate : Timestamp formatting with encoding parametersraw : Direct value display for complex data Notable Technical Achievements:Multi-Protocol Standardization : Created a unified approach for handling different DeFi protocol patterns while maintaining protocol-specific functionality.Automated Validation : Built a comprehensive validation system that checks JSON syntax, schema compliance, and field format correctness across all 13 protocols.Development Workflow:Used pnpm for efficient package managementImplemented automated testing with pnpm run validateCreated modular file structure for easy protocol additionBuilt comprehensive documentation and examplesChallenges Overcome:Resolved complex schema reference issues in the ERC-7730 validationStandardized diverse DeFi protocol patterns into consistent formatsHandled multi-chain deployment addresses and contract variationsCreated human-readable labels for complex DeFi operationsThis project represents a significant step toward making DeFi more accessible and secure for mainstream adoption by providing the infrastructure needed for clear transaction signing across the ecosystem.

Hackathon

ETHGlobal Cannes

2025

Contributors