SmartMargin is an automated DeFi risk management platform powered by real-time monitoring using envio and smart accounts utilizing EIP-7715 permission schemas for delegated transaction execution .
Automated DeFi Risk Management Platform
SmartMargin is an automated DeFi risk management platform designed to protect users from liquidations through real-time position monitoring and delegated transaction execution. It continuously tracks user positions across major lending protocols and automatically adds collateral when liquidation risk increases, ensuring capital efficiency without constant manual intervention.
The system is powered by real-time blockchain indexing via Envio and leverages smart accounts with EIP-7715 permission schemas to enable secure, pre-authorized execution of risk-mitigating actions.
DeFi users face frequent liquidations due to:
Volatile market conditions
Manual collateral management
Delayed reactions to health factor changes
Poor UX around automation and permissions
Existing solutions either rely on off-chain bots, custodial control, or require repeated user approvals, introducing security and usability trade-offs.
SmartMargin introduces a non-custodial, permissioned automation layer for DeFi risk management.
By combining real-time on-chain monitoring with smart account–based delegated execution, SmartMargin enables:
Instant response to liquidation risk
No per-transaction approvals
Full user control via scoped permissions
Seamless automation across multiple protocols
Real-time health factor monitoring across supported lending protocols
Automated collateral top-ups when positions approach liquidation thresholds
Multi-protocol support including Aave V3/V2, Compound V3, and MakerDAO
Delegated execution using EIP-7715 permission schemas
Smart account integration compliant with EIP-715
Near-instant liquidation protection through event-driven automation
Cross-chain ready architecture with Base Sepolia deployment
SmartMargin consists of three core layers:
Monitoring Layer
Uses Envio Indexer to track protocol events such as supplies, repayments, and liquidation calls
Continuously computes health factors and risk thresholds in near real time
Execution Layer
Smart accounts authorize a delegate via EIP-7715 permission schemas
Permissions restrict callable contracts, function selectors, time windows, and value limits
Automated execution is triggered only when predefined risk conditions are met
Interface Layer
Clean, intuitive dashboard for monitoring positions and configuring automation rules
Transparent logs of automated actions and historical risk events
Demo Flow
User connects wallet and smart account
Network and protocol configuration is validated
User grants scoped EIP-7715 permission
SmartMargin monitors health factor in real time
When risk threshold is crossed, collateral is added automatically
Transaction is executed via delegated smart account logic
Positions monitored: 2,800+
Total protected value: $12M+
Liquidations prevented: 1,200+
Average response time: ~2 seconds
Building stage