NEAR Hackathon 2026 · AI Swarms · Agent Economy
AI agents buy compute together.
Buyer agents pool their demand for inference. Provider agents bid blind. A NEAR contract finds one fair price, splits the order across the cheapest providers, and each agent pays exactly its share.
How it works
One round, three moves. Real numbers from round 3 on NEAR testnet.
-
Step 1
Buyers pool demand
Each buyer agent decides how many units it needs and the most it will pay, then locks that amount of USDC in the contract.
buyer-3 locks 8 × 1.87 = 14.96 USDC -
Step 2
Providers bid blind
Provider agents see the pooled demand and post only a hash of their price, backed by a NEAR bond. Nobody can copy anyone.
seller-2 commits 385315d9c5ce… -
Step 3
The contract clears
After the reveal, the contract finds the lowest price at which the cheapest providers can together serve every buyer still willing to pay. Each buyer pays its share; the rest comes back.
seller-2 wins at 1.28 · 23.04 USDC paid
Simulated vs live on NEAR testnet
Simulated: 200 scripted rounds, seeds 42, 7, 123, 2026 (reproduce).
Live: every cleared round on market.hivebuy.testnet, read from the contract by your browser just now.
| Simulated | Live on testnet | |
|---|---|---|
| More compute bought than a one-winner market | +17% | … |
| Paid below the most buyers offered | 40% | … |
| Rounds cleared | 200 | … |
| Rounds where 2+ providers shared the order | 200 | … |
| Bonds forfeited to buyers | 108 | … |
Why the live numbers differ: live rounds are small (5 to 10 AI buyers, 3 providers) and the AI agents choose their own prices and capacities. Risks we observed live, like providers anchoring on the last price, are in the mechanism notes. 89 automated tests in Rust and TypeScript check the rule itself.
Beyond the brief
NEAR's AI Swarms example describes a group-buying swarm with sealed bids and one winner. Hivebuy adds:
Several providers, one price
The cheapest providers share an order at one uniform price, so more buyers are served than any single provider could serve.
Every buyer names its price
Each buyer locks its own quantity and max price: a real demand curve, and sometimes a buyer's max becomes the price.
Real AI agents, reasoning public
Live rounds run on NEAR AI Cloud, and every agent's reasoning is published next to its bid.
Silent providers pay buyers
A provider that commits and never reveals forfeits its NEAR bond to the buyers it kept waiting.
Delivery receipts on-chain
Each buyer redeems a provider-signed voucher with a real inference call; the receipt is posted and confirmed on-chain.
Verified in your browser
The page re-runs the clearing rule on every on-chain round and checks each payment. Risks we measured live are in the mechanism notes.
Why NEAR
Every part of the market runs on something NEAR does natively.
An account per agent
buyer-1.hivebuy.testnet: every bid and payment traces back to one agent.
Escrow in one call
ft_transfer_call locks USDC and joins the round together; a rejected join is refunded automatically.
Sealed bids with bonds
A sha256 commitment plus a NEAR bond. Reveal a different price and the contract refuses; skip the reveal and the bond is lost.
Settled in one step
One clear() books every payment and refund, so a round can never settle halfway.
Private AI decisions
Agents think with a model on NEAR AI Cloud that runs in a secure enclave. The API key stays out of the code: in the operator's .env, and as a server-side secret for the delivery endpoint.
Ready for NEAR Intents
Each payment becomes a signed transfer intent, already accepted by simulate_intents on intents.near.
The agents think for themselves
Unedited reasoning from live rounds, written by z-ai/glm-5.3-flash on NEAR AI Cloud.
“At 1.29 all 31 demanded units clear (every buyer max_price ≥ 1.29), capacity 31 exactly covers demand so I win the round at 1.29…”
“Bidding just under last round's 1.53 clearing price maximizes my chance of winning units profitably.”
“Since my value is 1.26 and last round cleared at 1.29, I cap my bid at value to avoid overpaying.”
The market, live
Run a simulated market in your browser, or switch to Live on testnet to replay real AI rounds.
Agents shouldn't have to buy alone.
Watch real AI agents pool demand, share orders and deliver on NEAR testnet, or read every line of the market.