Back to Blog
Product & Platform

What Exactly Is On-Chain in PopTrade (And What Isn't)

November 18, 20254 min read

When people hear "blockchain advertising platform," they often imagine everything happening on-chain. Every impression recorded. Every click verified. Every decision transparent.

That's not how PopTrade works, and it's not how any practical blockchain system can work at advertising scale. Here's our actual architecture: what lives on-chain, what doesn't, and the reasoning behind each decision.

What's On-Chain: Money

All financial operations happen on Polygon blockchain:

  • Campaign escrow deposits — USDT locked in smart contracts when campaigns are funded
  • Publisher settlements — Automatic transfers when settlement cycles complete
  • Refunds — Unused budget returned to buyer wallets
  • Platform fees — Commission calculated and transferred by contract logic

Every dollar that moves through PopTrade has a transaction hash. You can verify any payment on Polygonscan. This isn't optional or configurable—it's the only way money moves in our system.

What's Off-Chain: Raw Event Data

Impressions, clicks, and conversions are recorded in our database, not on blockchain. Why?

Volume: A medium campaign might generate millions of impressions daily. Writing each to blockchain would cost more in gas than the actual ad spend. At $0.01 per transaction and 1 million events, you'd spend $10,000 just on recording—for a campaign that might only spend $500.

Speed: Blockchain confirmation takes seconds to minutes. Ad serving decisions happen in milliseconds. You can't wait for block confirmation to serve an ad.

Privacy: Raw impression data includes IP addresses, user agents, timing information. Putting this on a public blockchain would be a privacy nightmare.

The Bridge: Oracle Layer

Between raw events and on-chain settlements sits our oracle system. Here's how it works:

  1. Events accumulate in our database throughout the settlement period
  2. At settlement time, we aggregate: total impressions, fraud-filtered impressions, earnings by publisher
  3. These aggregates are submitted to the oracle contract with cryptographic signatures
  4. The settlement contract uses oracle data to calculate and execute payments

You can't verify individual impressions on-chain, but you can verify that the settlement amounts match what the oracle submitted. The oracle data includes hashes that reference our off-chain logs, creating an audit trail.

What's On-Chain: Settlement Logic

The rules for how money moves are encoded in smart contracts:

  • Publisher payout percentages
  • Platform fee calculation
  • Referral commission distribution
  • Escrow release conditions

These rules can't be changed without deploying new contracts. When you read our EscrowManager contract, you see exactly how settlements will execute. No hidden logic, no special cases in backend code.

What's Off-Chain: Fraud Detection

Antifraud decisions happen in our backend, not on blockchain. The reasons:

Speed: Fraud detection must happen in real-time, during the ad request. Blockchain latency would make this impossible.

Complexity: Modern fraud detection involves ML models, behavioral analysis, third-party integrations. This logic doesn't fit in smart contract limitations.

Adaptability: Fraud patterns change constantly. Smart contracts are immutable. You need updateable logic to fight evolving threats.

However, fraud detection results affect on-chain settlements. If traffic is flagged as fraudulent, it's excluded from publisher payouts. The oracle only submits verified traffic counts.

Why This Hybrid Approach

Pure on-chain systems sound appealing but fail at advertising scale. Pure off-chain systems require trusting the platform completely. Our hybrid captures the best of both:

Financial guarantees: Money is trustless. Smart contracts enforce settlement rules.

Operational efficiency: High-frequency operations stay off-chain where they can run fast and cheap.

Audit capability: Off-chain data links to on-chain settlements via oracle hashes. You can trace from payment back to supporting data.

This isn't the purist's vision of "everything on blockchain." It's the engineer's answer to "how do you build something that actually works at scale while maximizing the trustless guarantees?"

We chose Polygon because it balances cost, speed, and security for our settlement frequency. We chose USDT because advertising runs on dollars, not volatile tokens. Every architectural decision serves the goal: reliable advertising infrastructure where money movement is verifiable.

Share: