Back to Dashboard

How HabitStake Works

HabitStake is a fully decentralized, skin-in-the-game productivity platform built entirely on the Monad Mainnet.

The Smart Contract

At its core, HabitStake runs on a highly optimized Solidity smart contract (`HabitStake.sol`). When you create a commitment, your MON tokens are securely locked in escrow. The contract strictly enforces the 24-hour check-in window mathematically using `block.timestamp`. No admin can access or manipulate your staked funds while they are active.

Slashing Mechanics

If you miss a daily check-in, the specific portion of your stake designated for that day is instantly calculated and flagged for slashing. When you finally claim your refund at the end of the duration, the contract safely routes all slashed funds to the protocol beneficiary using a specialized "pull-pattern" escrow mechanism to prevent reentrancy and out-of-gas attacks.

The Tech Stack

  • Frontend: Next.js 14 App Router, React, CSS Modules
  • Web3 Integration: ethers.js v6
  • Smart Contracts: Solidity (EVM) deployed on Monad
  • UI/UX: Glassmorphism styling, CSS animations, and custom 3D rendering