With the increasing popularity of stablecoins like USDC, its becoming easier to pay for everyday items with crypto thanks to debit cards from issuers like MetaMask. These solutions work by processing payments on traditional payment rails then pulling the stablecoin out of your onchain account to cover the cost of the purchase.
One downside is that if a stablecoin like USDC is simply sitting in your onchain account, you are missing out on competitive savings rates offered by decentralized protocols like Aave. Often the APY offered by these onchain lending protocols is much higher than those offered by traditional banks while maintaining a low-risk profile for high-quality assets like USDC or mUSD.
Ideally your balance would automatically stay in something like Aave when you don't need it and automatically refill your onchain account used for payments when it gets low. This workflow, powered by 1Shot API, does just that. It also sends you real time Telegram notifications about your account balance and savings every time your account rebalances.
This workflow integrates the Aave lending protocol to generate savings APY on your excess USDC funds on the Base network. When your holdings in your primary Metamask smart account exceed a threshold you set, it will deposit them into the Aave Lending Pool. This results in your account receiving aBasUSDC, a deposit receipt token used to withdraw your savings at a later time. When your account drops below a refill-threshold you set, it will exchange the aBasUSDC back to USDC and put in back into your primary account so that you can spend it.
This workflow will automatically balance your USDC funds on Base network so that you keep funds you aren't using in Aave to earn interest and automatically move funds out of savings back into your wallet when funds get low.