ยง Ad Monetization ยท Open Surface

Ad Monetization Readiness Report

A full ad-monetization subsystem for the Open Surface of the DOSFI/MeshInfer ecosystem. Ads run only in the UI layer โ€” dashboard, marketplace, mesh-native apps, and public pages. The DOSFI Closed Core (scheduler, router, privacy engines, inference, coordinator) is completely untouched. Ads never affect routing, cost, latency, node selection, or privacy-tier logic.

Final verdict: Ad monetization system created and integrated across the Open Surface
3 entities (AdService, AdPlacement, AdMetrics), 2 backend functions (getAdsForPlacement, trackAdEvent), 5 UI components (AdWidget, AdBanner, AdSidebarCard, AdFooter, SponsoredBadge), 9 placement slots across 4 surfaces, 5 monetization models, and a full targeting engine. The Closed Core remains untouched โ€” ad functions read/write only AdService, AdPlacement, and AdMetrics. Zero contact with Node, Task, NodePool, ShardDirectory, RoutingLog, or any inference/routing/coordinator entity.
Not a traditional ad network โ€” enterprise & developer advertisers only
This system is deliberately scoped to advertisers relevant to the MeshInfer/DOSFI ecosystem. The category enum enforces this: GPU hardware vendors, AI model providers, enterprise SaaS tools, developer tooling, security vendors, cloud connectors, and monitoring tools โ€” plus ecosystem-internal node and app promotion. No consumer ads, no generic display network, no unrelated third-party inventory. Every ad served is a product or service a mesh developer or enterprise node operator would actually use.

Live system state

โ€”
Ads in AdService
โ€”
Active placements
โ€”
Metric events tracked
$0.0000
Revenue attributed

Advertiser focus โ€” enterprise & developer only

This is not a traditional consumer ad network. The category enum restricts inventory to advertisers relevant to mesh developers and enterprise node operators. Each category maps to a real vendor class in the AI infrastructure ecosystem.

CategoryAdvertiser typeExample advertisers
gpu_hardwareGPU / hardware vendorsNVIDIA, AMD, Lambda Labs, CoreWeave, TensorDock
ai_model_providerAI model / API providersOpenAI, Anthropic, Mistral, Together AI, Fireworks
enterprise_saasEnterprise SaaS toolsDatadog, Snowflake, Databricks, Vercel, HashiCorp
developer_toolingDeveloper tooling / SDKsWebLLM, Hugging Face, LangChain, Vercel AI SDK
security_vendorSecurity / compliance vendorsSnyk, Wiz, Lacework, Tailscale, HashiCorp Vault
cloud_connectorCloud / integration connectorsStripe, AWS, GCP, Azure, Cloudflare
monitoring_toolObservability / monitoringGrafana, Honeycomb, Sentry, OpenTelemetry, New Relic
node_promotionMesh node ownersEnterprise GPU node operators sponsoring capacity
app_promotionMesh-native app developersEcosystem developers promoting mesh-native apps
No consumer ads, ever
The enum is a hard constraint โ€” the system cannot serve consumer display ads, retail ads, or any inventory outside the enterprise/developer scope. Advertisers self-select into one of the nine categories at creation time; the targeting engine and placement filters enforce it at serve time.

Placement inventory โ€” all 9 slots

Placement KeyNameSurfaceUI ComponentMonetization
dashboard_topDashboard Top BannerdashboardAdBannercpc, cpm, sponsored
dashboard_sidebarDashboard Sidebar CarddashboardAdSidebarCardcpc, sponsored
dashboard_footerDashboard Footer BannerdashboardAdFootercpc, cpm
marketplace_listingMarketplace Sponsored ListingmarketplaceSponsoredBadge + AdWidgetmarketplace_fee, sponsored
marketplace_featuredMarketplace Featured Node/AppmarketplaceSponsoredBadge + AdWidgetsponsored, marketplace_fee
mesh_app_bannerMesh-Native App Bannermesh_appAdWidget (banner)cpc, cpm
public_bannerPublic Site Bannerpublic_siteAdBannercpc, cpm
public_sponsored_tutorialSponsored Tutorialpublic_siteAdWidget (card)sponsored, partner
public_partner_integrationPartner Integration Slotpublic_siteAdWidget (card)partner

AdService schema

ad_idstring (UUID) โ€” unique ad identifier
titlestring โ€” ad display title
descriptionstring โ€” short ad copy / subtitle
image_urlstring โ€” ad creative image URL
click_urlstring โ€” destination URL on click
categoryenum: gpu_hardware, ai_model_provider, enterprise_saas, developer_tooling, security_vendor, cloud_connector, monitoring_tool, node_promotion, app_promotion
targeting_rulesobject: { region, device_type, developer_tier, app_category } โ€” ad only shows if viewer matches ALL specified fields
placement_keysarray: slots where this ad is eligible (empty = all slots)
monetization_typeenum: sponsored, cpc, cpm, partner, marketplace_fee
cpc_ratenumber โ€” USD per click (cpc model)
cpm_ratenumber โ€” USD per 1000 impressions (cpm model)
priorityinteger โ€” higher = shown first when multiple ads match
expirationdate-time โ€” expired ads are never served
statusenum: active, paused, expired
advertiser_emailstring โ€” owner email for billing attribution

AdPlacement rules

