Skip to content
This repository was archived by the owner on Aug 16, 2026. It is now read-only.
linguaFoundationPublic archive

About

Decentralized protocol for owning, licensing & monetizing multilingual datasets on Stellar Soroban. Every verified translation is attributed on-chain, licensed via smart contracts, and earns automatic royalties forever. Dataset Registry live on testnet.

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

ย 

History

150 Commits

Folders and files

Repository files navigation

LinguaLayer โ€” Language Rights Protocol on Stellar

The missing economic infrastructure for linguistic diversity in AI. African and underrepresented language communities earn perpetual, on-chain royalties every time their datasets power an AI model.

CI License: MIT Stellar Testnet Live App


๐Ÿ”— Links

Resource URL
๐ŸŒ Web App (Live) https://lingualayer.vercel.app
๐Ÿ“ฆ Monorepo https://github.com/linguaFoundation/lingualayer
๐Ÿ” Testnet Explorer https://stellar.expert/explorer/testnet
๐Ÿ“„ DatasetRegistry Contract CBET4YWSMIZB3LGLVTDKQJ5HXQAPQGM3NKGXJLJEJQNF7TBDOVMXUOK
๐Ÿ”ฎ QualityOracle Contract CCJVLNJ5O4NHIFMJMYZRFYIBRFM3WS7BKGYGWIQXNQYFXQTUYAEZQR5
๐Ÿ’ฐ DataCommission Contract CDTGZ2PFUODWQFKLCMF2XZ7NY2HQPJFN3BQKUOIYRBKL5VWKRQBZLMJ
๐Ÿ›ค๏ธ LicenseRouter Contract CAQPZ5IK3WSHZTRQUAEKK3GMVKHSMWUFMJ4RFBOQ2QYQAUWK2TGZJMK
๐Ÿ’ธ RoyaltySplitter Contract CBQPFV7LQRSQOJTLXE7LIQXZSPJHBV7LQYSVYUUQZFJTJDZMUFKGQHJ

๐ŸŒ What is LinguaLayer?

LinguaLayer is a decentralized protocol built on Stellar Soroban that enables fair, transparent ownership and monetization of multilingual AI training datasets.

Every Yoruba sentence, every Swahili paragraph, every Igbo audio clip scraped from the web powers billion-dollar AI models โ€” yet the communities who speak those languages receive no compensation, attribution, or control. LinguaLayer changes this:

  • On-chain attribution โ€” every dataset is registered with its contributors' Stellar addresses and share allocations
  • Automatic royalties โ€” every license purchase triggers a programmable split to all contributors instantly
  • Quality-gated multipliers โ€” certified curators attest dataset quality on-chain, boosting royalties for high-quality contributions
  • Trustless commissioning โ€” AI companies post USDC bounties for specific language datasets; funds are held in escrow and released on delivery

๐Ÿ†• What's New in v2

1. ๐Ÿ”ฎ QualityOracle Contract

Trusted language curators stake XLM and submit quality attestations (score: 0โ€“100) for any registered dataset. Scores aggregate into a quality tier that feeds a royalty multiplier applied on every license purchase:

Tier Score Range Royalty Multiplier
๐Ÿ† Platinum 90โ€“100 1.5ร—
๐Ÿฅ‡ Gold 75โ€“89 1.25ร—
๐Ÿฅˆ Silver 50โ€“74 1.0ร—
๐Ÿฅ‰ Bronze 0โ€“49 0.75ร—
  • Curators who submit malicious or outlier attestations face slashing of their stake
  • A minimum attestation quorum is required before a quality tier is assigned
  • Quality scores are stored permanently on-chain and visible via the Dataset Detail page

2. ๐Ÿ’ฐ DataCommission Contract โ€” Language Bounty Board

AI companies and researchers can post USDC-denominated bounties for specific language datasets they need:

Post Commission โ†’ USDC locked in escrow โ†’ Contributor delivers โ†’ Admin verifies โ†’ Escrow released on-chain
  • Commissions are browseable at /bounties โ€” the Language Bounty Board
  • Arbiter role available for disputed commissions
  • Milestone-based escrow release for larger bounties
  • Commission deadline countdown on every bounty card

3. ๐Ÿ‘› All Stellar Wallets โ€” Stellar Wallets Kit

We replaced custom Freighter-only connection logic with @creit.tech/stellar-wallets-kit, enabling native support for every major Stellar wallet:

Wallet Type
Freighter Browser Extension
xBull Browser Extension + PWA
Lobstr Mobile + Extension
Hana Browser Extension
Rabet Browser Extension
WalletConnect QR Code / Mobile
Ledger Hardware Wallet
ALBEDO Web-based Signer

