Smart Contract Architecture
Last updated
Last updated
Our smart contract architecture is engineered to facilitate direct interaction between our AI models and a broad spectrum of pools , in order to enable the system to respond to market changes with minimal latency.
Individual Wrapper Contracts : Each pool from our list is paired with a wrapper contract. Recognizing the diverse architectures of various protocols, these wrapper contracts are essential for normalizing interactions across pools.
Standardized Interface Functions : Despite being individually customized , all wrapper contracts adhere to a standardized format with core functions like 'deposit' and 'withdraw'. This standardization is critical for the master smart contract to uniformly interact with multiple pools, irrespective of their individual contract structures.
Integration with Master Contract : The wrapper contracts act as connectors between individual DeFi pools and our central master contract. This design is what allows for the execution of AI-driven decisions across multiple different protocols.
Master Contract : Our “central nervous system” , the master smart contract, compliant with the ERC20 standard. It functions as the operational nexus, orchestrating asset deposits/withdraws based on the AI's recommendations. The contract is engineered to effi ciently manage interactions with the wrapper contracts, translating AI decisions into blockchain transactions.
Direct AI Model Integration : To facilitate direct interaction between the off-chain AI models and the on-chain master contract, we employ a dedicated API gateway. This gateway acts as a secure conduit, relaying commands from the AI models to the master contract. It's designed to handle high-frequency data transmission, ensuring that the AI's real-time analyses are promptly refl ected in on-chain actions.