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 GBLIN protocol's swap_gblin_to_usdc_jit endpoint returns calldata for a single transaction that:
All in one transaction. No intermediate states. Compatible with EOA, ERC-4337 Smart Accounts, and EIP-7702.
GET https://gblin.digital/api/x402/jit?wallet=<address>&usdc=<amount>Response (after x402 payment of $0.005 USDC):
{
"action": "single_atomic_tx",
"target_contract": "0x36C81d7E1966310F305eA637e761Cf77F90852f0",
"calldata": "0x...",
"value": "0",
"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 requires x402 payment of $0.005 USDC');
}
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 };
}GBLIN enforces a 2-minute cooldown between deposit and redemption to prevent flash-loan exploits. Plan around this:
async function safeRedeem(walletAddress: string, amount: number) {
const health = await fetch(`https://gblin.digital/api/x402/health?wallet=${walletAddress}`);
const status = await health.json();
if (status.cooldownActive) {
const waitMs = (status.cooldownRemainingSeconds || 120) * 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.