4. ๐Ÿ” SEP-0010 Web Authentication

Replaced custom Sign-In With Stellar (SIWS) with the official Stellar SEP-0010 web authentication standard:

  • Backend issues a signed challenge transaction using the manage_data operation
  • Client signs with their wallet and returns the envelope
  • Backend verifies the signature against the Stellar network
  • Issues a JWT for authenticated API calls

5. ๐Ÿ“Š DatasetRegistry v3 Upgrades

  • Duplicate registration prevention (hash-based deduplication)
  • ISO 639-3 language code validation at the contract level
  • Reputation score tracked per contributor address
  • Weighted contributor share modification by dataset owner
  • Admin upgrade path via WASM hash rotation

๐Ÿ›๏ธ Protocol Architecture

linguaFoundation/lingualayer/          (monorepo)
โ”‚
โ”œโ”€โ”€ apps/
โ”‚   โ”œโ”€โ”€ web/                           # Next.js 15 Frontend
โ”‚   โ”‚   โ”œโ”€โ”€ app/                       # App Router pages
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ page.tsx               # Dataset Marketplace
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ /bounties/             # Language Bounty Board
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ /communities/          # Language Community Explorer
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ /governance/           # Community Governance Voting
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ /royalties/            # Contributor Royalty Dashboard
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ /licensing/            # License Purchase Flow
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ /roadmap/              # Public Roadmap
โ”‚   โ”‚   โ””โ”€โ”€ lib/
โ”‚   โ”‚       โ””โ”€โ”€ wallets-kit.ts         # Stellar Wallets Kit integration
โ”‚   โ”‚
โ”‚   โ””โ”€โ”€ backend/                       # Fastify REST + WebSocket API
โ”‚       โ”œโ”€โ”€ src/indexer/               # Soroban event indexer โ†’ Postgres
โ”‚       โ”œโ”€โ”€ src/routes/sep10/          # SEP-0010 auth endpoints
โ”‚       โ”œโ”€โ”€ src/routes/datasets/       # Dataset listing + detail
โ”‚       โ”œโ”€โ”€ src/routes/commissions/    # DataCommission API
โ”‚       โ””โ”€โ”€ src/routes/quality/        # QualityOracle attestation API
โ”‚
โ”œโ”€โ”€ contracts/                         # Soroban smart contracts (Rust)
โ”‚   โ”œโ”€โ”€ dataset-registry/              # Dataset attribution + contributor shares
โ”‚   โ”œโ”€โ”€ license-router/                # License issuance + validation + revocation
โ”‚   โ”œโ”€โ”€ royalty-splitter/              # Weighted royalty distribution (5% treasury)
โ”‚   โ”œโ”€โ”€ quality-oracle/                # Curator staking + attestation + slashing
โ”‚   โ””โ”€โ”€ data-commission/               # USDC escrow bounty board
โ”‚
โ”œโ”€โ”€ docs/                              # Protocol documentation
โ”‚   โ””โ”€โ”€ ARCHITECTURE.md               # Contract interaction patterns
โ”‚
โ”œโ”€โ”€ .github/workflows/
โ”‚   โ””โ”€โ”€ ci.yml                         # Node App Build + Rust/Soroban Build CI
โ”‚
โ””โ”€โ”€ README.md

๐Ÿ“œ Smart Contracts โ€” Testnet Deployment

All contracts are deployed and verified on Stellar Testnet.

Contract Address Description
DatasetRegistry v3 CBET4YWSMIZB3LGLVTDKQJ5HXQAPQGM3NKGXJLJEJQNF7TBDOVMXUOK Core dataset + contributor registry
LicenseRouter CAQPZ5IK3WSHZTRQUAEKK3GMVKHSMWUFMJ4RFBOQ2QYQAUWK2TGZJMK On-chain license issuance & validation
RoyaltySplitter CBQPFV7LQRSQOJTLXE7LIQXZSPJHBV7LQYSVYUUQZFJTJDZMUFKGQHJ Weighted revenue distribution
QualityOracle CCJVLNJ5O4NHIFMJMYZRFYIBRFM3WS7BKGYGWIQXNQYFXQTUYAEZQR5 Curator staking + quality scoring
DataCommission CDTGZ2PFUODWQFKLCMF2XZ7NY2HQPJFN3BQKUOIYRBKL5VWKRQBZLMJ USDC escrow + bounty board

๐Ÿ” All contracts are verifiable on Stellar Expert (Testnet).


โšก Quick Start

Prerequisites

  • Node.js 20+
  • Rust (see rust-toolchain.toml) + the stellar CLI
  • A Stellar Testnet wallet (Freighter recommended)

