Doom Stake

A commitment device powered by Crypto. Your slashed stake for overuse becomes a good user's reward

Doom Stake

Created At

ETHGlobal New Delhi

Project Description

This project is a "focus-to-earn" application where users stake cryptocurrency to commit to reducing their screen time. It's a commitment device with a financial incentive.

How It Works:

  1. Stake: Through the Android app, a user stakes crypto (e.g., ETH) as a pledge to stick to their goal.
  2. Succeed & Earn: If they meet their goal for the duration, they get their stake back plus a share of the rewards pool.
  3. Fail & Lose: If they fail, their stake is "slashed." A portion is taken as a fee, and the rest is sent to the rewards pool for the successful users.

Technical Design:

  • Flow EVM Smart Contract (Solidity): This is the system's secure vault. It holds all staked funds. It contains a slash function that can only be called by a trusted address—the Flow contract.

  • Flow Smart Contract (Cadence): Reduced the need of trust by distributing rewards on chain automatically.

How it's Made

Technologies Used

  • Frontend: A Flutter-based Android app. User authentication and wallet management are handled by Web3Auth to provide a seamless, consumer-friendly experience without requiring users to manage private keys.
  • Flow EVM Backend: The financial core is a Solidity smart contract developed with Hardhat and Viem. This runs on an EVM-compatible chain and acts as the secure vault for user stakes.
  • Cadence Backend: The key feature used here is Flow Scheduled Transactions, reduces the need of trust by distributing rewards on chain automatically.

How It's Pieced Together:

  1. A user stakes funds via the Flutter app. The app uses the Web3Auth wallet to call the stake() function on the Solidity contract.
  2. The app monitors device usage and sends this data to the Cadence smart contract on Flow.
  3. The Cadence contract uses Flow Scheduled Transactions to autonomously check this data at regular intervals.
  4. If a user violates their commitment, the app triggers the slashing.
  5. Cadence contract makes a cross-chain call to the Solidity contract, triggering the slash() function to confiscate the stake.

Partner Technology: Flow

Using Flow as a partner technology is the key to making this project economically viable. Running the frequent scheduled logic on an other chains would be prohibitively expensive, and less decentralized. Flow's architecture and its native Scheduled Transactions feature allow us to run this logic at scale for a fraction of the cost.

background image mobile

Join the mailing list

Get the latest news and updates