jit-redemption-pattern

jit-redemption-pattern is a skill for Claude Code, Codex from gblinproject/gblin-treasury-risk-regime. It costs 59 tokens per session (1,374 once invoked), scanned A, original, MIT.

A two-step method for converting GBLIN cryptocurrency into USDC when an agent needs to make a USDC payment. It prepares one transaction to redeem GBLIN and another to swap the resulting treasury assets into USDC.

In plain words
What is it for?
Use it in x402 payment flows when the agent's treasury holds GBLIN but an invoice requires USDC. It supplies transaction data for redemption and swapping, including support for batching both steps in some smart-account setups.
Why use it?
It allows conversion only when an outgoing payment is needed, instead of keeping the treasury fully in USDC. The method includes minimum-output protections and can work with regular wallets and supported smart accounts.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument.

Good fit Use it in x402 payment flows when the agent's treasury holds GBLIN but an invoice requires USDC. It supplies transaction data for redemption and swapping, including support for batching both steps in some smart-account setups.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/gblinproject/gblin-treasury-risk-regime/jit-redemption-pattern
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add gblinproject/gblin-treasury-risk-regime --skill jit-redemption-pattern
Clone the repo
git clone --depth 1 https://github.com/gblinproject/gblin-treasury-risk-regime

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for jit-redemption-pattern

README.md
[![agentmods](https://agentmods.dev/badge/skills/gblinproject/gblin-treasury-risk-regime/jit-redemption-pattern/github.svg)](https://agentmods.dev/skills/gblinproject/gblin-treasury-risk-regime/jit-redemption-pattern)
Your own site
<a href="https://agentmods.dev/skills/gblinproject/gblin-treasury-risk-regime/jit-redemption-pattern"><img src="https://agentmods.dev/badge/skills/gblinproject/gblin-treasury-risk-regime/jit-redemption-pattern/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for jit-redemption-pattern

Your own site · 80×15
<a href="https://agentmods.dev/skills/gblinproject/gblin-treasury-risk-regime/jit-redemption-pattern"><img src="https://agentmods.dev/badge/skills/gblinproject/gblin-treasury-risk-regime/jit-redemption-pattern.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 59 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,374 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00059 $0.01374
Opus 5 $0.00030 $0.00687
Sonnet 5 $0.00012 $0.00275
Haiku 4.5 $0.00006 $0.00137

Measured 11d ago against content hash 9bf8ec066643, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

jit-redemption-pattern scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

const response = await fetch(url);
skills/jit-redemption-pattern/SKILL.md · 140 lines

How it starts

The opening of the file, as written. The whole thing — 140 lines — stays where its author put it; the contents beside it link to each section on GitHub.

JIT Redemption Pattern (GBLIN → USDC)

When this skill applies

Trigger when:

  • The agent's treasury is in GBLIN and needs to pay an outgoing x402 invoice in USDC
  • The user wants a deterministic, scripted GBLIN → USDC conversion (two txs in V6)
  • The agent is building "lazy treasury" patterns (only convert when needed)

What JIT redemption does

The GBLIN protocol's swap_gblin_to_usdc_jit endpoint returns calldata for two transactions that:

  1. Burns the right amount of GBLIN
  2. Withdraws the user's proportional share of WETH, cbBTC, USDC from the treasury
  3. Swaps WETH and cbBTC to USDC via Uniswap V3 (with MEV-safe min outs)
  4. Transfers the resulting USDC to the user

Two deterministic steps (redeem, then swap), each with its own oracle-anchored minOut. Compatible with EOA, ERC-4337 Smart Accounts, and EIP-7702 (smart accounts can batch both steps in one UserOp).

Endpoint

GET https://gblin.digital/api/x402/jit?wallet=<address>&usdc=<amount>

Response (after x402 payment of $0.005 USDC):

{
  "action": "two_step_redemption",
  "steps": [
    { "step": 1, "target_contract": "0x36C81d7E1966310F305eA637e761Cf77F90852f0", "calldata": "0x...", "value": "0", "description": "sellGBLINForEth(...)" },
    { "step": 2, "target_contract": "0x2626664c2603336E57B271c5C0b26F421741e481", "calldata": "0x...", "value": "0", "description": "Uniswap V3 WETH→USDC" }
  ],
  "compatibility": { "eoa": true, "erc4337": true, "eip7702": true }
}

When to use JIT redemption

Use when:

  • You need exactly X USDC and have at least X-equivalent in GBLIN
  • The payment is happening now (within the next minute)
  • You want a deterministic scripted redemption (2 txs, or 1 batched UserOp on smart accounts)

Do not use when:

  • You're inside the 2-minute cooldown after a recent deposit (will revert)
  • You need amounts smaller than ~$0.10 (gas + slippage eats too much)
  • The market is highly volatile (Crash Shield active) — slippage may be wide

Code pattern: pay x402 invoice with GBLIN

Read the full file on GitHub · 140 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 140 lines · 59 tokens per session scan A 9bf8ec066643

Subscribe to this mod's changes

jit-redemption-pattern is a skill published in the GitHub repository gblinproject/gblin-treasury-risk-regime (1 stars, last pushed today), licensed MIT. It adds 59 tokens to every session and 1,374 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.