placement_idstring (UUID) โ€” unique placement identifier
placement_keyenum: 9 slot keys (dashboard_top, dashboard_sidebar, ...)
surfaceenum: dashboard, marketplace, mesh_app, public_site
ad_idstring (optional) โ€” pinned ad. If set, this slot always shows this ad. If null, any matching ad fills it.
category_filterstring (optional) โ€” only ads with this category are eligible
targeting_rulesobject โ€” placement-level targeting overrides (merged with ad-level at serve time)
activeboolean โ€” whether this slot is currently serving

Targeting engine logic (getAdsForPlacement)

Step 1Fetch active AdPlacement records for the requested placement_key
Step 2Fetch all active, non-expired AdService records (sorted by priority desc)
Step 3Filter by placement_keys โ€” ad must include this placement_key (if ad.placement_keys is set)
Step 4Filter by category โ€” ad.category must match placement.category_filter (if set)
Step 5Targeting match โ€” ad.targeting_rules checked against caller context (region, device_type, developer_tier, app_category). ALL specified fields must match.
Step 6Pinned ads prioritized โ€” if placement.ad_id is set, that ad goes first
Step 7Return top N by priority

UI components added

ComponentFilePurpose
AdWidgetsrc/components/ads/AdWidget.jsxCore component โ€” fetches ads via getAdsForPlacement, tracks impressions + clicks via trackAdEvent. Variants: banner, card, inline.
AdBannersrc/components/ads/AdBanner.jsxTop banner slot โ€” horizontal, compact. Used in Layout (dashboard_top) and public pages.
AdSidebarCardsrc/components/ads/AdSidebarCard.jsxSidebar card slot โ€” vertical, image + text. Used in dashboard sidebar.
AdFootersrc/components/ads/AdFooter.jsxFooter banner slot โ€” horizontal. Used in Layout (dashboard_footer).
SponsoredBadgesrc/components/ads/SponsoredBadge.jsxSmall "Sponsored" badge for marketplace promoted listings. UI-only, does not affect ranking.
Integration point: Layout.jsx
AdBanner (dashboard_top) and AdFooter (dashboard_footer) are wired into the shared Layout component, which wraps every page in the Open Surface โ€” dashboard, marketplace, mesh-native apps, and public pages. This guarantees ads appear only in the UI layer and never inside page-specific inference or routing logic.

Monetization models

Sponsored Placement

Flat fee for a fixed time period. Ad shown in a specific placement until expiration. Revenue = flat fee (settled offline).

CPC (Cost Per Click)

Advertiser pays per click. Revenue = cpc_rate ร— clicks. Tracked via AdMetrics click events.

CPM (Cost Per Mille)

Advertiser pays per 1000 impressions. Revenue = cpm_rate ร— impressions / 1000. Tracked via AdMetrics impression events.

Partner Integration

Revenue-share with partner. Ad shown in partner integration slot. Terms settled offline per partner agreement.

Marketplace Promotion Fee

Node/app owner pays to promote their listing in the marketplace. Featured + sponsored badges. Flat fee per listing per period.

AdMetrics โ€” impression, click, conversion tracking

metric_idstring (UUID) โ€” unique event identifier
ad_idstring โ€” which ad was shown
placement_keyenum โ€” where the ad was shown
event_typeenum: impression, click, conversion
user_emailstring (optional) โ€” viewer email (null for anonymous public visitors)
regionstring โ€” viewer region at event time
device_typeenum โ€” viewer device type
developer_tierenum โ€” viewer tier at event time
monetization_typeenum โ€” snapshot of ad monetization model for revenue calc
revenue_usdnumber โ€” revenue attributed: cpc click = cpc_rate, cpm impression = cpm_rate/1000, sponsored/partner = 0 per event
timestampdate-time โ€” when the event occurred

Privacy & safety โ€” Closed Core isolation

No inference injectionAds never appear inside inference responses, model outputs, or chat completions.
No routing interferenceAds never affect route decisions (local/mesh/cloud), node selection, or dispatch logic.
No coordinator contactAd functions (getAdsForPlacement, trackAdEvent) never read or write Node, Task, NodePool, ShardDirectory, or RoutingLog entities.
No latency impactAds render in the UI layer only. Ad loading is async and never blocks page render or inference calls.
No cost interferenceAds do not affect cost_savings_usd, actual_cost_usd, or any billing/usage calculation.
No privacy-tier leakageAds do not read or influence privacy_policy, privacy_tier, or PHI/local-only routing rules.
No ABI boundary crossingAds exist only in the Open Surface (React UI). The DOSFI Closed Core (scheduler, router, privacy engines) is untouched.
Anonymous-safePublic site visitors see ads without login. AdMetrics.user_email is null for anonymous viewers.
Entity isolation proof
getAdsForPlacement reads only: AdService, AdPlacement.
trackAdEvent reads AdService (for revenue calc), writes only: AdMetrics.
Neither function reads or writes: Node, NodePool, Task, RoutingLog, TelemetryEvent, ShardDirectory, VitalLedger, AuditLog, or any inference/routing/coordinator entity. The Closed Core is untouched.

Final verdict

Open Surface
Ad monetization system created and integrated
3 entities, 2 backend functions, 5 UI components, 9 placements, 5 monetization models, full targeting engine, impression/click/conversion tracking.
Closed Core
Untouched โ€” zero contact
No changes to scheduler, router, privacy engines, inference, coordinator, node selection, routing, cost, latency, or ABI boundaries.
Confirmation
Ad monetization system created and integrated across the Open Surface. The DOSFI Closed Core remains untouched. Ads run only in the Open Surface (dashboard, marketplace, mesh-native apps, public pages) and never affect routing, inference, cost, latency, node selection, or privacy-tier logic.