Locker HODL

Locker HODL

A fork of Coinbase Smart Wallet that automatically saves and locks-up a little ETH for you every time you use it.

53
Built at Onchain Summer Buildathon

The problem Locker HODL solves

Not everyone flosses at night and puts 20% of their savings into a diversified saving strategy. Locker HODL is for the everyday crypto user that wants basic savings on-chain. Imagine your returns today if you just put 1% of your ETH volume into savings starting 5 years ago.

Locker HODL can also simplify your on-chain transactions. Now you can pay for your gas with credit card via Stripe and we'll pay on-chain for you.

Context

As an unofficial fork, this wallet cannot be natively imported into wallet.coinbase.com. To get around this limitation, Locker HODL is packaged into a Metamask snap. Now you can use your Coinbase Smart Wallet from Metamask too.

No code from Locker has been reused. This repo was started fresh just for the hackathon.

Locker HODL was first conceptualized at ETH Denver as Auto HODL.
At that point, MetaMask Snap was not yet stable, so savings was implemented as a standalone proxy contract.

Since ETH Denver, Auto HODL was rebranded as Locker.
Locker automates inbound payroll deposit for web3 contractors.

How it's made

  • Metamask Snap account abstraction template
  • Added foundry and copied in Coinbase Smart Wallet
  • Modify Coinbase Smart Wallet code for saving features

Challenges I ran into

Getting Coinbase Smart Wallet to play nice with Snaps

  • Snaps uses hardhat, CSW uses foundry
  • For some reason, unable to interact with smart contract from some Snap code. Had to hardcode values per wallet.
  • Snaps is very sensitive to different bundler and RPC providers.
  • Was not able to reliably execute transactions through Snap for the smart wallet. Still debugging root causes.

Coinbase Smart Wallet module uncertainty

  • Ideally would like to implement savings logic as a module so that it can be installed into existing CSW.
  • CSW does not currently support ERC-7579 or ERC-6900. No clear message from team what direction it's headed.

Gatsby site deployment

Something about the workspaces structure is forcing the foundry code to compile unnecessarily for the Gatsby site, leading to build errors.
Site also needs to communicate with snap server which is hard to coordinate in prod in time for submission deadline.

Custody

To make the CSW non-custodial, a private key needs to be supplied that owns it.
This is currently pasted into the UI which is awkward and not secure.

ERC20s

No time to add support

Tracks Applied (2)

Coinbase Smart Wallet

First project to bring Coinbase Smart Wallet to Metamask Forked CSW, adding auto saving features with timelock

Payments Track

Introduce novel idea to pay for consumer gas on-chain and charge with Stripe. Bringing round up savings for every paymen...Read More

PAYMENTS with Stripe

Cheer Project

Cheering for a project means supporting a project you like with as little as 0.0025 ETH. Right now, you can Cheer using ETH on Arbitrum, Optimism and Base.

Discussion