AI-powered decentralized portfolio manager using Lit Protocol. Automates asset rebalancing with secure Lit Actions, signed by a PKP. Users interact via real-time chat, receive AI-driven risk analysis, select dynamic strategies, and execute trades on-chain through Uniswap.
The Decentralized Portfolio Manager powered by Lit Protocol & AI — automates asset rebalancing with secure Lit Actions, signed by a PKP. Users engage with AI for risk analysis, select dynamic strategies based on risk tolerance, execute trades on-chain, and interact via a real-time chat interface.
Users start by engaging with an AI agent through a real-time chat interface, where they can provide their risk tolerance preferences and investment goals. The AI retrieves current holdings from the user’s PKP wallet and fetches market data from the Uniswap decentralized price oracle. It then evaluates the user’s risk profile to generate an informed strategy.
Based on the risk assessment, the system selects a trading strategy, such as conservative, balanced, or aggressive, mirroring traditional stock investing applications. The AI then generates precise trade instructions aligned with the selected strategy.
Once trade instructions are generated, they are converted into executable transactions and securely signed by the PKP through Lit Actions. The Lit Action then submits the trades to DEXs via Uniswap for automated execution.
Finally, the AI provides real-time feedback on trade execution, keeping users updated on portfolio performance.
The tech stack includes Lit Protocol for secure signing with PKP, AI Agent (ChatGPT) for risk analysis and strategy selection, Uniswap for executing trades on-chain, and Ethers.js with Express and WebSocket for blockchain interactions and real-time updates.
That said, there are some limitations. Since Lit Actions have a *30-second execution cap, we can only process *a few trades per action before hitting that limit. While technically, multiple trades can be handled within a single Lit Action, *waiting for transactions to settle on-chain would take too long, meaning we’d have no way to do proper error handling within the action itself. As a workaround, trade execution had to be simplified, with more complex strategies moved off-chain. Another challenge was data flow—ideally, everything would happen within one Lit Action, but due to constraints, *we had to shuttle data between the Lit Action and the client, which forced some major architectural changes in the codebase.