/abstract-skills:myriad-on-abstractfrom abstract-skills
Integrates Myriad Protocol prediction markets on Abstract chain using REST API for market data and polkamarkets-js SDK for trading outcome shares, with builder revenue sharing via referralBuy.
Ships in abstract-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Myriad Protocol is a prediction market platform live on Abstract (and Linea, BNB Chain). Integrate it to show market data, let users trade outcome shares, and earn revenue from buy volume.
| Layer | Tool | Use For |
|---|---|---|
| Read-only data | REST API V2 | Market listings, prices, charts, portfolio, events |
| Trading | polkamarkets-js SDK | Buy/sell shares, claim winnings, ERC-20 approvals |
| Revenue | referralBuy + builder code | Earn distributor fee (typically 1%) on buy volume |
Base URL: https://api-v2.myriadprotocol.com/
Auth: x-api-key: <your_api_key> (or ?api_key=<your_api_key>)
Rate limit: 50 req/s per IP/key
Contact the Myriad team to obtain an API key.
// 1. Fetch open markets on Abstract
const res = await fetch(
"https://api-v2.myriadprotocol.com/markets?network_id=2741&state=open&sort=volume_24h&limit=10",
{ headers: { "x-api-key": "<your_api_key>" } }
);
const { data: markets } = await res.json();
// 2. Get a buy quote for a specific outcome
const quote = await fetch("https://api-v2.myriadprotocol.com/markets/quote", {
method: "POST",
headers: { "Content-Type": "application/json", "x-api-key": "<your_api_key>" },
body: JSON.stringify({
market_id: 164,
outcome_id: 0,
network_id: 2741,
action: "buy",
value: 100,
slippage: 0.01,
}),
});
// Returns: shares, price_before, price_after, calldata, fees
// 3. Execute via SDK (see references/sdk.md) or send calldata directly
const claim = await fetch("https://api-v2.myriadprotocol.com/markets/claim", {
method: "POST",
headers: { "Content-Type": "application/json", "x-api-key": "<your_api_key>" },
body: JSON.stringify({ market_id: 164, network_id: 2741 }),
});
// Returns: action ("claim_winnings" | "claim_voided"), outcome_id, calldata
| Task | Use |
|---|---|
| Display market listings, prices, charts | API — GET /markets |
| Show user portfolio / positions | API — GET /users/:address/portfolio |
| Get trade quotes + calldata | API — POST /markets/quote |
| Execute trades from a backend/agent | SDK — pm.buy() / pm.sell() |
| Execute trades from a dapp with wallet | API calldata + wallet sendTransaction |
| Earn revenue on buy volume | SDK — pm.referralBuy() with builder code |
| Claim winnings after resolution | SDK — pm.claimWinnings() or API calldata |
| Contract | Mainnet | Testnet |
|---|---|---|
| PredictionMarket | 0x3e0F5F8F5Fb043aBFA475C0308417Bf72c463289 | 0x6c44Abf72085E5e71EeB7C951E3079073B1E7312 |
| PredictionMarketQuerier | 0x1d5773Cd0dC74744C1F7a19afEeECfFE64f233Ff | 0xa30c60107f9011dd49fc9e04ebe15963064eecc1 |
| Token | Mainnet | Testnet |
|---|---|---|
| USDC.e | 0x84A71ccD554Cc1b02749b35d22F684CC8ec987e1 | 0x8820c84FD53663C2e2EA26e7a4c2b79dCc479765 |
| PENGU | 0x9eBe3A824Ca958e4b3Da772D2065518F009CBa62 | 0x6ccDDCf494182a3A237ac3f33A303a57961FaF55 |
| PTS | 0x0b07cf011b6e2b7e0803b892d97f751659940f23 | 0x6cC39C1149aed1fdbf6b11Fd60C18b96446cBc96 |
Builders earn the distributor_fee (typically 1%) on eligible buy trades by using referralBuy with a whitelisted builder code. Must apply for whitelisting with the Myriad team.
See references/revenue-sharing.md for full integration details.
erc20.approve() for the PredictionMarket contract before any buy/sellvalue only — the amount of the collateral token to spend (not shares)value or shares — provide exactly one, not bothreferralBuy works on any market — calling it without a whitelisted code is safe, it just won't earn revenuenetwork_id is required on most API calls — use 2741 for Abstract mainnet, 11124 for testnetdecimals() before formatting amounts| Topic | Where to look |
|---|---|
| Full REST API reference | references/api-v2.md |
| polkamarkets-js SDK | references/sdk.md |
| Revenue sharing integration | references/revenue-sharing.md |
| All contract addresses (multi-chain) | references/contracts.md |
What SKILL.md sets; muted values are Claude Code's defaults
Generated from the plugin's indexed repository (abstract-foundation/abstract-skills) — no native marketplace selected
npx claudepluginhub p/abstract-foundation-abstract-skills7 skills in this plugin
/abstract-global-walletIntegrate Abstract Global Wallet (AGW) into React applications — email/social/passkey login, smart contract wallet, session keys, gas sponsorship, and wallet provider integrations for the Abstract Ethereum L2. This skill should be used when working with AGW, AbstractWalletProvider, useLoginWithAbstract, useAbstractClient, useWriteContractSponsored, agw-react, agw-client, create-abstract-app, session keys on Abstract, or gas-sponsored transactions on Abstract./connecting-to-abstractAbstract network configuration — chain IDs, RPC endpoints, WebSocket URLs, block explorers, and wallet setup for the Abstract Ethereum L2. This skill should be used when configuring clients, wallets, or dev environments for Abstract, including questions about Abstract RPC URLs, chain IDs (2741/11124), testnet config, Abscan explorer, connecting to the Abstract network, or importing abstract/abstractTestnet from viem/chains./deploying-contracts-on-abstractDeploy smart contracts on Abstract using Foundry (default) or Hardhat. Covers zksolc compilation, deployment, Abscan verification, and testnet faucets for the Abstract Ethereum L2. This skill should be used when deploying or compiling contracts on Abstract, using forge/foundry-zksync, forge build --zksync, forge create --zksync, anvil-zksync, verifying on Abscan, or working with the zkSync compiler on Abstract./erc8004-on-abstractRegister AI agents, track reputation, and discover agents on Abstract using ERC-8004 — the onchain identity and reputation protocol for trustless agent economies. This skill should be used when registering an agent onchain, querying agent reputation, giving feedback to an agent, working with IdentityRegistry or ReputationRegistry on Abstract, ERC-8004, agent discovery, or onchain agent identity./safe-multisig-on-abstractCreate and manage Safe multi-signature wallets on Abstract — deploy new Safes, configure owners and thresholds, propose and execute multi-sig transactions using the Safe SDK or the Safe UI. This skill should be used when working with Safe on Abstract, creating a multisig wallet on Abstract, safe.abs.xyz, Safe Protocol Kit on Abstract, multi-sig transactions, SafeL2, SafeProxyFactory, or managing shared wallets with multiple signers on Abstract./using-agw-mcpGive AI agents wallet capabilities on Abstract via the Abstract Global Wallet MCP server — read chain data, check balances, and (coming soon) send transactions on behalf of users. This skill should be used when setting up agw-mcp, giving AI agents wallet access on Abstract, or building MCP-powered agent workflows that interact with Abstract chain data.Other plugins' skills for the same job