Run the Web App Locally

git clone https://github.com/linguaFoundation/lingualayer.git
cd lingualayer/apps/web
npm install
cp .env.example .env.local
# Set NEXT_PUBLIC_STELLAR_NETWORK=testnet
npm run dev

App runs at http://localhost:3000.

Run the Backend API Locally

cd lingualayer/apps/backend
npm install
cp .env.example .env
# Configure DATABASE_URL, STELLAR_NETWORK=testnet, CONTRACT addresses
npm run dev

Backend runs at http://localhost:4000.

Build & Deploy Contracts

All 5 contracts must be built with the wasm32v1-none target (the current soroban-sdk release no longer supports wasm32-unknown-unknown on Rust 1.82+ โ€” see rust-toolchain.toml), and license-router must be built after quality-oracle, since its cross-contract client is generated from quality-oracle's compiled .wasm file rather than a normal Cargo dependency.

contracts/scripts/deploy.sh handles the build order, deploys all 5 with the stellar CLI, initializes them (creating and funding a deployer identity on testnet if needed), and writes the resulting contract IDs to contracts/deployments/<network>.env:

cd lingualayer
NETWORK=testnet SOURCE=my-deployer ./contracts/scripts/deploy.sh

To build a single contract by hand instead:

cargo build --target wasm32v1-none --release -p dataset-registry

stellar contract deploy \
  --wasm target/wasm32v1-none/release/dataset_registry.wasm \
  --source-account <YOUR_IDENTITY_OR_SECRET_KEY> \
  --network testnet

๐Ÿ”„ Contract Interaction Flow

User connects wallet (Freighter / xBull / Lobstr / etc.)
         โ”‚
         โ–ผ
SEP-0010 Authentication (backend issues challenge โ†’ wallet signs โ†’ JWT issued)
         โ”‚
         โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                    Dataset Marketplace                     โ”‚
โ”‚  Browse datasets โ†’ filter by language โ†’ view contributors โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                           โ”‚
              โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
              โ”‚      License Purchase   โ”‚
              โ”‚  LicenseRouter.issue()  โ”‚
              โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                           โ”‚
         โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
         โ”‚         QualityOracle              โ”‚
         โ”‚   Reads quality score โ†’ tier โ†’     โ”‚
         โ”‚   applies royalty multiplier       โ”‚
         โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                           โ”‚
         โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
         โ”‚         RoyaltySplitter            โ”‚
         โ”‚  Distributes USDC to all           โ”‚
         โ”‚  contributor addresses by share %  โ”‚
         โ”‚  5% โ†’ protocol treasury            โ”‚
         โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ—บ๏ธ Roadmap

Phase Status Milestone
Phase 1 โœ… Complete DatasetRegistry + LicenseRouter + RoyaltySplitter deployed to Testnet
Phase 2 โœ… Complete QualityOracle + DataCommission deployed; multi-wallet support; SEP-0010
Phase 3 ๐Ÿ”œ In Progress Security audit of all 5 contracts
Phase 4 ๐Ÿ”œ Planned Mainnet deployment + first 50 African language community onboarding
Phase 5 ๐Ÿ”œ Planned AI company partnership program + data procurement API

๐Ÿค Contributing

We welcome contributors! We have 154 open GitHub Issues labeled by component and priority:

  • [priority: critical] โ€” blocking mainnet launch
  • [priority: high] โ€” important for v2 feature completeness
  • [component: contracts] โ€” Soroban/Rust work
  • [component: backend] โ€” Fastify API + indexer
  • [component: frontend] โ€” Next.js UI/UX

See CONTRIBUTING.md for setup instructions and our PR workflow.


๐Ÿ”’ Security

See SECURITY.md for our vulnerability disclosure policy.

Current security posture:

  • All contracts have emergency pause mechanisms
  • Admin upgrade path via WASM hash rotation (no proxy pattern)
  • BytesN<32> metadata hash validated as non-zero before storage
  • All unwrap() calls audited and replaced with proper error handling in production paths
  • QualityOracle curator slashing prevents malicious attestations

Pre-mainnet: We will commission a full third-party security audit before deploying to Stellar Mainnet.


๐Ÿ“„ License

MIT ยฉ 2025โ€“2026 LinguaLayer Contributors


Built on Stellar. For languages that deserve to be heard.

Website ยท GitHub ยท Issues

About

Decentralized protocol for owning, licensing & monetizing multilingual datasets on Stellar Soroban. Every verified translation is attributed on-chain, licensed via smart contracts, and earns automatic royalties forever. Dataset Registry live on testnet.

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages