Intrlink Documentation

A Deep Dive into Intrlink: Decentralized, Non-Custodial, Fiat-Pegged POS Settlement.

1. Project Overview & Architecture

Intrlink is an advanced, non-custodial Point-of-Sale (POS) settlement protocol engineered exclusively for the Flare network. It solves one of the most critical barriers to cryptocurrency adoption in retail commerce: price volatility.

By allowing merchants to price their goods and services strictly in fiat (e.g., USD minor units/cents) while receiving payments entirely in crypto (such as C2FLR, USDT, or FXRP), Intrlink eliminates merchant exposure to crypto price fluctuations at the point of sale.

Target Audience: Real-world retail and online merchants who want to accept cryptocurrency without the accounting nightmare of price volatility, alongside crypto users seeking everyday utility for their digital assets.

Architecturally, Intrlink achieves its stability and decentralization by seamlessly integrating with Flare's powerful ecosystem:

  • FTSOv2 Integration: We rely exclusively on the Flare Time Series Oracle for real-time exchange rates. Every checkout intent fetches live, highly accurate price data to convert fiat to exact crypto requirements on-chain.
  • Interoperability & FAssets: Intrlink inherently supports Flare's FAssets (like FXRP, FBTC), bringing real-world DeFi utility and spending power to tokens that previously lacked smart contract capabilities on their native chains.
  • EVM Execution: Deployed natively on the Flare network (currently live on the Coston2 Testnet), utilizing Flare's high-throughput EVM to route payments atomically and non-custodially. The IntrLink.sol smart contract acts purely as a settlement router and data validator—it never custodies user or merchant funds.

Additionally, Intrlink features an AI-powered Copilot that acts as a merchant assistant. It allows merchants to analyze sales, summarize payments, and manage their storefront efficiently using natural language queries directly from the dashboard.

2. Core Smart Contract Functions

Merchant & Profile Management

registerMerchant: Registers a unique namespace for a merchant, establishing a public display profile and irrevocably binding a non-custodial settlement wallet address where all funds will be securely routed.

updateMerchantProfile / updateSettlementAddress: Provides the merchant ongoing control to update their business information, physical location, and settlement destination dynamically on-chain.

Asset & Catalogue Configuration

addAsset / addAssets: Maps specific payment tokens (like C2FLR or ERC-20 FAssets) to their corresponding FTSOv2 price feed IDs (21-byte identifiers). This strict mapping guarantees that when a customer pays in a specific asset, the correct oracle data is referenced.

addItem / addItems: Constructs the merchant's on-chain product catalogue. Item prices are rigidly stored in fiat minor units (e.g., $2.50 is stored as 250), shielding the catalogue from daily crypto market swings.

Payment Intents (Checkouts)

createPaymentIntent / createCartPaymentIntent: The core checkout mechanism. It aggregates the fiat value of selected items, validates the target payment asset's availability, and reads the FTSOv2 oracle to calculate the required crypto amount. This amount is permanently locked into the Intent until payment or expiration.

cancelIntent / expireIntent: Prevents outdated, stale, or cancelled quotes from being settled, ensuring merchants never receive undervalued payments.

Atomic Settlement

payNative: Validates msg.value against the locked requiredAssetAmount for native token (C2FLR) payments, subsequently triggering a low-level call to push the native token straight to the merchant.

payToken: Leverages transferFrom for ERC-20 and bridged FAssets. It verifies the payment against the Intent and atomically routes the approved tokens to the merchant's settlement wallet.

3. Detailed End-to-End User Flow

Step 1: Protocol Onboarding & Verification

A merchant visits the dApp, connects their EVM wallet, and registers their profile via the registerMerchant function. This step is crucial as it binds their account to a specified settlement address, creating a secure, non-custodial pipeline for future revenue.

Step 2: Inventory & Oracle Setup

The merchant populates their inventory using addItem, setting item names and hardcoded USD prices. Simultaneously, they call addAsset to enable verified assets (like USDT or FXRP). The contract rigorously validates these assets against the Flare Contract Registry to ensure reliable FTSOv2 price data can be fetched.

Step 3: Point-of-Sale Quote Generation

When a customer is ready to check out, the dApp aggregates the selected items into a Cart. A transaction invokes createCartPaymentIntent, instructing the smart contract to fetch the latest oracle price. A fixed cryptocurrency quote is generated and locked into an immutable Payment Intent with a strictly enforced expiration timestamp.

Step 4: Non-Custodial Execution & Event Emission

The customer reviews the live checkout link and clicks "Pay". Depending on the asset type, the contract routes the transaction through payNative or payToken. The exact amount is verified, the Intent is marked as PAID to prevent replay attacks, and funds are instantly transferred to the merchant. Finally, a PaymentSettled event is emitted, instantly updating the frontend UI to reflect a successful purchase.

4. New Proposals & Next Steps

Evidence of New Work: The entire Intrlink ecosystem—from the robust smart contract architecture (IntrLink.sol) down to the seamless React frontend merchant dashboard and checkout flows—was envisioned, designed, and built entirely from scratch to showcase the power of interoperable asset products on Flare.

Roadmap

  • Flare Mainnet Deployment: Rolling out natively on Flare mainnet coinciding with FAsset mainnet readiness.
  • Merchant APIs: Comprehensive API and Webhook integrations to power automated accounting systems.
  • Hardware POS: Integrating standard physical POS terminal hardware for seamless in-store retail payments.
  • Recurring Billing: Subscription-based payment intents leveraging recurring oracle-checked billing cycles.

Repositories & Contracts

Smart Contract (Coston2 Testnet): 0x2b7f7552E3B5902c2d1dAE65664ABE93F9d45795

Smart Contract Repo: https://github.com/bellobambo/intrlink

Frontend Repo: https://github.com/bellobambo/intrlink-fe