jit-redemption-pattern — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited jit-redemption-pattern (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.
Trigger when:
The /api/x402/jit endpoint (MCP tool swap_gblin_to_usdc_jit) returns unsigned calldata for three transactions:
GBLINZap.sellGBLINForEth: the Zap redeems the shares in kind on the vault and sells every leg for ETH, all or nothing (a leg that cannot be sold reverts the whole step)Every step carries a non-zero minimum. Compatible with EOA, ERC-4337 Smart Accounts, and EIP-7702 (smart accounts can batch the three steps in one operation). Each step also carries to, data and chainId, so it maps one to one onto wallet batch APIs such as send_calls.
GET https://gblin.digital/api/x402/jit?wallet=<address>&usdc=<amount>Response (free, no payment):
{
"action": "sequential_txs",
"steps": [
{ "step": 1, "target": "0xc2181d975c05c8c724b334bcED0764c0b86B1D53", "calldata": "0x...", "value": "0", "description": "Approve the shares to the GBLIN Zap" },
{ "step": 2, "target": "0x0E9D6Ceb6D313b021622C121Cda9C62e86e60200", "calldata": "0x...", "value": "0", "description": "Redeem in kind and sell every leg for ETH through the Zap (all or nothing)" },
{ "step": 3, "target": "0x2626664c2603336E57B271c5C0b26F421741e481", "calldata": "0x...", "value": "...", "description": "Swap the received ETH to USDC via Uniswap V3 (WETH->USDC)" }
],
"compatibility": { "eoa": true, "erc4337": true, "eip7702": true }
}Use when:
Do not use when:
import { createWalletClient, http, parseUnits } from 'viem';
import { privateKeyToAccount } from 'viem/accounts';
import { base } from 'viem/chains';
const GBLIN_JIT = 'https://gblin.digital/api/x402/jit';
async function payInvoiceWithGblin(params: {
privateKey: `0x${string}`;
walletAddress: `0x${string}`;
invoiceAmountUsdc: number;
recipient: `0x${string}`;
}) {
const url = `${GBLIN_JIT}?wallet=${params.walletAddress}&usdc=${params.invoiceAmountUsdc}`;
const response = await fetch(url);
if (response.status === 402) {
throw new Error('JIT endpoint unavailable');
}
const jit = await response.json();
const account = privateKeyToAccount(params.privateKey);
const client = createWalletClient({ account, chain: base, transport: http() });
const hash = await client.sendTransaction({
to: jit.target_contract as `0x${string}`,
data: jit.calldata as `0x${string}`,
value: BigInt(jit.value || 0),
});
return { redemptionTx: hash };
}The vault enforces a short redemption cooldown after a mint for oneself (20 seconds at launch; a governance parameter, read live through GBLINLens.configFees). Plan around it:
async function safeRedeem(walletAddress: string, amount: number) {
// /api/x402/health is free: a plain fetch is enough.
const health = await fetch(`https://gblin.digital/api/x402/health?wallet=${walletAddress}`);
const { cooldown } = await health.json();
if (cooldown.active) {
const waitMs = cooldown.seconds_remaining * 1000;
return { needsWait: true, waitMs, retryAt: Date.now() + waitMs };
}
return { needsWait: false };
}For agents with predictable revenue cycles, time your invests so that cooldown windows align with quiet hours.
JIT redemption swaps WETH and cbBTC to USDC at market price. The protocol embeds a maxInternalSlippage parameter (default 2% buffer) into the calldata. During extreme volatility, this may not be enough.
If you need tighter slippage:
For agents with known upcoming outflows, redeem ahead of time and hold USDC operational reserve:
const expectedWeeklyOutflows = 50; // USDC
const operationalReserve = expectedWeeklyOutflows * 1.5;
if (usdcBalance < operationalReserve && gblinValueUsdc > operationalReserve) {
await jitRedeem(walletAddress, operationalReserve - usdcBalance);
}This trades NAV growth opportunity for execution certainty. Choose based on your agent's risk tolerance.
skills/base-agent-treasuryskills/agent-self-funding~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.