All skills
injectivelabs avatar

/injective-rfq-integrations

@af4a540

Integrate Injective RFQ taker flows into browser apps and operational quote monitors. Use this skill when building, reviewing, or debugging RFQ gateway autosign settlement, Web3Gateway AuthZ setup, manual TakerStream quote collection, client-side gateway-style quote selection, RFQ open/close flows, gateway prefetch, optimistic position updates, conditional TP/SL intents, quote uptime probes, market-readiness checks, or mainnet RFQ frontend integrations. Covers mainnet parameters, canonical decimals, quote windows, signer slots, market discovery, quote-hit diagnostics, and production RFQ gotchas.

Use this Skill: https://skilld.dev/gh/injectivelabs/agent-skills/injective-rfq-integrations

This session only. Nothing lands on disk.

README.md

≈1.3k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Injective RFQ Integrations

Integration guide and browser TypeScript examples for adding Injective RFQ taker flows to a frontend application.

This repo is an implementation reference for browser applications that want to add Injective RFQ taker flows:

  • user connects an EVM wallet and derives an Injective address
  • user grants scoped AuthZ once through Web3Gateway fee payer
  • app sends RFQs with a short quote collection window
  • app settles through the RFQ gateway prepared autosign transaction path
  • advanced apps can move gateway-style quote collection and selection into the browser when latency requires it
  • position close is the same RFQ path with margin: "0"
  • TP/SL uses signed RFQ conditional close intents, not orderbook reduce-only orders

The skill is intentionally compact. It points to focused references only when an agent needs implementation detail.

Start Here

Read these in order:

  1. SKILL.md - the full implementation playbook.
  2. references/architecture.md - flow diagrams and state boundaries.
  3. references/client-side-gateway.md - moving gateway/indexer duties into a browser latency path.
  4. references/frontend-rfq-flow.md - quote windows, ACKs, gateway settlement, and manual TakerStream collection.
  5. references/quote-probe-uptime.md - quote uptime probes, market discovery, fanout limits, and frontend eligibility signals.
  6. references/authz-and-autosign.md - grants, ephemeral keys, Web3Gateway fee-payer setup.
  7. references/conditional-tpsl.md - RFQ TP/SL signed intents.
  8. references/troubleshooting.md - common failures.

Recommended Integration Path

Most frontend partners should use the RFQ gateway autosign flow:

  1. Grant AuthZ to a local ephemeral key and to the RFQ contract. Use Web3Gateway fee payer for this wallet-signed setup transaction.
  2. Build a canonical RFQ request from market metadata and mark price.
  3. Call IndexerGrpcRfqGwApi.fetchPrepareAutoSign.
  4. Locally sign the returned TxRaw with the ephemeral autosign key.
  5. Insert the gateway fee-payer signature.
  6. Broadcast via TxGrpcApi.broadcast.
  7. For TP/SL, sign SignedTakerIntent EIP-712 and submit conditional orders.

Use client-side gateway mode only when latency or custom quote selection is worth owning ACK mapping, quote filtering, sequence readiness, broadcast timing, optimistic state, and reconciliation in the browser.

Production Lessons

  • Do not rebuild the gateway transaction. Sign the returned bodyBytes and authInfoBytes exactly.
  • Prepared tx signer pubkeys can be raw compressed keys or protobuf-wrapped Any.value bytes. Normalize before matching signer indexes.
  • Never assume autosign is signer index 0. Fee payer can appear first.
  • signature verification failed usually means wrong account number, chain-id, sign bytes, or signature slot. Check signer index matching before changing RFQ business logic.
  • Position close is RFQ too: opposite direction, same quantity, margin: "0", then cancel active TP/SL lanes for that market.
  • Quote probes should report both request hit rate and raw maker quote count: 69/100 requests quoted and 140 MM quotes are different metrics.
  • Use active derivative market discovery for uptime tools; do not hardcode market IDs when checking whether new markets are ready.
  • Tx hashes should link to https://tcx.inj.so/tx/<hash>?network=mainnet&mode=all.

Security Notes

  • Do not store user wallet private keys.
  • If you use autosign, the ephemeral grantee key is a local browser secret.
  • Scope grants tightly. Avoid blanket contract execution unless the RFQ flow truly requires it.
  • Route wallet-signed setup transactions through Web3Gateway fee payer so users do not need an INJ balance for gas.
  • Conditional TP/SL signatures are replay protected by epoch and lane_version. Always re-query counters after canceling a lane.
  • Never mutate decimals after signing. RFQ signatures bind canonical string values.

Mainnet Defaults

// Canonical mainnet RFQ contract.
export const RFQ_CONTRACT_ADDRESS = 'inj12stwq95jet57edcu4a65r48r46s9rzrs938n8k'

export const RFQ_WS_URL = 'wss://rfq.ws.injective.network'
export const RFQ_GATEWAY_URL = 'https://rfq.gateway.grpc-web.injective.network/'
export const RFQ_CHAIN_ID = 'injective-1'
export const RFQ_EVM_CHAIN_ID = 1776
export const RFQ_COLLECT_QUOTES_MS = 500

RFQ_CHAIN_ID is the Cosmos chain ID used in RFQ quote/conditional-order wire payloads and Cosmos sign docs. Do not set it to 1776. RFQ_EVM_CHAIN_ID is the numeric Injective EVM chain ID used in EIP-712 domains, Web3Gateway wallet signatures, and quote.evmChainId.

Status

This skill is intentionally docs-only. It is not an npm package.

Source: SKILL.md on GitHub

1 warning2mo3 checks · Risk SAFE
  • Gen Agent Trust Hub2mo

    This skill is a documentation-only integration guide for Injective RFQ (Request for Quote) taker flows. It contains no executable code, malicious instructions, or obfuscation. It provides security best practices for handling ephemeral keys and validating external data from market makers.

  • Socket2mo

    No alerts

  • Snyk2mo

    Risk: MEDIUM · 1 issue

Signed by skilld at af4a540. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last month.

Steadyupdated 4 months ago
metadata
{
  "author": "ck",
  "version": "1.0.0"
}

README badge

README badge for injectivelabs/agent-skills/injective-rfq-integrations