Image Marketplace
The ImageMarketplace contract enables publishing, discovering, and monetizing VM images on the aleph-onchain network.
Overview
VM image creators can publish their images on-chain, set pricing, and earn revenue when compute providers use them. Users discover images through the marketplace, view ratings, and select the best fit for their workloads.
Publishing Images
// Publish a VM image to the marketplace
marketplace.publishImage(
content_hash, // Content hash of the image
metadata_cid, // IPFS CID with description, tags, etc.
price_per_use, // Price per job using this image
revenue_share_bps, // Revenue share with compute provider
).send().await?;
Image Discovery
The marketplace supports browsing by category, searching by tags, and sorting by ratings or usage count.
// Query available images
let images = marketplace
.getImagesByCategory("machine-learning")
.call().await?;
// Get image details
let details = marketplace
.getImage(image_id)
.call().await?;
Ratings & Reviews
Users can rate images after using them. Ratings are stored on-chain and influence marketplace ranking.
// Rate an image (1-5 stars)
marketplace.rateImage(
image_id,
5, // rating (1-5)
"Excellent base image for web apps".into(),
).send().await?;
Revenue Sharing
When a job uses a marketplace image, the payment is split:
- Image creator receives their configured
price_per_use - Compute provider receives the job payment minus image fee
- Split is configured per-image via
revenue_share_bps
Security Auditing
The aleph-audit crate provides tools for scanning and verifying image security:
- Vulnerability scanning of image contents
- Signature verification for publisher identity
- Compliance checks against security policies
- Automated security scoring
Image publishers are identified by their Ethereum address. The marketplace tracks publisher reputation through usage statistics and user ratings. Images from verified publishers receive a trust badge.