Skip to content

Descipline/descipline-smart-contracts

Repository files navigation

Descipline – An open Challenge Arena where discpline is rewarded

Put money on the line, prove your success, and earn rewards — all trustless, transparent, and on-chain.


🌟 Overview

  • Descipline is a decentralized platform that turns self-discipline into real rewards.
  • Users can create or join time-based or usage-based challenges, staking funds before a deadline.
  • Winners — verified via merkle proof verification — reclaim their stake and share forfeited funds from those who didn’t succeed.
  • Attestation - backed by Solana Attestation Service

Key features:

  • Trustless Escrow: All funds locked in Solana smart contracts.
  • Transparent Verification: Proofs of success via Solana Attestation Service.
  • Open Arena: Anyone can create or join challenges.
  • Fair Rewards: Stake from non-completers distributed to winners.

🛠 How It Works

  1. Create Challenge
    • Initiator sets challenge details (goal, stake amount, deadline).
    • Contract stores challenge data on-chain.
    • Backend integrates with Solana Attestation Service to set credential & schema storage.

1

  1. Join Challenge
    • Challenger deposits SPL tokens before deadline.
    • If staking SOL, frontend auto-wraps to wSOL.

2

  1. Attestation & Winner Resolution
    • At challenge end, attestor signs attestation.
    • Backend indexes winners, stores results in DB, uploads to Arweave.
    • Merkle root of winner list stored on-chain for verification.

3

  1. Claim Rewards
    • Winners submit Merkle proof to claim stake + share of forfeits.

4


📂 Project Structure

  • struct

    descipline-smart-contracts/
    │── programs/               # smart contract(s)
    │   └── descipline/          
    │       ├── src/             
    │       ├── Cargo.toml       
    │       └── Anchor.toml      
    │
    │── scripts/                # Helper scripts
    │── tests/                  # Integration tests
    │── README.md
    
  • dependencies

    anchor-cli 0.30.1
    solana-cli 2.2.17
    rustc 1.87.0
    
  • run

    yarn manual:build
    anchor deploy
    yarn codama-idl
    yarn test
    

🔧 Dev Tools

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published