solana-binary-markets — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited solana-binary-markets (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
A binary market is a market with exactly two outcomes — YES or NO — that resolves to one of them at a known future time. Each side is represented as a token (YES token / NO token) that pays out $1 at resolution if the side wins, $0 if it loses. While a market is live, the YES token trades between $0 and $1, and its price is the market's implied probability of YES:
Onchain binary markets are useful because they aggregate forecasts into a single, tradeable, oracle-friendly probability that any other smart contract can read. Polymarket popularized them on EVM; in 2025–2026 the action moved to Solana for three reasons (per Helius CEO @mert listing "onchain binary markets, especially for tail assets" as a top-5 Solana priority):
| Venue | Model | Best for | SDK |
|---|---|---|---|
Drift BET (app.drift.trade/bet) | Perp-style YES/NO with CLOB (price clamped 0–1) | Liquid crypto / macro markets, leverage, cross-collateral | @drift-labs/sdk |
DFlow → Kalshi (pond.dflow.net) | Tokenized Kalshi markets (real SPL outcome tokens) routed via DFlow JIT router | Thousands of long-tail real-world markets (sports, politics, weather, econ) | REST API (no SDK needed) |
| Hxro Parimutuel | Pooled parimutuel — winners split the pool | Short-duration price events (BTC up/down in 5 min), gaming | @hxronetwork/parimutuelsdk |
Skip these — they came up in research but are not viable targets: - Monaco Protocol / BetDEX — SDK repo archived Nov 2025 - Limitless — runs on Base, not Solana - Polymarket — has not launched a native Solana deployment as of May 2026; the closest thing is Kalshi-on-Solana via DFlow
Trigger this skill when the user wants to:
node --version to check)npm i @solana/web3.js@^1.95Keypair loaded from a base58 secret or JSON file. Never commit secrets; read from process.env.SOLANA_SECRET or a local ~/.config/solana/id.json.EPjFWdd5AufqSSqeM2qN1xzybapC8GZsdLPi7Ut5GtT (note: outcome tokens on DFlow settle against this mint). Bridge from Ethereum via Wormhole/CCTP or buy on a Solana DEX — do not use the Wormhole-wrapped USDCet, the venues here want canonical Circle USDC.npm i @drift-labs/sdk @coral-xyz/anchornpm i @hxronetwork/parimutuelsdk@solana/web3.js for signingOutcome tokens. On DFlow/Kalshi, each market mints two SPL tokens: a YES mint and a NO mint. You buy them with USDC at the current market price. At resolution, the winning token redeems 1:1 for USDC; the losing token is worthless. Because they are normal SPL tokens, you can transfer, LP, or borrow against them like any other token.
AMM vs CLOB.
Oracle resolution. Markets resolve when an oracle reports the outcome:
Pricing as probability. The YES token's USDC price is the probability. To convert:
p_yes = yes_price (in USDC, since YES pays $1)p_no = 1 - p_yesp*: edge = p* - p_yes (buy YES if positive)Listing markets. Drift represents prediction markets as perp markets where contractType == Prediction. Use DriftClient.getPerpMarketAccounts() and filter:
const drift = new DriftClient({ connection, wallet, env: 'mainnet-beta' });
await drift.subscribe();
const allPerps = drift.getPerpMarketAccounts();
const predictionMarkets = allPerps.filter(m => 'prediction' in m.contractType);The oracle price on a prediction market is the implied probability of YES, clamped to [0, 1]. Long = bet YES, Short = bet NO. See scripts/list-markets.ts for a runnable example.
Placing a bet. Use DriftClient.placePerpOrder with OrderType.LIMIT and a price between 0 and 1. Market orders work but get filled against the book and can be expensive on thin markets — prefer limits. See scripts/place-bet.ts.
Resolution. When the market expires, your perp PnL = (resolution - entry_price) * size for longs. Close the position with a closing order, or let it auto-settle.
DFlow exposes a REST API; no SDK is needed. Two base URLs (dev — no key required for testing):
https://dev-prediction-markets-api.dflow.nethttps://dev-quote-api.dflow.netProduction requires an x-api-key header (contact DFlow).
Listing markets (browse by category):
GET /api/v1/events?seriesTickers=KXEPLGAME&status=active&withNestedMarkets=trueEach market in the response has yesMint, noMint, yesBid, yesAsk, noBid, noAsk.
Buying outcome tokens — call /order with inputMint=USDC, outputMint=<yesMint or noMint>, amount in USDC base units (6 decimals). DFlow returns a base64 transaction; deserialize, sign, and send.
Redeeming. After resolution (result: "yes" or "no", redemptionStatus: "open"), call /order again with inputMint=<winning outcome mint>, outputMint=USDC. Same endpoint handles both buy and redeem — DFlow detects the input.
Tail-asset coverage. Kalshi tokenized "thousands" of markets through DFlow in late 2025; this is currently the broadest long-tail surface area on Solana (sports, politics, weather, econ, entertainment).
Best for short-duration price-direction markets:
import { ParimutuelWeb3, MAINNET_CONFIG } from '@hxronetwork/parimutuelsdk';
const pari = new ParimutuelWeb3(MAINNET_CONFIG, connection);
const contests = await pari.getContests(/* market pubkey */);You stake into LONG or SHORT pools before lockout, the pool settles against the Pyth price at expiry, and winners split the losing side pro-rata to their stake. No mid-market trading — your only choices are stake size and side.
For genuinely permissionless tail-asset market creation, none of the major Solana venues are fully open today (May 2026) — this is a real gap and an opportunity. The closest path is Hxro on a new Pyth-listed asset.
slippageBps explicitly on DFlow's /order (don't trust auto on illiquid markets).EPjFWdd5AufqSSqeM2qN1xzybapC8GZsdLPi7Ut5GtT. Wormhole-wrapped USDCet (A9mUU4qviSctJVPJdBJWkb28deg915LYJKrzQ19ji3FM) is not accepted by Drift BET or DFlow — you must swap to canonical USDC first (Jupiter handles this in one tx).expiryTs (unix seconds); DFlow shows closeTime and settleTime separately — the market stops trading at closeTime but pays out at settleTime, which can be hours or days later. Don't park capital in a position you can't redeem promptly.scripts/list-markets.ts — fetch and print active Drift BET prediction markets with current YES pricesscripts/place-bet.ts — place a YES or NO bet on a Drift BET market by symbol or market indexreferences/venues-comparison.md — side-by-side venue comparison table (fees, oracles, market creation, tail-asset support, SDK maturity)~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.