Nomos is a decentralized social media platform that revolutionizes content monetization through AI-powered agent negotiation. Instead of traditional static paywalls, personal AI agents manage dynamic access to premium content by negotiating token-based transactions in real-time on the Hedera network.
Nomos introduces a multi-agent economic model where:
- Creators mint custom Hedera Token Service (HTS) tokens representing access rights to premium content
- Personal AI agents autonomously negotiate content access and pricing on behalf of users and creators
- All value transfers and asset ownership are secured and verified on Hedera Testnet
- Dynamic pricing enables creators to adjust token prices in real-time based on demand
Traditional content monetization platforms suffer from:
- Inflexible paywall systems that don't adapt to market conditions
- High platform fees that reduce creator revenue
- Lack of transparency in payment processing
- No direct creator-to-consumer value exchange
Nomos solves these issues by combining Hedera's low-cost, high-speed distributed ledger technology with intelligent agent negotiation to create a truly decentralized creator economy.
Nomos employs a sophisticated hybrid architecture that optimizes for both trust and performance:
On-Chain Layer (Hedera Testnet)
- Identity management via Hedera Account IDs
- Value transfer using HBAR cryptocurrency
- Tokenized access rights using Hedera Token Service (HTS)
- Smart contract-based user profile registry (Solidity via Hardhat)
- Verifiable transaction history through Hedera Mirror Nodes
Off-Chain Layer (Supabase)
- High-volume application data (posts, user profiles, engagement metrics)
- Agent discovery registry (endpoint URLs)
- Real-time pricing data and creator control panel
- Fast API responses for agent negotiation logic
This architecture ensures that trust-critical operations (payments, token transfers, identity) leverage Hedera's security and finality, while high-frequency operations (content browsing, agent discovery) use traditional databases for optimal performance.
The platform consists of a Next.js frontend with HashPack wallet integration, a local EchoGuard agent that mediates requests, CreatorAgent instances hosted on Replit, and the Hedera Testnet handling all payment settlements and token transfers. Supabase provides the off-chain database layer for high-speed operations.
- Hedera Testnet: Primary blockchain for identity, payments, and token operations
- Hedera Token Service (HTS): Creator token minting and management
- Hedera SDK (@hashgraph/sdk): JavaScript SDK for Hedera network interaction
- Solidity: Smart contract language for user profile registry
- Hardhat: Development environment for compiling, testing, and deploying Solidity contracts to Hedera's EVM-compatible layer
- Node.js: Runtime for agent logic
- Express.js: HTTP server framework for agent endpoints
- Hedera Agent Kit: Scaffolding and utilities for Hedera-native agent development
- create-hedera-agent CLI: Rapid agent project initialization
- Next.js 15: React framework with server-side rendering and TypeScript support
- TypeScript: Type-safe development
- HashConnect: Official Hedera wallet integration library for HashPack
- react-hot-toast: User notification system for transaction status
- Tailwind CSS: Utility-first styling framework
- Supabase: PostgreSQL database with real-time subscriptions and instant REST APIs
- PostgreSQL: Relational database for application state
- Replit: Cloud hosting for CreatorAgent instances
- Local Development: EchoGuard agent runs on developer machines
- Low Transaction Costs: Sub-cent transaction fees enable microtransactions for content access
- High Throughput: 10,000+ TPS supports real-time agent negotiations
- Fast Finality: 3-5 second transaction finality ensures smooth user experience
- Native Token Service: HTS provides efficient, secure tokenization without custom smart contracts
- Carbon Negative: Energy-efficient consensus aligns with sustainable development goals
- Fair Ordering: Consensus timestamp prevents front-running and ensures fairness
Hedera Token Service (HTS)
- Creators mint fungible tokens representing content access licenses
- Token transfers execute instantly with cryptographic proof
- Built-in treasury management and supply controls
- Low-cost token creation (approximately $1 on mainnet)
HBAR Cryptocurrency
- Primary payment method for purchasing creator tokens
- Network fees paid in HBAR (testnet uses free test HBAR)
- Direct peer-to-peer value transfer without intermediaries
Hedera Accounts
- Unique Account IDs (format:
0.0.xxxxx) serve as universal identifiers - ED25519 cryptographic key pairs for secure transaction signing
- Accounts hold HBAR and HTS token balances
Mirror Nodes
- Query historical transaction data for payment verification
- REST API for retrieving account balances and token holdings
- Consensus timestamp validation ensures transaction integrity
Smart Contracts (EVM-Compatible)
- UserProfile.sol contract maps Ethereum-style addresses to Supabase user IDs
- Deployed via Hardhat to Hedera's EVM-compatible smart contract layer
- Provides on-chain attestation of user identity
Nomos uses Hardhat as the Solidity development environment configured for Hedera Testnet deployment. Key features include contract compilation with Solidity 0.8.19, automated deployment scripts, and secure private key management via environment variables.
The platform uses PostgreSQL (via Supabase) with two primary tables:
Users Table: Stores user profiles with Hedera account linkage, agent endpoints, creator token IDs, and dynamic pricing.
Posts Table: Contains content posts with premium/public flags and author references.
A Solidity smart contract deployed via Hardhat that creates an immutable on-chain registry linking Hedera accounts to application user profiles. The contract uses a simple mapping structure with event emission for profile registration.
Agents communicate via JSON messages over HTTP with four message types: inquiry, offer, denial, and proof of payment. This protocol enables autonomous negotiation between user agents and creator agents without human intervention.
Responsibilities:
- Receive content access inquiries from EchoGuard agents
- Check creator's token treasury balance
- Query user's existing token balance on Hedera
- Fetch current pricing from Supabase
- Generate offers or denials based on inventory and pricing
- Verify HBAR payment transactions via Hedera Mirror Node API
- Execute HTS token transfers to purchasing users
Responsibilities:
- Receive content unlock requests from frontend
- Discover creator's agent endpoint via Supabase
- Forward inquiries to CreatorAgent
- Relay offers/denials to frontend
- Forward proof of payment after user signs transaction
- Discovery: User browses platform and identifies premium content (marked with
is_premium: true) - Unlock Initiation: User clicks "Unlock" button on premium post
- Agent Inquiry: Frontend calls local EchoGuard agent API
- Creator Agent Discovery: EchoGuard queries Supabase for creator's
agent_endpoint_url - Price Negotiation: EchoGuard sends inquiry to CreatorAgent, which responds with current token price
- Offer Display: Frontend displays offer (e.g., "10 tokens for 5 HBAR")
- User Approval: User clicks "Approve Purchase"
- Wallet Interaction: HashConnect prompts user to sign HBAR transfer in HashPack wallet
- Payment Execution: User approves, transaction broadcasts to Hedera network
- Proof Forwarding: EchoGuard forwards transaction ID to CreatorAgent
- Payment Verification: CreatorAgent queries Hedera Mirror Node to verify payment
- Token Transfer: CreatorAgent executes HTS token transfer to user's account
- Access Granted: Frontend unlocks content and displays success notification
- Profile Creation: User creates account and links Hedera wallet via HashConnect
- Become Creator: User navigates to settings and selects "Become a Creator"
- Token Minting: System guides creator through HTS token creation
- Agent Deployment: Creator clicks "Deploy My Agent" (links to Replit template)
- Agent Configuration: Creator configures Replit secrets (private key, Supabase credentials)
- Endpoint Registration: Creator saves agent endpoint URL to Supabase profile
- Pricing Setup: Creator sets initial token price in HBAR
- Content Publishing: Creator begins publishing premium content
- Node.js 18+ and npm
- Git
- Hedera Testnet account (create at portal.hedera.com)
- HashPack wallet browser extension
- Supabase account (supabase.com)
Create .env.local in the project root with your Hedera network configuration, Supabase credentials, and agent settings.
Create a Supabase project and run the SQL schema to initialize users and posts tables with proper relationships and indexes.
Standard Next.js development workflow: install dependencies with npm install, run dev server with npm run dev, and build for production with npm run build.
Deploy contracts to Hedera Testnet using Hardhat: compile with npx hardhat compile and deploy with deployment scripts targeting the hedera_testnet network configuration.
The project includes a seeding script (npm run seed) that populates the database with demo creator accounts, sample posts, and realistic token pricing data for demonstration purposes.
Start the Supabase project, deploy CreatorAgent instances, run the local EchoGuard agent, start the Next.js frontend, connect your HashPack wallet, and interact with premium content to see the full unlock flow in action.
The repository is organized into modules: Next.js app directory for frontend, contracts folder for Solidity and Hardhat configuration, agents directory for CreatorAgent and EchoGuard implementations, and seed scripts for demo data population.
- Private keys stored securely in environment variables or Replit Secrets
- Agent endpoints use HTTPS in production
- Payment verification through cryptographic transaction IDs
- Row-level security policies on Supabase tables
- Rate limiting on agent endpoints to prevent abuse
- Input validation and sanitization on all user-provided data
- Multi-tier subscription models with recurring token payments
- Content creator analytics dashboard
- Reputation system for creators and agents
- Support for NFT-gated content via Hedera NFTs
- Cross-chain bridging for other token standards
- Mobile applications with native wallet integration
- Real-time Price Discovery: Dynamic pricing synchronized across agents and frontend
- Payment Verification: Robust transaction validation using Hedera Mirror Nodes
- Agent Discovery: Decentralized registry allows creators to host agents anywhere
- Atomic Access Control: Ensures users receive tokens before content unlocks
- Scalable Architecture: Hybrid model prevents blockchain bottlenecks
MIT License - See LICENSE file for details
- Hedera Documentation: https://docs.hedera.com
- HashPack Wallet: https://www.hashpack.app
- Hardhat Documentation: https://hardhat.org
- Next.js Documentation: https://nextjs.org/docs
Repo layout (created files)
- frontend/ — Minimal Next.js TypeScript scaffold (pages, styles, package.json).
- seed/seed.js — Supabase seeding script to populate
usersandpoststables with demo creators and premium posts. - package.json — Workspace-level scripts for running the frontend dev server and the seed script.
Key components (implementation notes)
- Supabase schema (recommended SQL)
CREATE TABLE users ( id uuid primary key, hedera_account_id text unique, display_name text, bio text, agent_endpoint_url text, creator_token_id text, token_price_in_hbar numeric );
CREATE TABLE posts ( id uuid primary key, author_id uuid references users(id), content text, is_premium boolean default false );
- Solidity / Hardhat (on-chain)
A small contract, UserProfile.sol, maps an Ethereum-compatible address to a Supabase user id:
mapping(address => string) public userProfiles; function registerProfile(string memory supabaseUserId) public { userProfiles[msg.sender] = supabaseUserId; }
Notes: We recommend using Hardhat with the Hedera Testnet RPC (EVM-compatible) and @hashgraph/sdk for HTS operations.
- Agent-to-agent (A2A) message format
Example JSON messages used by agents:
{ "type": "inquiry", "userAccountId": "0.0.x", "postId": "..." } { "type": "offer", "tokenAmount": 10, "hbarPrice": 5, "offerId": "..." } { "type": "denial", "reason": "Tokens out of stock." } { "type": "proof_of_payment", "transactionId": "0.0.x@..." }
CreatorAgent behavior (Replit template):
- Express server with endpoints for inquiries and proofs of payment.
- On inquiry: check treasury token balance, check user's token balance, fetch price from Supabase, return offer or denial.
- On proof_of_payment: verify HBAR transfer on Hedera mirror node and execute TokenTransferTransaction to deliver HTS tokens.
EchoGuard (local) behavior:
- Local Express server used by the frontend to mediate requests to CreatorAgent endpoints. It forwards inquiries and proofs of payment and returns responses to the UI.
Frontend (Next.js) — current scaffold
- Basic pages and global styles.
- React Hot Toast wired in for notifications.
- Placeholder for HashConnect wallet integration and Unlock flow.
Seed script
- Location:
seed/seed.js. - Purpose: Clear and populate
usersandpoststables with demo creators and premium posts. - Environment: set
SUPABASE_URLandSUPABASE_SERVICE_KEYbefore running.
Quickstart (local development)
Prerequisites
- Node.js 18+ and npm or pnpm
- A Supabase project with a
usersandpoststable as described above - Hedera Testnet accounts and a funded test wallet (HashPack)
Steps
- Clone the repository.
- Create a Supabase project and add the tables shown above.
- Create a
.envfile with the following variables:
SUPABASE_URL=your_supabase_url SUPABASE_SERVICE_KEY=your_service_role_key
- Run the seed script to populate demo data:
npm run seed- Start the frontend (from repo root):
npm run frontend:dev- Implement and run the local EchoGuard agent (see Agent notes) and point the UI to it for the Unlock flow.
Demo flow (for the hackathon)
- Seed the database with demo creators and posts.
- Start EchoGuard locally and the CreatorAgent (using the Replit template URLs provided in the seeded data).
- On the frontend, identify a premium post and click Unlock. The EchoGuard agent will:
- Send an inquiry to the CreatorAgent.
- Receive an offer with a price in HBAR.
- Ask the user to sign the HBAR transfer with HashPack/HashConnect.
- On receipt of proof_of_payment, forward it to the CreatorAgent which will verify and transfer HTS tokens to the purchaser.
Next steps and stretch goals
- Full Hardhat project in
contracts/with deployment scripts to Hedera Testnet and HTS minting helpers. - Publish the CreatorAgent Replit template and add a one-click deploy link for creator onboarding.
- Implement a richer frontend: creator settings, token minting UI, and real-time transaction status updates.
- Add unit and integration tests for agents and the seeding flow.
Contributing
Contributions are welcome. Open an issue describing the feature or bug, then submit a PR with tests where applicable.
License
This project is provided under the MIT License.