AI-powered DeFi savings with rewards for discipline and penalties for delays
SaveFi is an AI-powered decentralized finance (DeFi) savings platform designed to help users cultivate long-term saving habits using blockchain technology, AI financial planning, and a robust incentive mechanism.
Here's how SaveFi works:
AI-Powered Financial Analysis: Users interact with a personalized AI assistant by providing their financial details such as monthly income, expenses, and saving goals. The AI evaluates this data and generates a customized, manageable monthly savings plan tailored to the user's financial capability.
Smart Contract-Based Deposit Mechanism: After establishing their personalized savings plan, users deposit stablecoins (USDC) into a secure smart contract each month. These funds are automatically allocated into the AAVE DeFi protocol to generate interest through decentralized lending markets. This ensures transparent, secure, and automated interest accumulation without intermediaries.
Reward & Penalty Incentive Structure: Reward Mechanism: If users consistently make their deposits on time, they receive 90% of the accumulated interest converted into SaveFi's native token, $SAVE. These tokens can be claimed once the plan matures, incentivizing disciplined financial behavior.
Penalty Mechanism: If users fail to deposit on time, their earned interest (in $SAVE tokens) is burned, reducing the total circulating supply and thus creating a deflationary effect. This discourages delays and promotes punctual savings behavior.
The burning mechanism from both late deposits and early withdrawal creates continuous deflationary pressure, enhancing the long-term value proposition of the $SAVE token.
In summary, SaveFi uniquely combines AI financial advisory with decentralized finance mechanisms to foster better financial habits, leveraging reward-based tokenomics and penalty-driven deflationary mechanisms to deliver sustained value to users.
🧠 AI Integration
OpenAI GPT-4o-mini API: Used to power financial planning conversations with users. The AI suggests monthly deposit amounts based on user input (income, expenses, goals).
Custom Prompt Engineering: Prompts are fine-tuned to simulate financial advisory behavior, asking follow-up questions to improve data accuracy and personalized plans.
💻 Frontend
Next.js with App Router: Provides a modern, scalable frontend framework.
Tailwind CSS + shadcn/ui: Used for clean, responsive UI with utility-first styling.
RainbowKit + Wagmi + viem: Seamless wallet connection and contract interaction support for Ethereum users.
Vercel: Hosts the frontend for instant CI/CD and global distribution.
🧾 Smart Contracts
Solidity: Core smart contracts handle savings plans, deposit logic, interest distribution, and reward penalties.
Foundry: Used for contract development, testing, and deployment.
AAVE Protocol: User deposits are supplied to AAVE via Pool interface to earn yield on USDC.
Uniswap v3 Router: Swaps yield-generated USDC into $SAVE tokens to distribute rewards.
ERC20Burnable: The $SAVE token contract includes burn functionality for penalties and early unlocks.
🧩 MultiBaas Integration
Contract Deployment + Labeling: Used forge-multibaas for automatic contract linking during deployment.
Event Indexing (Event Queries): Enabled fetching historical user deposit actions through executeArbitraryEventQuery API.
REST SDK Integration: Frontend uses MultiBaas TypeScript SDK to fetch real-time contract states and event logs with filtering.
🌍 Deployed on Celo & Polygon
Smart contracts are deployed on both Celo and Polygon, enabling fast, low-cost transactions and interoperability across EVM chains.
🔗 Tech Stack Summary
Frontend: Next.js, Tailwind, Wagmi, RainbowKit, Vercel
Backend: Solidity (Foundry), AAVE, Uniswap v3, ERC20
AI: OpenAI API
Infrastructure: MultiBaas, GitHub, Vercel