Automatically save USDC by rounding up purchases with your MetaMask card. Secured by MetaMask DeleGator. Savings on Circle Wallets. Optimized multi-chain yield via LiFi + CCTP v2.
[auto-hodl.vercel.app](https://auto-hodl.vercel.app/)
**Auto HODL** is Acorns.com for your MetaMask Card. Aut HODL enables users to **automatically save** USDC while spending using their **MetaMask card**. It works by **rounding up** each transaction to the nearest dollar and sending the spare change to a **savings account** — effortlessly building a crypto savings habit.
Some of the features include:
- Round up payments to the nearest USDC dollar and send the change to AAVE.
- MetaMask SDK for wallet connect.
- MetaMask DTK/DeleGators for protecting users funds. The protocol can only send up to your round-up amount.
- Realtime multi-chain Aave yield optimization.
- Cross chain with LiFi/CCTP v2.
- Circle Modular Wallets for custody.
---
## 🏗️ Hackathon Demo Modes
During the [MetaMask Card hackathon](https://www.hackquest.io/hackathons/MetaMask-Card-Dev-Cook-Off) we shipped two working prototypes and sketched a third, future-ready design:
### 1. Single-chain (hackathon)

End-to-end flow on Sepolia. Every MetaMask Card purchase is rounded-up and the difference is supplied to the Aave pool on the same chain.
### 2. Multi-chain (hackathon)

At round-up time the backend finds the best Aave yield, bridges funds via **LiFi/CCTP**, and supplies on the destination chain.
### 3. Single-chain (future)

Planned production upgrade:
* Use Linea. Cannot be used now becuase DTK/DeleGator not yet compatible with Linea.
* Use **native smart accounts** instead of explicit DTK deployment.
* Request delegated permissions with **ERC-7715**.
* Use the underlying EOA (connected to the card) as the savings source.
* Use Circle Gateway for instananeous bridging.
* Batching funds before bridging or depositing into Aave, to reduce the impact of fees.
---
## Implementaiton details
Here is a rundown of some of the most important implementation details:
- Triggered by [deposits to MM Card](https://github.com/locker-labs/auto-hodl/blob/93467ae7d29651b0fab2296aba98281558dd1b2f/apps/web/src/lib/constants.ts#L5) contract.
- [Delegations](https://github.com/locker-labs/auto-hodl/blob/93467ae7d29651b0fab2296aba98281558dd1b2f/apps/web/src/hooks/useMetaMaskDTK.tsx#L174) to give protocol access to user funds.
- [Caveats](https://github.com/locker-labs/auto-hodl/blob/93467ae7d29651b0fab2296aba98281558dd1b2f/apps/web/src/lib/utils.ts#L12) to ensure only USDC is spent, and only up to the round-up amount.
- [Creation](https://github.com/locker-labs/auto-hodl/blob/93467ae7d29651b0fab2296aba98281558dd1b2f/apps/web/src/lib/circle/createSmartAccount.ts) of Circle Modular Wallets for cross-chain savings.
- [LiFi/CCTP v2](https://github.com/locker-labs/auto-hodl/blob/93467ae7d29651b0fab2296aba98281558dd1b2f/apps/web/src/lib/lifi/index.ts) integration.
- Aave [yield optimization](https://github.com/locker-labs/auto-hodl/blob/93467ae7d29651b0fab2296aba98281558dd1b2f/packages/scripts/find-optimal-yield.ts).
- Sample [trigger address](https://arbiscan.io/address/0xF445b07Aad98De9cc2794593B68ecD4aa5f81076)
- Sample [source of funds](https://arbiscan.io/address/0xc8f20aa6Ac3650241a88f0e4300ca988EfDc241F) (delegator)
- [Protocol delegate](https://arbiscan.io/address/0x4D769e03B8D068147B6aF4935F8fE419Cfd03784)
All code was written during this hackathon. But the [original concept](https://devfolio.co/projects/auto-hodl-e5dd) was first explored during ETH Denver 2024. Back then, Auto HODL was a brute proxy contract that required all transactions be executed through a custom UI. With significant new features from MetaMask, Circle, and LiFi, a much more user friendly UX is now possible. ### Limitations - Using Arbitrum as the home chain, because Linea is [not currently compatible](https://t.me/c/1883939594/983/3573) with DTK/DeleGator. - We deactivated more advanced caveats that were working to limit interaction to [Aave](https://github.com/locker-labs/auto-hodl/blob/93467ae7d29651b0fab2296aba98281558dd1b2f/apps/web/src/lib/yield/caveats.ts) and [LiFi](https://github.com/locker-labs/auto-hodl/blob/93467ae7d29651b0fab2296aba98281558dd1b2f/apps/web/src/lib/lifi/caveats.ts)/CCTP. This is because it would have required creating multiple sets of delegations, and a more complex UX. - Always bridging 1 USDC, regardless of round-up amount. LiFi does not reliably return routes for smaller amounts. - The single chain flow does truly deposit funds into Aave for yield. But the multi chain flow only parks savings in a Circle wallet. Additional UX would be needed for the extra step of moving from Circle wallet to Aave.
Email contact@locker.money