project screenshot 1
project screenshot 2
project screenshot 3
project screenshot 4

SnapAds

Watch ads to cover gas fees! AI Web3 ad platform with Paymaster + MetaMask Snap integration.

SnapAds

Created At

ETHGlobal Taipei

Winner of

Polygon

Polygon - Real World Anything

Project Description

This project is an AI-powered decentralized advertisement platform built on Polygon that lets users watch ads instead of paying gas fees. It integrates a MetaMask Snap to show users relevant ads during on-chain interactions and uses Paymaster contracts to sponsor their gas fees after the ad is watched.

Here's how it works:

Advertisers submit ad details including their wallet address, ad name, description, an IPFS-hosted video link, and funding amount.

An AI agent automatically selects the best matching ad spot for the ad using semantic similarity (via descriptions) and deploys it by calling Multibaas APIs connected to on-chain smart contracts.

When a normal user interacts with a smart contract on the platform (e.g., submitting a transaction), the MetaMask Snap shows them the most relevant ad based on their action.

If the user clicks and watches the full ad on the platform, the Paymaster contract reimburses their gas fee using the funds provided by the advertiser.

Advertisers get exposure and on-chain metrics for their ad views, while users enjoy gasless interactions by trading attention for value.

We used:

Multibaas to fetch smart contract data for available ad slots.

IPFS to store ad videos.

Covalent AI Agent SDK to deploy AI agents that handle ad placement and spot selection.

OpenAI GPT-4o for intelligent decision-making.

MetaMask Snaps for custom wallet UX.

Paymaster smart contracts for ERC-4337 gas fee abstraction.

It’s a win-win for Web3: advertisers gain meaningful reach, and users enjoy free transactions.

How it's Made

This project is built on a fully decentralized, production-grade infrastructure deployed on the Polygon Mainnet. We used a combination of on-chain smart contracts, AI agents, cloud services, and SDKs to create a smooth, gasless experience powered by attention-based ad incentives.

🧱 Core Technologies & Architecture: Polygon Mainnet: The smart contracts for ad placement, Paymaster logic (ERC-4337), and tracking are deployed on Polygon, taking advantage of its scalability and low transaction fees.

Multibaas: This was the backbone of our contract querying system. We used Multibaas to:

Index events from our deployed contracts (e.g., new ad spots, ad views, reimbursements).

Fetch contract method results (e.g., getAvailableAdSpots) via a REST API.

Provide a secure and scalable bridge between on-chain state and off-chain AI agents.

Ad Recommendation System:

Ad data (name, description, video IPFS link) and smart contract ad spots are fed into an AI agent built with the Covalent AI Agent SDK.

The agent analyzes description similarity and chooses the best matching spot for the ad using natural language processing (NLP).

AI Agent Infrastructure:

Built using the Covalent AI Agent SDK with OpenAI GPT-4o-mini.

Agents are deployed on the server and use secure cloud wallets to manage ad deployments and funds.

The agent performs intelligent reasoning, choosing the best contract spot and executing deployment logic securely.

MetaMask Snap:

A custom MetaMask Snap was created to show contextually relevant ads to users during Web3 interactions.

The Snap connects to the backend to pull ad data and opens the video link hosted on IPFS.

IPFS:

Ad videos are uploaded to IPFS, and their CIDs are stored on-chain. This ensures decentralized media storage with verifiable integrity.

Paymaster Smart Contract:

A custom ERC-4337-compatible Paymaster contract reimburses users' gas fees after they watch an ad.

This mechanism links the ad view (event-logged) to the user’s transaction, enabling a true "watch-to-transact" experience.

Event-Driven Ad View Tracking:

When a user watches an ad, we emit an on-chain event.

These events are indexed via Multibaas to verify ad consumption and trigger Paymaster logic.

Secure Wallet Infrastructure:

The AI agent uses a cloud wallet to securely handle deployments and fund transfers on behalf of advertisers.

background image mobile

Join the mailing list

Get the latest news and updates