Home / Notes

Intents Desk logoNEAR logoNEAR Intents logo

Building Intents Desk: a NEAR hackathon log

2026-11-06 · Web3 data · Edward Plata

NEAR HACKATHON runs from 1 to 14 November 2026, with judging from 16 to 18 November. It has a $250,000 prize pool and 13 build tracks. We entered with Intents Desk, a live reliability monitor for swaps on NEAR Intents.

Why this project: users post about swaps that stay stuck for days. One r/nearprotocol user wrote that a swap "has not refunded or completed the swap in 4 days" (thread, 22 October). A reply said: "Their support page is basically a void with no case number or tracking." The network moves tens of millions of dollars a day, but nobody publishes refund rates per app or per route for it.

This is a log. We add a dated entry as the build goes on, and we stop after judging. In earlier entries, the numbers are as we recorded them on that day.

What Intents Desk does

  • "Where's my swap?" Paste a deposit address and get the swap status, with the refund reason if there is one.
  • Network health. The refund rate per hour, and an alert for each partner that fails.
  • Complaint feed. Public posts about stuck swaps from X and r/nearprotocol, every hour.
  • Wallet sign-in. You sign a message, not a transaction. There is no fee and no funds are at risk.
  • Thesis report. A re-runnable report where every number comes from one named SQL file.

It uses public data only. We hold no keys and no user funds.

How it is built

Intents Explorer API ──► bronze (raw JSON, keyed) ──► silver.swap (one row per swap) ──► gold (partner per hour)
1Click status API ─────────────────────────────────► HTTP API ◄─────────────────────────────┘
X + r/nearprotocol ──► feed thread (hourly) ──► bronze
                                  HTTP API ──► dashboard, wallet sign-in, agent, reports

One Python server holds one DuckDB file. A sync thread re-reads the last 2 hours of swaps every 10 minutes.

Log

4 November, day 1: the data source

  • First try: whole blocks. We read intents.near receipts from raw blocks. It worked, but one hour of chain took 35 to 45 minutes to fetch. That is too slow for a live monitor.
  • Second try: the Explorer API. The Intents Explorer API lists every 1Click swap, with its status and USD values. It needs a token from the Partner Dashboard and allows "1 request every 5 seconds per partner ID". So exactly one part of our server calls it.
  • The data model: bronze keeps the raw API response, so a parser bug never needs a new fetch. Silver keeps one row per swap. Gold keeps the hourly numbers per partner.
  • Keyed upserts, not appends. A swap changes status after we first see it, for example from PROCESSING to REFUNDED. If we only appended new rows, old rows would keep the wrong status.
  • The first hour of data looked bad: 19 to 21% of 1,000 swaps were refunded, and almost all of them on two routes. We did not publish it. We waited for a full day of data.

4 November, evening: one partner, not the network

  • 24 hours of data showed that the refund spike came from one partner type, not from 1Click as a whole.
  • One widget integration started at 13:05 UTC. Almost all of its swaps came back refunded with the reason INTENT_SUBMIT_FAILED. Few sender addresses and a very high swap count suggest an integration or a bot that retries.
  • The large partners were healthy, each below 1% refunded.
  • The alert rule we added: a partner alerts when it has at least 50 swaps and at least 50% refunded in one hour. With this rule, the alert fires in the first hour of the incident.

5 November: the thesis report

We froze a snapshot and ran the report on it. A frozen input makes every number reproducible. It also avoids the DuckDB rule that, in-process, "one process can both read and write" the database file.

The window was 39.8 hours (3 November 20:56 UTC to 5 November 12:42 UTC):

MeasureValue
Swaps73,593
USD in$74.0M
USD in, last 24 hours$48.8M
Median hour without the incident2.0% refunded
Widget incident42,081 swaps, 95.5% refunded
INTENT_SUBMIT_FAILED refunds from the incident40,183 of 40,184
Fill time, successful swaps (sample of 300)median 124 s, 95th percentile 1,137 s
Top 5 partners75.5% of USD volume

Two cautions:

  • Refunded USD is not lost money. The incident shows about $3.6M refunded, but the same senders retry, so the same funds are counted many times. A refund returns the funds. The cost is failed swaps, fees and time.
  • Fill time is an upper bound. We measure from the Explorer createdAt to the 1Click updatedAt, which is the last status change, not the settlement itself.

We also added a speed gate. A change is kept only if its target gets better and a checksum of the output rows does not change:

MetricBeforeAfter
Network summary, cold2.04 s0.11 s
Agent answer for one swap2,534 bytes137 bytes
Explorer pages per sync276

The agent runs on IronClaw, NEAR AI's agent OS. On 5 November the hosted agent was still blocked by an account credit limit on the NEAR AI side.

5 November, 14:28 UTC: the incident stopped

A new snapshot covers 41.5 hours and 76,860 swaps ($77.5M in):

  • The widget incident sent 43,541 swaps from 40 refund addresses, and 95.2% were refunded.
  • Its first swap was at 13:05 UTC on 4 November, and its last at 13:08 UTC on 5 November. We saw no new swaps from it between 13:10 and 14:27 UTC.
  • 41,456 of the 41,457 INTENT_SUBMIT_FAILED refunds in the window came from it.
  • All other swaps: 33,319, with 2.2% refunded. The median hour without the incident: 1.9%.

So it ran for about 24 hours. We do not know the cause, and we do not guess here. We have not named the integration, because we sent the details to its team first.

What we cannot see yet

  • 1Click swaps only. Solvers and apps can use intents.near directly, and those swaps are not in this data.
  • Confidential settlement. Since 27 October, 1Click swaps settle confidentially, and the transaction hashes are shield and unshield hashes (changelog). Our counts key on the deposit address and memo, not on hashes, so they are not affected. A chain-side check is now harder.
  • A short window. 41.5 hours is not a trend. Hours with few swaps give noisy rates.
  • Volume claims. Our last 24 hours were $47.0M, or about $1.4B a month at that rate. DefiLlama gives about $4.0B for the last 30 days, and intents.near.org says "$33B+ all-time volume across 37 chains". A gap is expected, because we see only 1Click and only this window. It is not evidence that the public figures are wrong. For how these totals differ, see NEAR Intents passed $30B.
  • A reason outside the docs. The documented refund reasons do not include QUOTE_EXPIRED, but our data holds 488 refunds with it.

For apps that route swaps through 1Click

If your wallet or widget sends swaps through 1Click, a broken integration looks like this: users see refunds and open tickets, and you may not notice for a day. We can send you:

  • an hourly alert when your referral id passes the refund threshold;
  • a weekly reliability report: refund rate, refund reasons, and fill time per route.

Send us your referral id, and we send you last week's report for free. Pricing: contact us.

What to take away

  • A live monitor needs keyed upserts, because swap status changes after you first see it.
  • Keep the raw API response. A parser bug then costs a re-parse, not a re-fetch.
  • Check one bad hour against a full day before you publish it.
  • Alert per partner, not per network. One integration can hide in the network average.
  • Refunded USD counts retries. Never report it as money lost.

If your app routes swaps through NEAR Intents, I can set up the swap tables, the partner alerts and the weekly report with you. You can also send me a message.

Book a 30-minute call

Ask a question