Sparky is a LLM-based swap agent, it is equipped with injective blockchain knowledges and built-in smart wallets to assist users in decision making and DEX trading.
We implement a custom LLM with web3 knowledge and teach it how to interact with smart contracts by injecting external dataset, including research papers, crypto metrics and on-chain data, as indexing, retrieval and context injection. The process is also known as RAG (Retrieval Augmentation Generation), which allows Sparky better adapt to decentralized network and assist users in making informed investment decision.
Sparky classifies user intent into purpose of general queries and contract interaction requests, the former is handled by LLM directly while the latter will trigger actions to form transactions through built-in smart wallets on behalf of clients.

Sparky innovates the way sending transactions through built-in MPC & AA wallets. Users do not need to care about transactions, gas, protocols and other complex underlying concepts: just tell the agent what they want and the agent will handle the rest.
There are two types wallets in Sparky: smart contract wallet and multi-party computation wallet. The smart contract wallet is responsible for interacting with external protocols and storing client assets, it is managed by TSS-based signatures from MPC wallet with 2/3 factors strategies which enables self-custody and social login: One factor is hosted in the cloud and can be retrieved through OAuth, while the other two factors are stored on the user's device (e.g., in browser local storage) and serve as backups, respectively.

With recognized user intent for interacting with smart contracts, Sparky will generate corresponding UserOperation and request user signature. The bundler will simulate the transaction and call EntryPoint contract to 1) deploy smart account if not yet, 2) validate UserOperation, 3) forward and execute call-data and 4) calculate and charge gas after operation. This is a standard EIP-4337 compatible scheme to benefit users from flexible gas option and customized operations.
To further facilitate user experience with DEX-Trading, Sparky deployed a monitor service for mempool to offer MEV extraction and protection service along with MEV-boost. Users are allowed to choose private mode to prevent exploitation during mempool stage, place on-chain limit order to swap at a fixed-rate, or execute copy-trading and front-running at their targeting address. In all, Sparky integrates bot services and make it a smart and powerful agent for DEX uses.


