Pular para o conteúdo
Skillpedia
Diversos7,0 mil · #13672

pnp-markets-solana

O que ela faz

Esta skill trata da criação e da execução de mercados de previsão na Solana, com qualquer token como garantia. É para desenvolvedores e criadores de agentes que querem lançar ou negociar mercados de resultado binário.

Quando usar

  • ✓Quando você quer criar um mercado de previsão na Solana.
  • ✓Quando você precisa negociar tokens de resultado SIM ou NÃO, ou liquidar um mercado como oráculo.
  • ✓Quando você quer um mercado de redes sociais, como um baseado em dados do Twitter ou do YouTube.

Link da skill

https://github.com/internet-court/internet-court-skill/blob/main/vendored/pnp/pnp-solana/SKILL.md

Copie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.

Como usar

O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.

Mensagem pronta para colar

Use esta skill para me ajudar: https://github.com/internet-court/internet-court-skill/blob/main/vendored/pnp/pnp-solana/SKILL.md Leia o arquivo SKILL.md desse link e siga as instruções dele na minha tarefa.
Quer que a sua IA encontre skills como esta sozinha?Instale o MCP grátis do Skillpedia: uma linha, e ela pesquisa entre 15.000+ skills antes de cada tarefa.Instalar em 1 minuto →

Exemplo do que pedir para a IA

“Você pode me ajudar a criar um mercado de previsão na Solana sobre se um token vai atingir uma meta de preço até o próximo mês?”

5 skills novas por semana. 1 minuto de leitura.

Como funciona

O agente trabalha com o tipo de mercado que você escolher, como AMM, peer-to-peer ou oráculo personalizado, e define a pergunta, a garantia e as regras de resolução. Depois ajuda com a negociação, a liquidação e o resgate de posições vencedoras.

Conteúdo técnico (SKILL.md original)

Texto original do autor, em inglês, direto do GitHub.

PNP Markets (Solana)

Create and manage prediction markets on Solana with any SPL token collateral. Supports V2 AMM markets, P2P direct bets, custom oracle resolution for AI agents, and social media markets (Twitter, YouTube, DeFiLlama).

When to Use This Skill

Use when the user wants to:

  • Create prediction markets on Solana (V2 AMM, P2P, or custom oracle)
  • Trade on markets (buy/sell YES/NO outcome tokens)
  • Settle markets as an oracle after the trading period ends
  • Redeem winning positions after settlement
  • Create social media markets (Twitter engagement, YouTube views, DeFiLlama metrics)
  • Use custom tokens as prediction market collateral (any SPL token including Token-2022)
  • Build autonomous AI agents that create, trade, and resolve markets
  • Build info finance infrastructure using market prices as probability signals

Triggers: prediction market, betting, oracle, settlement, forecast, YES/NO, outcome token, market resolution, P2P bet, custom oracle, social media market, autonomous market, info finance, market creation, prediction, wager, binary outcome

Do not use when:

  • The task is generic Solana wallet operations (use solana-dev-skill instead)
  • The task is token swaps/DEX trading without prediction markets (use jupiter-skill)
  • The task is NFT-related (use metaplex-foundation/skill)
  • The task is about other prediction market protocols (use their specific skill)

Program IDs & Core Constants

Item Address Notes
PNP Program (Mainnet) 8PyE2dizL52ga7ytqLtqRyjwWp4yXEx8M5Z4BAHgHuTb Main prediction market program
PNP Program (Devnet) pnpkv2qnh4bfpGvTugGDSEhvZC7DP4pVxTuDykV3BGz Devnet testing program
USDC Mint EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v Common collateral (6 decimals)
USDT Mint Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB Alternative stable (6 decimals)
WSOL Mint So11111111111111111111111111111111111111112 Wrapped SOL (9 decimals)

Precision Reference

Token Type Decimals Example
USDC / USDT 6 1 USDC = 1_000_000n
SOL (wrapped) 9 1 SOL = 1_000_000_000n
Decision tokens (YES/NO) 6 Minted per-market by the program
// Conversion helpers
const usdcToRaw = (amount: number) => BigInt(Math.floor(amount * 1_000_000));
const daysFromNow = (days: number) => BigInt(Math.floor(Date.now() / 1000) + days * 86400);

// Example
const liquidity = usdcToRaw(100);  // 100 USDC -> 100_000_000n
const endTime = daysFromNow(7);    // 7 days from now -> Unix timestamp as bigint

[!IMPORTANT] Collateral can be any SPL token or Token-2022 token. Pass the token's mint address as baseMint or collateralTokenMint. Make sure to use the correct decimals for the chosen token (e.g., USDC/USDT = 6, SOL = 9). Common mints are listed in the table above for reference.


Prerequisites

  1. Solana Wallet: Base58-encoded private key with SOL for fees (~0.05 SOL minimum)
  2. Collateral Tokens: Any SPL token (including Token-2022) for market liquidity — USDC, USDT, SOL, or any custom token
  3. RPC Endpoint: Mainnet RPC URL (public or dedicated like Helius/QuickNode)
# Install dependencies
cd scripts && npm install

# Set environment variables
export PRIVATE_KEY=<base58_private_key>
export RPC_URL=https://api.mainnet-beta.solana.com  # or dedicated RPC

Quick Start

import { PNPClient } from 'pnp-sdk';
import { PublicKey } from '@solana/web3.js';

const client = new PNPClient(
  process.env.RPC_URL || 'https://api.mainnet-beta.solana.com',
  process.env.PRIVATE_KEY!  // Base58 string or Uint8Array
);

// Collateral can be any SPL token (including Token-2022) — use the mint address of your chosen token
const USDC = new PublicKey('EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v');

// Create a prediction market
const result = await client.market.createMarket({
  question: 'Will Bitcoin reach $100K by end of 2025?',
  initialLiquidity: 1_000_000n,  // 1 USDC (6 decimals) — adjust decimals for your collateral token
  endTime: BigInt(Math.floor(Date.now() / 1000) + 30 * 24 * 60 * 60),
  baseMint: USDC,  // Any SPL or Token-2022 mint
});

console.log('Market created:', result.market.toBase58());
// Returns: { signature: string, market: PublicKey }

[!TIP] Use `PNPClient.parseSecretKey(process.env.PRIV

Perguntas frequentes

Que tipos de mercado ela cobre?

A skill cobre mercados AMM V2, apostas peer-to-peer e mercados com oráculo personalizado.

Posso usar qualquer token como garantia?

Sim. A skill diz que qualquer token SPL, incluindo os Token-2022, pode ser usado.

Ela serve para trocas genéricas de tokens?

Não. A skill diz que trocas de tokens sem mercados de previsão pertencem a outra skill.

Detalhes

Descrição original do autor

Create, trade, and settle permissionless prediction markets on Solana. Use when building prediction market infrastructure, creating social media markets (Twitter/YouTube/DeFiLlama), setting up custom oracle resolution, P2P betting, or autonomous agent-driven forecasting. Supports V2 AMM, P2P (V3), and custom oracle markets with any SPL token collateral (including Token-2022).

repo: internet-court/internet-court-skill

Popularidade

Estrelas no GitHub
7,0 mil
Posição no ranking
#13672
Licença
—
Atualizada em
26/10/2026

Essa skill é útil?

0

Entre para votar.

Comentários

  • …

Mais skills deste repositório

Skills parecidas