Outvest

Brands lock USDC upfront; Chainlink CRE verifies YouTube views; Arc pays creators automatically.

Outvest

Created At

ETHGlobal Mumbai

Winner of

Chainlink Labs

Chainlink - Best workflow with CRE

Project Description

OutVest is escrowed pay for YouTube creators. A brand locks USDC in a smart contract first, and creators are paid automatically as their video views are verified.

The problem. Creator payouts today are scattered and manual. View data lives in screenshots and private dashboards with no traceability. Payment depends on invoices and bank transfers that arrive late or never. And whoever holds the money and the data decides the number, so creators can’t check it and brands can’t verify what they’re billed.

How it works.

A brand creates a campaign on Arc and funds a vault with USDC. It sets a rate per 1,000 views, a cap per creator and an unlock schedule. The rules cannot be changed afterwards. A creator signs in with email or Google through a Circle wallet. They pick a campaign, paste their YouTube link, and receive a unique code made from an onchain hash. They put that code in the video description to prove they own the video. Clicking Verify emits an onchain event that triggers Chainlink CRE. CRE nodes each read the video from the YouTube API and must agree on the result. A signed report goes to our receiver contract, which only accepts reports from the Chainlink forwarder with the pinned workflow identity. The vault binds the creator and pays 10% of their cap instantly. After that, earnings follow verified views, limited by a cap, a daily growth limit and a time-based unlock schedule. Snapshots, payouts and final settlement are scheduled CRE workflows. Unused funds return to the brand. A deadman switch finalizes the campaign if the oracle goes silent.

Chainlink CRE runs four workflows: bind (triggered by the onchain event), snapshot, final and payout (cron). Arc holds the escrow vaults, instant USDC settlement and the contracts that apply reports. CCIP lets a creator send a verifiable earnings receipt to Base Sepolia.

How it's Made

Stack. Solidity 0.8.27 with Foundry (244 tests) for the contracts. TypeScript with the Chainlink CRE SDK 1.23 for the workflows. Next.js 16, React 19, Tailwind 4 and viem for the app. Circle user-controlled wallets for sign-in and signing. Chainlink CCIP for cross-chain receipts. Everything runs on Arc Testnet, with USDC as the native stablecoin.

How the pieces connect.

Contracts: CampaignFactory deploys one CampaignVault per campaign. The vault holds the USDC and all the payout math. ReportReceiver is the only door for oracle data. It accepts calls only from the Chainlink forwarder and checks the workflow owner and ID against values the factory pinned once, with replay and timestamp checks on top. Ownership proof: a creator calls requestBinding, and the vault stores keccak256(vault, wallet, videoId, nonce, chainId) as a challenge. They paste it into the video description. submitForVerification then emits VerifyRequested from the factory. CRE: the wf-bind workflow has an EVM log trigger on that event. Each node fetches the video from the YouTube API (the key lives in CRE secrets) inside runInNodeMode. Results combine through ConsensusAggregationByFields: median for view counts, identical for the “challenge found” flag. The DON signs the report and the forwarder delivers it. Three more workflows (snapshot, final, payout) run on cron. Payout rules: the vault credits views using the minimum seen across a rolling window of seven time buckets, so brief spikes don’t count, and limits growth per day. Pay then follows a time-based unlock schedule. 10% of the cap pays out in the same transaction as the bind. App: the Circle SDK creates a challenge for each contract call and the user confirms with a PIN. The creator page reads vault state over a multicall to stay under RPC limits.

What partner tech gave us. CRE meant no server of our own acting as oracle: consensus, secrets and signed delivery come built in, and the log trigger starts a check straight from a contract event. Circle wallets let creators sign in with email or Google, with no seed phrase or gas setup. CCIP gives a creator portable proof of earnings on Base Sepolia. Arc gives instant USDC settlement with USDC as gas.

Hacky parts worth knowing.

Chainlink deploy access isn’t enabled for us yet, so CRE can’t run live. The demo uses a relayer (bun run watch) that builds the same report envelopes and calls onReport from a wallet we set as the demo factory’s forwarder. It is a single-key oracle, not decentralized, and the real factory stays unlocked until CRE deploys. CRE consensus has fixed fields, so view counts for up to 50 videos map to slots v0..v49 with -1 for missing. Workflows are also limited to 15 EVM reads per run, so shared code budgets reads across runs. Free RPCs fought us. The public Arc endpoint rate-limits and free Alchemy allows eth_getLogs over only 10 blocks. The relayer scans in 10-block slices, catches up on missed requests through the Arcscan indexer, and batches reads into multicalls. A mistake worth admitting: a shell quirk made my script create campaigns with default settings, so a few unfunded ones remain on-chain. The app hides campaigns that aren’t funded.

background image mobile

Join the mailing list

Get the latest news and updates