Protocol Architecture

Understanding the three-layer architecture of Elusiv

Overview

Elusiv operates as a Decentralized AI Research Desk with three tightly coupled layers that work together to enable censorship-resistant research commissioning and distribution.

1

Access Layer

Elusiv Access Pass (ERC-721) - Membership gating for commissioning, vault access, and governance. Supply-capped, per-wallet limited, and treasury-directed mint proceeds.

2

Economic Layer

$ELUSIV Token (ERC-20) - The research fuel. Requests are paid in $ELUSIV; fees split to treasury and contributors. Fixed supply defined in `ElusivToken.sol` anchors scarcity.

3

Execution Layer

Research Desk + AI Agents - `ElusivResearchDesk.sol` holds the request queue and payments. Off-chain agent orchestration fulfills, validates, and publishes outputs into the Knowledge Vault.

Smart Contract Overview

Elusiv is built on a stack of secure, standard-compliant smart contracts using OpenZeppelin libraries:

ElusivAccessPass.sol

ERC-721 NFT contract managing membership caps, minting logic, and treasury distribution.

ElusivToken.sol

Fixed-supply ERC-20 token used for payments, rewards, and future staking mechanisms.

ElusivResearchDesk.sol

Request queue with capped query length, configurable cost, and fulfillment tracking.

Access Pass (ERC-721) Deep Dive

Contract Features

The Elusiv Access Pass is an ERC-721 NFT contract with the following key features:

Supply Management
  • Maximum supply cap set at deployment
  • Sequential token ID minting
  • Sold-out protection when max supply reached
Minting Controls
  • Configurable mint price (in ETH/native token)
  • Minting can be enabled/disabled by owner
  • Public minting function with payment validation
  • Owner can free-mint to specific addresses
Treasury & Payments
  • Mint proceeds go to configurable treasury address
  • Affiliate program with promo codes
  • Configurable affiliate fee percentages
  • Optional $ELUSIV token rewards for affiliates
Security Features
  • ReentrancyGuard protection
  • Ownable access control
  • Safe token transfers using SafeERC20
  • Event emissions for all state changes

Key Functions

Public Functions:
  • publicMint(bytes32 promoCode) - Mint a pass with optional promo code
  • balanceOf(address owner) - Check pass balance (ERC-721 standard)
  • ownerOf(uint256 tokenId) - Get owner of specific token

Research Desk Contract

Contract Structure

The Research Desk contract manages the on-chain queue of research requests:

Request Management

  • Stores all research requests in an array
  • Tracks open/pending request IDs
  • Maintains user-specific request mappings
  • Records request metadata (query, payment, timestamps)

Payment Processing

  • Configurable request cost in $ELUSIV tokens
  • Transfers tokens from requester to contract
  • Tracks payment amounts per request
  • Owner can withdraw accumulated funds

Fulfillment Tracking

  • Completion submission with document hash
  • Approval/rejection workflow
  • Tracks resolver address for each request
  • Emits events for all state changes

Request Lifecycle

1. Submission

User calls requestResearch(string query) with $ELUSIV payment

2. Processing

Request stored on-chain, event emitted for off-chain orchestrator

3. Completion Submission

Resolver calls submitCompletion(uint256 requestId, string documentHash)

4. Approval

Owner approves completion, payment released to resolver

Token Contract Mechanics

ERC-20 Standard

The $ELUSIV token is a standard ERC-20 token with:

  • Fixed Supply: Maximum supply defined at contract deployment
  • Standard Functions: transfer, approve, balanceOf, etc.
  • Decimals: Standard 18 decimal places
  • No Minting: Supply is fixed, no additional minting after deployment

Token Usage

$ELUSIV tokens are used for:

Research Payments

Rewards

Governance

Staking (Future)

Contract Interactions

Data Flow

The contracts interact in the following ways:

  1. User mints Access Pass (Access Pass contract)
  2. User approves Research Desk to spend $ELUSIV (Token contract)
  3. User submits research request (Research Desk contract)
  4. Research Desk transfers $ELUSIV from user (Token contract)
  5. Off-chain orchestrator processes request
  6. Completion submitted with document hash (Research Desk contract)
  7. Payment released to resolver (Research Desk contract)

Security Considerations

Reentrancy Protection

All contracts use ReentrancyGuard to prevent reentrancy attacks.

Access Control

Ownable pattern restricts sensitive functions to contract owner.

Safe Transfers

SafeERC20 library prevents token transfer failures from breaking execution.

Continue Learning

Explore other technical aspects of the Elusiv protocol.