A competitive solver marketplace for optimal DeFi execution on Layer 2 networks, starting with X Layer.
The Intent-Based Trading Aggregator revolutionizes DeFi trading by allowing users to express their desired outcomes rather than specifying execution paths. A competitive network of solvers competes to provide the best execution for each trade.
- 🎯 Intent-First UX: Single signature flow with EIP-712 + Permit2
- 🏆 Competitive Execution: Open solver market with transparent bidding
- ⚡ Atomic Settlement: On-chain enforcement of user constraints
- 🌐 L2-First Design: Optimized for X Layer with multi-L2 extensibility
- 📡 Real-time Coordination: WebSocket-based intent broadcasting
- Node.js 18+
- Docker and Docker Compose
- Foundry (for smart contracts)
# Clone the repository
git clone https://github.com/yourorg/intent-based-trading-aggregator.git
cd intent-based-trading-aggregator
# Install dependencies
npm install
# Copy environment variables
cp .env.example .env
# Edit .env with your configuration
# Start development environment
npm run dev# Start all services with Docker
docker-compose up -d
# View logs
docker-compose logs -f
# Stop services
docker-compose down┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Frontend dApp │ │ Backend APIs │ │ Smart Contracts │
│ │ │ │ │ │
│ • Next.js 14 │◄──►│ • Relayer │◄──►│ • Settlement │
│ • Wagmi/Viem │ │ • Coordinator │ │ • Permit2 │
│ • Tailwind CSS │ │ • WebSocket │ │ • Router │
└─────────────────┘ └─────────────────┘ └─────────────────┘
│ │ │
│ ┌─────────────────┐ │
│ │ Solver SDK │ │
└──────────────►│ │◄─────────────┘
│ • TypeScript │
│ • Quote Agg. │
│ • Bid Logic │
└─────────────────┘
intendly/
├── contracts/ # Smart contracts (Foundry)
│ ├── src/ # Solidity contracts
│ ├── test/ # Contract tests
│ └── script/ # Deployment scripts
├── backend/ # Backend services (Node.js/Express)
│ ├── src/
│ │ ├── relayer/ # Intent ingestion
│ │ ├── coordinator/ # Bid coordination
│ │ └── shared/ # Common utilities
│ └── migrations/ # Database migrations
├── web/ # Frontend dApp (Next.js)
│ ├── app/ # App Router pages
│ ├── components/ # React components
│ ├── hooks/ # Custom hooks
│ └── lib/ # Utilities & configs
├── solver-sdk/ # TypeScript SDK for solvers
│ ├── src/ # SDK source code
│ ├── examples/ # Example solvers
│ └── docs/ # SDK documentation
├── docs/ # Project documentation
└── scripts/ # Utility scripts
# Start all services
npm run dev
# Start individual components
npm run dev:contracts # Foundry watch mode
npm run dev:backend # Backend with hot reload
npm run dev:web # Next.js development server
npm run dev:solver # Example solver# Run all tests
npm test
# Test individual components
npm run test -w contracts # Smart contract tests
npm run test -w backend # Backend tests
npm run test -w web # Frontend tests
npm run test -w solver-sdk # SDK tests# Lint all code
npm run lint
# Format code
npm run format
# Type checking
npm run type-check- 📖 Full Documentation - Complete project documentation
- 🏛️ Architecture Guide - System design and architecture
- 🔧 API Reference - REST API and WebSocket documentation
- 🤖 Solver Guide - Building and running solvers
- 🚢 Deployment Guide - Deployment and infrastructure
- 🎬 Demo Script - Demo scenarios and testing
Foundry-based smart contracts for intent settlement with EIP-712 signatures and Permit2 integration.
→ View Contracts Documentation
Node.js/Express services handling intent ingestion, bid coordination, and real-time communication.
Next.js 14 application providing the user interface for intent-based trading.
TypeScript SDK for building competitive solvers with quote aggregation and bidding logic.
- X Layer Mainnet (Chain ID: 196)
- X Layer Testnet (Chain ID: 195)
- More L2s coming soon
- Development: Local development with Docker Compose
- Staging: Testing environment with full feature set
- Production: Production deployment with monitoring and security
The project includes comprehensive deployment infrastructure:
- 🐳 Containerization: Multi-stage Docker builds with production optimization
- ☸️ Kubernetes: Production-ready manifests with auto-scaling and health checks
- 🏗️ Infrastructure as Code: Terraform configurations for AWS deployment
- 🔄 CI/CD Pipeline: GitHub Actions with automated testing and deployment
- 📊 Monitoring Stack: Prometheus, Grafana, Loki, and AlertManager
- 🔒 Security: SSL/TLS setup, secrets management, and security scanning
- 📚 Documentation: Comprehensive guides for users, developers, and operators
# Validate deployment readiness
./deployment/scripts/validate-deployment.sh production
# Deploy infrastructure
cd deployment/terraform/aws && terraform apply
# Deploy application
./deployment/scripts/deploy.sh production
# Validate deployment
./deployment/scripts/health-check.sh productionWe welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Add tests and ensure they pass
- Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- TypeScript for all JavaScript/Node.js code
- Solidity 0.8.19+ for smart contracts
- ESLint + Prettier for code formatting
- Comprehensive testing for all components
- Intent Broadcast: <500ms
- First Solver Bid: <2s
- Bid Window: 2-3s
- Settlement: <30s
- End-to-End UX: <2 minutes
- Smart Contract Audits: Professional security audits
- Dependency Scanning: Automated vulnerability checks
- Code Analysis: Static analysis with Slither
- Access Controls: Role-based permissions
- Rate Limiting: API protection mechanisms
Report security vulnerabilities to: security@intendly.xyz
This project is licensed under the MIT License - see the LICENSE file for details.
- Website: https://intendly.xyz
- Documentation: https://docs.intendly.xyz
- Discord: https://discord.gg/intendly
- Twitter: https://twitter.com/intendly
Built with ❤️ for the DeFi community
Intent-based trading is the future of DeFi. Join us in building it.