HODL Vault: A minimalist, time-locked smart contract to enforce long-term conviction.
HODL Vault is a decentralized "commitment device" designed for the Ethereum ecosystem. In the volatile world of DeFi, "paper-handing"—or selling assets prematurely due to market fluctuations—is a common pitfall for retail investors. This project provides a programmatic solution to this psychological challenge by allowing users to lock their ETH into a non-custodial smart contract for a fixed duration.
The application serves as a digital piggy bank with a tamper-proof lock. Once a user deposits their ETH, the smart contract logic strictly forbids any withdrawals until the predefined time-lock has expired. There are no "emergency exit" functions, no administrative overrides, and no complex yield strategies that introduce protocol risk. It is a pure, security-first implementation of a time-locked vault, providing users with a "forced HODL" mechanism to ensure they stick to their long-term investment goals regardless of short-term market noise.
The project was built with a focus on extreme security and minimal gas consumption. The core of the application is a Solidity smart contract deployed on Base (or Sepolia/Optimism). I utilized a simple mapping system to track individual user balances and timestamps, ensuring that the contract is gas-efficient and easy to audit.
For the development environment, I used Foundry (or Hardhat) for rigorous testing of the time-lock logic and Remix IDE for the final deployment and verification on the block explorer. The frontend is a responsive React application built using Scaffold-ETH 2, which allowed for rapid integration with RainbowKit and Wagmi for wallet connectivity.
One "hacky" but effective optimization I implemented was using block.timestamp for the lock logic; while generally cautioned against for precision-sensitive applications, it is perfectly suited for a 24-hour vault and significantly reduces contract complexity. To ensure a seamless user experience, I integrated Vercel for continuous deployment, providing a live URL where users can interact with the vault in real-time. This stack was chosen to prioritize a "Zero-UI" philosophy—where the focus is entirely on the interaction between the user's wallet and the immutable smart contract.

