Skip to content

Repository files navigation

🍋 ChainLemo (链了么) - FishCake EventFi Protocol

🏆 FishCake Hackathon 2024 Entry

Track: Fishcake Event Manager & Asset Library Integration Vision: Programmable Trust for the Digital Age

ChainLemo Banner

📖 1. Project Vision (项目愿景)

ChainLemo is a Programmable Trust Protocol built on the FishCake Ecosystem.

Crypto assets are immutable, but human life is fragile. We address one of the biggest pain points in Web3: Permanent Asset Loss due to Accidental Loss of Contact.

Unlike cold, lifeless wallets, ChainLemo leverages the FishCake Event Manager to transform asset custody into warm, programmable "Life Events".

"Crypto is forever. You are not. We guard your legacy."


💡 2. Core Features (核心功能)

🍋 Lemon Tree (The Guardian)

A decentralized Dead Man's Switch.

  • Mechanism: Monitors your on-chain activity (Check-in/Heartbeat).
  • Trigger: If you remain silent for a set period (e.g., 365 days), the contract assumes you are lost.
  • Execution: Automatically calls the FishCake Asset Library to transfer assets to your beneficiary and decrypts your "Last Words" stored on Arweave.

🧧 Lemon Drop (Time Capsule)

A programmable Red Packet for the future.

  • Scenario: "Prepare 1 ETH for my daughter's 18th birthday, locked until that exact date."
  • AI Powered: Integrated with Google Gemini AI, helping users polish their raw emotions into timeless "Digital Inscriptions".

🛠 3. Tech Stack (技术架构)

ChainLemo strictly follows the Separation of Concerns principle required by FishCake Hackathon Track 3:

Component Technology Role
Logic Layer Solidity (FishCakeEventBase) Decides "WHEN" (Heartbeat, TimeLock). Zero funds held here.
Asset Layer FishCake Asset Library Decides "HOW" (Fund Transfer). Only executes upon valid signal.
Storage Arweave Permaweb Stores the encrypted "Last Words" and "Key Locations" permanently.
AI Agent Google Gemini Polishes emotional messages and generates smart contract drafts.
graph TD
    User[User] -->|1. Deploy Event| Event[🍋 Lemon Tree Logic]
    User -->|2. Deposit Funds| AssetLib[🏦 FishCake Asset Library]
    
    subgraph "ChainLemo Protocol"
        Event -->|Monitor| Heartbeat[Check-in Status]
        Event -->|Condition Met?| Logic{Silence > 365 Days?}
    end
    
    Logic -- YES -->|Signal| AssetLib
    AssetLib -->|Execute Transfer| Beneficiary[👶 Beneficiary]
    Logic -->|Reveal| Arweave[📜 Arweave Note]
Loading

🛡 4. Security Innovation: "The Beacon Model"

To address judges' concerns about Private Key Custody, ChainLemo introduces a tiered security model:

🟢 Tier 1: Direct Custody (Small Funds < 5 ETH)

  • Mode: Direct Deposit.
  • Use Case: Birthday gifts, pocket money.
  • Logic: Funds are managed by the Asset Library and released automatically.

🔴 Tier 2: The Information Beacon (Life Savings)

  • Mode: Zero-Custody Signal Trigger.
  • Use Case: Inheritance, Life Savings.
  • Logic: NEVER share your private keys.
    1. User physically hides their hardware wallet mnemonic (e.g., "In the safe behind the painting").
    2. ChainLemo stores the Encrypted Location of these keys on-chain.
    3. The contract acts as a Signal Beacon. It holds NO funds, only the "Treasure Map".
    4. Upon trigger, it reveals the location to the beneficiary.
  • Value: Combines Physical Security (Air-gapped keys) with Blockchain Automation (Trigger).

🚀 5. How to Run (Demo)

Prerequisites

  • Node.js v16+
  • Google Gemini API Key (for AI features)

Installation

  1. Clone & Install

    git clone https://github.com/fishcake-hackathon/chainlemo.git
    cd chainlemo
    npm install
  2. Configure Environment Create a .env file in the root:

    VITE_API_KEY=your_gemini_api_key_here
  3. Start Development Server

    npm run dev

    Open http://localhost:5173 to experience the UI.

Smart Contract Deployment

# Compile Contracts
npx hardhat compile

# Deploy to FishCake Testnet (Mock)
npx hardhat run scripts/deploy.ts --network fishcake_testnet

📂 Project Structure

/contracts
  ├── FishCakeTimeEvent.sol    # Core Logic (Lemon Tree)
  ├── FishCakeRedPacket.sol    # Time Lock Logic
  └── core/                    # Base Classes
/components
  ├── LandingPage.tsx          # UI & AI Integration
  └── CreateVaultModal.tsx     # Contract Factory UI
/services
  ├── geminiService.ts         # AI Agent Service
  └── standardTemplates.ts     # Contract Templates

ChainLemo Team
Building the emotional layer of the blockchain.

About

ChainLemo 链了么 × FishCake EventFi —— 构建在 FishCake 生态上的可编程信任协议(Programmable Trust Protocol),FishCake Hackathon 2024 参赛作品,中英双语文档。

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages