Sriram Ramakrishnan PRO
AI & ML interests
Recent Activity
Organizations
Thank you @ChrisSacrumCor for the encouragement and taking time to respond.
Independent re-check, formalized — the desk takes the headline table
I’ve released SRA-RiskGate-4B v2. It’s a 4B model fine-tuned from Qwen3-4B-Instruct that answers approve, hold or reject for stablecoin payments made by agents (x402, EIP-3009, Circle), and it settles payment disputes.
On 2,000 held-out benchmark cases:
✅ 99.6% of payment decisions correct (base model: 59.8%)
✅ 0.35% unsafe approvals (base model: 34.6%)
✅ 90.2% of dispute outcomes correct, up from 77.8% in v1
The main change in v2: the dispute window is computed in code and passed into the prompt instead of asking a 4B model to subtract dates. Wrongful denials fell from 26% to 2.1%.
I also tested it on 227 real USDC payments from Base mainnet: it blocked none of the 151 real payments and approved none of the risky ones.
The model isn’t the security boundary. The open-source checks in pip install sra-riskgate run first and fail closed, with optional Chainalysis, TRM, Range and Webacy screening.
These are my own numbers. Every prediction is public, so you can re-score them.
🤖 Model: hf.co/sriram1983007/SRA-RiskGate-4B
🎮 Try to trick it: hf.co/spaces/sriram1983007/sra-riskgate-demo
📊 Benchmark: hf.co/datasets/sriram1983007/sra-stablecoin-risk-bench
🧾 Real payments: hf.co/datasets/sriram1983007/sra-real
I’ve released SRA-RiskGate-4B v2. It’s a 4B model fine-tuned from Qwen3-4B-Instruct that answers approve, hold or reject for stablecoin payments made by agents (x402, EIP-3009, Circle), and it settles payment disputes.
On 2,000 held-out benchmark cases:
✅ 99.6% of payment decisions correct (base model: 59.8%)
✅ 0.35% unsafe approvals (base model: 34.6%)
✅ 90.2% of dispute outcomes correct, up from 77.8% in v1
The main change in v2: the dispute window is computed in code and passed into the prompt instead of asking a 4B model to subtract dates. Wrongful denials fell from 26% to 2.1%.
I also tested it on 227 real USDC payments from Base mainnet: it blocked none of the 151 real payments and approved none of the risky ones.
The model isn’t the security boundary. The open-source checks in pip install sra-riskgate run first and fail closed, with optional Chainalysis, TRM, Range and Webacy screening.
These are my own numbers. Every prediction is public, so you can re-score them.
🤖 Model: hf.co/sriram1983007/SRA-RiskGate-4B
🎮 Try to trick it: hf.co/spaces/sriram1983007/sra-riskgate-demo
📊 Benchmark: hf.co/datasets/sriram1983007/sra-stablecoin-risk-bench
🧾 Real payments: hf.co/datasets/sriram1983007/sra-real
Ran both tests on the 679.
Shape: skewed, not flat. 324 settle within 6 s of the top of the range (297 s), then a steady tail to about 65 s. KS distance from uniform is 0.495 (the 95% bound for flat is 0.052). The tight 300 s payee shows the same floor without the tail.
Beat: none. Every settlement is its own transaction; 629 blocks hold one and 25 hold two, consistent with its traffic. The commonest gaps are 0–22 s, and only 36 of 678 gaps are multiples of 60 s. Phase concentration within the minute is 0.098 against about 0.04 for random, a slight preference but nowhere near a timer. So it reads as per-request settlement, with that server taking up to about a minute to respond.
Your reconciliation holds: the 23 are all validAfter = 0 and all outside the piles, leaving 8. Four sit 1–3 s under 120 s (a fifth L, four rows), one 5 s under 1800 s, two are batch settlements 29–31 s under 600 s (the 600 pile’s tail), and one at 203 s has no L above it. The 3600 pile is 12 of the 14 boundary rows.
So: five lifetime defaults (60, 120, 300, 600, 3600 s, plus one 1800 s row), one payee whose smear is response time, and one row unexplained.
Ran it on the same sample. 1,435 rows have validAfter = 0 (~1,400), and 1,404 of them fall into four piles: just under 60 s, 300 s, 600 s and 3600 s, with 31 outside any pile and none settled after validBefore.
Three are tight. 600 s: 2–17 s under, and all 427 rows are the batch-settlement contract, so batching there doesn’t mean a long wait. 60 s: mostly 2–11 s under, with a few rows up to 64 s, which I’d read as client clocks a few seconds fast rather than another L. 3600 s: 12 rows, 1–31 s under.
The 300 s pile is two clients. One payee (126 rows) sits 2–15 s under, the same pattern as the others. Another (679 rows) is smeared across 232–297 s, about 65 s wide. That’s the only smear in the sample. I’d call it time between signing and settlement rather than a queue, though: in x402 the server usually settles after serving the request, so the smear may be that server’s response time. Calldata can’t separate the two.
Where validAfter is set, the signed lifetimes are more varied (900, 360, 660 and 170 s are the most common), but that’s only 41 rows.
20 rows at 31–72 s: most at 61–72 s, plus one at 31 s.
21 rows at 602–640 s: most at 602–608 s, plus one at 640 s.
Good point Dipankar, and the 41 rows with validAfter set do price it. Settlement minus validAfter isn’t spread out; it falls into two tight groups. 20 rows sit at 31–72 s (most at 61–72) and 21 at 602–640 s (most at 602–608). That’s what you’d expect from clients that backdate validAfter by a fixed 60 or 600 seconds (the x402 SDK uses 10 minutes) and then settle a few seconds later. Taking the backdate off, the implied delay from signing to settlement is about 2–12 s for most rows and 40 s at the very most. Your two 70-minute windows are in the second group: they settled 2 s after their backdated start, so they were signed for an hour almost exactly.
So validAfter does track signing time, offset by a fixed backdate, and the delay is seconds, not minutes. If the 1,400 validAfter = 0 clients behave like these, their lifetime is their time left plus a few seconds, well clear of the hour. The caveat is that 41 rows come from clients that chose to set validAfter, and the validAfter = 0 clients might queue differently. I can’t rule that out from calldata alone. Pairing each settlement with its x402 /verify call would settle it, but that’s facilitator-side data I don’t have.
Good spot Dipankar, and you’re right: time left at settlement is lifetime minus settlement delay, so it’s only a lower bound on what the client signed for. I’ve rerun the 1,476 settlements with a recovered window against the 0.17.0 rule (validBefore − max(now, validAfter) > 3600):
23 (1.6%) would certainly have been held: even at settlement they had more than an hour left, so they had more at signing.
39 had validAfter set and a total window under an hour: certainly not held.
1,400 had validAfter = 0 and under 10 minutes left: nowhere near the limit.
14 sit right on the boundary: 12 settled with 3,500–3,599 s left, and 2 used a 70-minute window backdated by 10 minutes. Both look like clients signing for exactly one hour.
Those 14 matter. They pass the strict > 3600, but a second of clock skew between signer and gate would hold them. So the next release ought to add a small skew tolerance at the one-hour edge.