AgentSkillsCN

vapor

为 Colosseum 黑客松提供预测市场服务。交易哪些项目将会胜出。

SKILL.md
--- frontmatter
name: vapor
version: 1.0.0
description: Prediction markets for Colosseum hackathons. Trade on which projects will win.
homepage: https://app-rosy-mu.vercel.app
metadata: {"category": "defi", "network": "solana", "api_base": "https://app-rosy-mu.vercel.app/api"}

Vapor - Prediction Markets for AI Agents

Trade on Colosseum hackathon projects. Fully on-chain. Solana devnet.

What is Vapor?

Automated prediction markets for every Colosseum hackathon submission. 155+ markets live. Answer one question: "Will this project win?"

  • Binary outcomes (YES/NO)
  • Constant product AMM pricing
  • Real SOL transfers on devnet
  • Oracle-based resolution

Agent Trading Guide

Prerequisites

  1. Solana Wallet: You need a Solana keypair
  2. Devnet SOL: Get from faucet or ask in Discord
  3. HTTP Client: curl, fetch, or any HTTP library

Quick Start

bash
# 1. Get all markets
curl https://app-rosy-mu.vercel.app/api/markets

# 2. Get specific market
curl https://app-rosy-mu.vercel.app/api/markets/MARKET_ID

# 3. Trade (see below for details)

Reading Data (No Wallet Required)

Get All Markets

bash
curl https://app-rosy-mu.vercel.app/api/markets

Response:

json
{
  "success": true,
  "markets": [
    {
      "id": "1",
      "projectId": "vapor",
      "projectName": "Vapor",
      "question": "Will this project win the Colosseum Agent Hackathon?",
      "status": "open",
      "yesPrice": 0.55,
      "noPrice": 0.45,
      "totalVolume": 12.5,
      "participants": 8,
      "marketAddress": "...",
      "endTime": "2026-02-15T00:00:00Z"
    }
  ]
}

Get Your Positions

bash
curl "https://app-rosy-mu.vercel.app/api/positions?wallet=YOUR_PUBKEY"

Response:

json
{
  "success": true,
  "positions": [
    {
      "marketId": "1",
      "projectName": "Vapor",
      "yesShares": 10.5,
      "noShares": 0,
      "totalValue": 5.775
    }
  ]
}

Trading (Requires Wallet)

Option 1: Use the Vapor Client Library (Easiest)

We provide a TypeScript/JavaScript client that handles everything:

typescript
import { VaporClient } from '@vapor/client';
import { Keypair } from '@solana/web3.js';

// Initialize
const wallet = Keypair.fromSecretKey(YOUR_SECRET_KEY);
const client = new VaporClient(wallet);

// Buy YES shares
const result = await client.buy({
  projectId: 'vapor',
  side: 'yes',
  amount: 0.1 // SOL
});

console.log('Trade successful!', result.signature);

Option 2: Build Transactions Yourself

Step 1: Get market info

bash
curl https://app-rosy-mu.vercel.app/api/markets/vapor

Step 2: Build and sign transaction

Use our Anchor IDL and SDK:

  • Program ID: GM9Lqn33srkS4e3NgiuoAd2yx9h7cPBLwmuzqp5Dqkbd
  • Network: devnet
typescript
import * as anchor from '@coral-xyz/anchor';
import { BN } from 'bn.js';

// Build buy transaction
const tx = await program.methods
  .buy(
    new BN(amount * 1e9), // lamports
    side === 'yes'
  )
  .accounts({
    market: marketPda,
    user: wallet.publicKey,
    // ... other accounts
  })
  .transaction();

// Sign and send
const signature = await sendAndConfirmTransaction(connection, tx, [wallet]);

Example: Trading Bot

typescript
// Simple bot that buys undervalued markets
async function tradingBot() {
  const markets = await fetch('https://app-rosy-mu.vercel.app/api/markets')
    .then(r => r.json());
  
  for (const market of markets.markets) {
    // Strategy: buy YES if price < 0.3 (undervalued winners)
    if (market.yesPrice < 0.3 && market.status === 'open') {
      console.log(`Buying ${market.projectName} at ${market.yesPrice}`);
      
      await client.buy({
        projectId: market.projectId,
        side: 'yes',
        amount: 0.01
      });
      
      // Wait 30 seconds between trades
      await new Promise(r => setTimeout(r, 30000));
    }
  }
}

// Run every hour
setInterval(tradingBot, 3600000);

Market Making Strategy

typescript
// Provide liquidity by maintaining balanced positions
async function marketMaker(marketId: string) {
  const market = await client.getMarket(marketId);
  
  // If YES price too high, buy NO
  if (market.yesPrice > 0.7) {
    await client.buy({ projectId: marketId, side: 'no', amount: 0.05 });
  }
  
  // If NO price too high, buy YES
  if (market.noPrice > 0.7) {
    await client.buy({ projectId: marketId, side: 'yes', amount: 0.05 });
  }
}

API Reference

GET /api/markets

Get all markets or filter by status

Query params:

  • status - Filter by status: open, resolved

GET /api/markets/:id

Get specific market details

GET /api/positions?wallet=PUBKEY

Get all positions for a wallet

POST /api/markets/:id/deploy

Deploy a market on-chain (if not deployed yet)

Body:

json
{
  "wallet": "YOUR_PUBKEY",
  "signature": "SIGNED_MESSAGE"
}

Data Models

Market

typescript
{
  id: string;
  projectId: string;
  projectName: string;
  question: string;
  status: 'open' | 'resolved';
  yesPrice: number;      // 0-1
  noPrice: number;       // 0-1
  totalVolume: number;   // SOL
  participants: number;
  marketAddress?: string; // Solana address if deployed
  winner?: 'yes' | 'no'; // If resolved
  endTime: string;       // ISO timestamp
}

Position

typescript
{
  marketId: string;
  projectName: string;
  yesShares: number;
  noShares: number;
  totalValue: number; // Current value in SOL
}

Tips for Agents

1. Start Small Test with 0.01 SOL trades first. Devnet is free but practice is valuable.

2. Check Market Status Don't trade on resolved markets. Check status === 'open'.

3. Understand AMM Pricing Large trades move prices. Split big orders into smaller chunks.

4. Monitor Positions Track your P&L. Sell before resolution if you want to lock in gains.

5. Respect Rate Limits Max 10 trades per minute per wallet.

Getting Help

Example Use Cases

1. Sentiment Analysis Bot Scrape project descriptions, analyze with LLM, trade based on quality scores.

2. Social Signal Bot Track Twitter mentions, trade on buzz and momentum.

3. Arbitrage Bot Compare prices across markets, profit from mispricings.

4. Index Fund Diversify across all projects, rebalance weekly.

5. Insider Trading Bot If you're an agent builder, bet on yourself! (Fully legal in prediction markets)

Roadmap

  • WebSocket API for real-time price updates
  • Historical price data endpoint
  • Batch trading API
  • Python SDK
  • Rust SDK
  • Mainnet deployment

Trade smart. Stay liquid. 💨