Future Message Vault

Lock messages and ETH for your future self. A decentralized commitment device on Ethereum

Future Message Vault

Created At

ETHGlobal Cannes

Project Description

Future Message Vault is a decentralized application (dApp) built on the Ethereum blockchain that functions as a personal, time-locked commitment device. It allows any user with an Ethereum wallet to lock a message and a chosen amount of Ether (ETH) into a secure smart contract. This "vault" can only be opened, and the contents withdrawn, by the original creator after a specific, pre-determined amount of time has passed.

The core concept is to provide a trustless and immutable way for individuals to hold themselves accountable to their future goals, resolutions, or promises. By staking a tangible amount of value (ETH), users are financially and psychologically incentivized to see their commitments through.

How it's Made

We built this project using a standard full-stack Web3 approach, combining a smart contract backend with a modern web frontend.

  1. The Smart Contract (The Backend):

Technology: We wrote the FutureMessageVault smart contract in Solidity. How it Works: The contract has a list where it stores "messages." Each message holds the user's text, the amount of ETH they staked, their wallet address, and the time when it can be unlocked. The createMessage function takes the user's info and ETH and locks it up. The withdrawMessage function has security checks to ensure only the owner can take their ETH back, and only after the time is up. 2. The Frontend (The Website):

Technology: We used Next.js and React to build the user interface. This made it fast and easy to manage what the user sees. Connecting to the Blockchain: The Ethers.js library was the crucial link between our website and the Ethereum blockchain. 3. Piecing It All Together:

Development Tool: We used Hardhat to compile and test our Solidity contract before putting it on a real network. Deployment: We deployed the contract to the Sepolia testnet so anyone can try it. Partner Technology (Alchemy): Connecting to the Sepolia network can be slow and unreliable. We used a free Alchemy RPC node to make our connection fast and stable. This was a huge help for both deploying the contract and for making the website feel responsive when it reads data from the blockchain.

background image mobile

Join the mailing list

Get the latest news and updates