Skip to main contentThe Ember Plugin System is a standardized framework for integrating any DeFi protocol into the Ember ecosystem. The main components of the system are Plugins, Plugin Registry, and Ember’s Onchain Actions backend. You can find the official npm package
here.
What are Plugins?
Plugins are units that integrate a specific DeFi protocol into Ember’s ecosystem, thereby expanding the Ember MCP Server’s capabilities. Plugins handle all smart contract interactions, from constructing transaction calldata to managing protocol-specific logic. The system currently supports four types of plugins: Lending, Liquidity, Swap and Perpetuals. The plugins are then registered in the Plugin registry, so that Onchain Actions can discover and use the newly added plugins. Here is a diagram of how the system works:
Why Build Plugins?
The plugin system provides several key advantages for protocol integrations:
- Provided Entity Mapping: Standardized entity mapping ensures consistent data structures across all protocol integrations. Without standardized mapping, each protocol integration would require custom entity definitions, leading to inconsistent data structures and increased complexity when working across multiple protocols.
- Faster Protocol Integration: Building protocol integrations from scratch is time-consuming and error-prone. The plugin system eliminates boilerplate code and provides patterns for common DeFi operations. The pre-built framework and type safety accelerate the integration of new DeFi protocols.
- Easier User Consumption and Aggregated/Optimized Results: Users typically need to interact with each protocol separately, manually compare rates and liquidity, and piece together optimal strategies. The plugin system aggregates protocol data and enables intelligent routing across integrations. This unified interface allows users to interact with multiple protocols seamlessly, with aggregated data and optimized execution paths.