Overview
StackSave is a small savings app on the Stacks blockchain. You connect a Stacks wallet, deposit USDCx into a vault, optionally lock part of it for a chosen period, and withdraw what is unlocked.
Goodness Mbakara and I built it over a few days in January 2026. I wrote the first version of the frontend, reworked it into a minimal single page, wired up the Stacks wallet context, and wrote the stacks.clar vault contract.
The challenge
Saving in a stablecoin on-chain is easy to start and easy to undo. Without a lock, the money is one tap from being spent, which defeats the point of a savings product.
The contract also has to accept only the intended token and handle early withdrawal rules correctly, since a vault with a bug is a vault that can lose funds.
The goal
Build a vault where a user can deposit USDCx, lock some of it, and withdraw only what the rules allow.
- 01Accept deposits of one authorised token (USDCx) through the SIP-010 trait.
- 02Track a balance and a locked savings amount per user.
- 03Block withdrawal of locked funds until the lock period has passed.
- 04Offer a single, simple page for the whole flow.
The vault contract
The Clarity contract keeps a map from each user to their balance, locked savings, unlock height and total withdrawn. It exposes deposit, save with a lock period, withdraw and unlock, and read-only functions to inspect a vault or check whether it is locked. Errors are explicit constants for unauthorised access, insufficient balance, invalid amounts, locked funds and the wrong token.
The single-page app
The frontend started as a multi-part interface, and I reworked it into one minimal dashboard with deposit, save and withdraw actions. A context provider wraps the app, handles Stacks wallet connection and calls the contract, and an animated particle background gives it a distinct look.
01 / 04StackSave dashboard
Testnet tooling
The repository has scripts for deploying the contract and for bridging Circle USDC from Ethereum Sepolia to Stacks testnet USDCx, with a guide for the bridging steps.
The outcome
StackSave is deployed on Vercel against Stacks testnet and shows the complete deposit, lock and withdraw cycle for USDCx. It is a prototype, not an audited product.


