Thanks to visit codestin.com
Credit goes to github.com

Skip to content

TacitusXI/oblivion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

OBLIVION Protocol

"You do not own your wallet. You are simply renting memory."

Overview

OBLIVION Protocol is an onchain simulation where users sacrifice their wallets to write their legacy into the blockchain. The dApp offers a stunning UI that guides users through a visually narrated journey culminating in wallet sacrifice and the minting of a Legacy NFT - a procedurally generated onchain tombstone commemorating their wallet's existence.

Architecture

Frontend Architecture (Next.js)

  • Framework: Next.js 14+ with App Router
  • Styling: Tailwind CSS with custom theme system
  • Animation: Framer Motion for fluid transitions
  • State Management: Zustand for global state
  • Web3 Integration: viem/wagmi for wallet connections
  • Audio: howler.js for immersive sound effects
  • UI Components: Custom component system inspired by Dead Space terminal aesthetics

Backend Architecture

  • Blockchain: Ethereum (and/or alternative L2s)
  • Smart Contracts: Solidity contracts deployed via Hardhat
  • Contract Architecture:
    • OblivionSink.sol: Receive-only contract for ETH sacrifice
    • LegacyNFT.sol: ERC721 contract for generating tombstone NFTs
    • SoulIndex.sol: Onchain ranking system for wallet sacrifices

Data Flow

  1. User connects wallet through wagmi/Connect Kit
  2. Frontend fetches wallet history data via Etherscan/Alchemy API
  3. User completes the ritual journey through app screens
  4. Smart contract interaction: wallet sacrifice transaction
  5. NFT minting process with onchain SVG generation
  6. Metadata storage (optional IPFS/Arweave integration)

Folder Structure

/
├── app/                      # Next.js App Router
│   ├── api/                  # API Routes
│   ├── page.tsx              # Landing page
│   ├── journey/              # Main journey screens
│   │   ├── begin/            # Initial welcome screen
│   │   ├── reflection/       # Wallet history reflection
│   │   ├── sacrifice/        # Sacrifice ceremony
│   │   └── legacy/           # Legacy NFT reveal
│   └── leaderboard/          # Optional leaderboard feature
├── components/               # UI Components
│   ├── common/               # Shared UI elements
│   ├── animations/           # Animation components
│   ├── web3/                 # Web3 specific components
│   └── screens/              # Screen-specific components
├── lib/                      # Utility functions
│   ├── web3/                 # Web3 utility functions
│   ├── animations/           # Animation utilities
│   └── api/                  # API utilities
├── styles/                   # Global styles
│   └── theme.js              # Theme configuration
├── hooks/                    # Custom React hooks
│   ├── useWalletHistory.ts   # Hook for wallet history
│   ├── useSacrifice.ts       # Hook for sacrifice logic
│   └── useNFTGeneration.ts   # Hook for NFT generation
├── contexts/                 # React contexts
│   └── JourneyContext.tsx    # Journey state context
├── public/                   # Static assets
│   ├── sounds/               # Audio files
│   └── images/               # Static images
├── contracts/                # Smart contracts
│   ├── OblivionSink.sol      # Sink contract
│   ├── LegacyNFT.sol         # NFT contract
│   └── SoulIndex.sol         # Rankings contract
├── scripts/                  # Deployment scripts
├── test/                     # Contract tests
└── config/                   # Configuration files
    ├── chains.ts             # Supported chains
    └── constants.ts          # App constants

Key Features

1. Journey Experience Screens

  • Welcome to Oblivion: Black void with ambient sounds, single "Begin The Passage" button
  • Reflection Phase: Display of wallet history and metrics:
    • Last 10 transactions
    • First token ever received
    • Total gas used
    • Number of contracts interacted with
  • Sacrifice Phase: Ritual interface for signing the sacrifice transaction
  • Legacy Mint: NFT reveal with animated onchain SVG of their tombstone

2. Smart Contract Features

  • Wallet Sacrifice: Multiple options for sacrifice:
    • Send all ETH to OblivionSink contract
    • Burn access through cryptographic methods
    • Self-destruct wallet mechanism
  • Legacy NFT: Dynamic SVG generation encoding:
    • Final gas used
    • Last token held
    • Final words entered before sacrifice
    • Timestamp and block number of sacrifice
  • SoulIndex: Onchain ranking system for memorable sacrifices

3. Visual & Audio Experience

  • UI/UX Inspired by:
    • Journey (indie game) emotional progression
    • Dead Space Terminal aesthetics
    • Cyber-Roman shrine motifs
  • Sound Design:
    • Ambient background soundscapes
    • Ritual completion sounds
    • Confirmation audio cues

4. Optional Epic Features

  • Leaderboard: Showcase of "richest sacrificed wallets"
  • Evolving NFTs: NFTs that change if someone sends ETH in the name of sacrificed wallet
  • Memorial Message Board: Anonymous messaging accessible only to sacrificed wallets
  • Multi-chain Support: Extend sacrifice ritual to multiple blockchains
  • Ritual Video Generation: Shareable video of the sacrifice ceremony

Development Roadmap

Phase 1: Foundation

  • Architecture setup and core Next.js structure
  • Smart contract development and testing
  • Basic UI components and theme system

Phase 2: Core Journey

  • Wallet connection and history analysis functionality
  • Main journey screens implementation
  • Basic sacrifice transaction flow

Phase 3: NFT Generation

  • Dynamic SVG generation system
  • Onchain metadata storage
  • NFT minting process

Phase 4: Polish & Extensions

  • Sound design implementation
  • Animation refinement
  • Leaderboard and additional features

Technical Considerations

Performance Optimization

  • Lazy loading of heavy animation components
  • Efficient data fetching with SWR
  • Optimized smart contract gas usage

Security

  • Smart contract auditing
  • Protected API routes
  • Secure wallet connection handling

Accessibility

  • Dark mode support by default
  • Screen reader compatibility
  • Keyboard navigation support

Web3 Integration

Supported Wallets

  • MetaMask
  • WalletConnect
  • Coinbase Wallet
  • Rainbow
  • Additional wallets via WalletConnect

Blockchain Support

  • Ethereum Mainnet
  • Optimism
  • Arbitrum
  • Base
  • (Possibility to extend to additional L2s)

Running the Project

Prerequisites

  • Node.js (v18 or higher)
  • npm or yarn
  • A web3 wallet (MetaMask, etc.)

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/oblivion.git
    cd oblivion
  2. Install dependencies:

    npm install
  3. Set up environment variables: Create a .env.local file in the root directory with the following variables:

    NEXT_PUBLIC_ALCHEMY_API_KEY=your_alchemy_api_key
    NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID=your_walletconnect_project_id
    

Running the Development Server

npm run dev

Open http://localhost:3000 with your browser to see the result.

Smart Contract Development

The smart contracts for OBLIVION Protocol are located in the contracts/ directory.

To compile the contracts:

npx hardhat compile

To run tests:

npx hardhat test

To deploy contracts to a testnet:

npx hardhat run scripts/deploy.js --network goerli

Contributing

We welcome contributions to the OBLIVION Protocol! Please feel free to submit issues and pull requests.


"The end is just a new beginning on the blockchain."

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published