One rule shaped everything we built:
The AI reads while the code decides.
AI is brilliant at reading messy invoices but It's terrible at saying no to a convincing one
So the AI never gets the final say on money. Nine checks do, and none of them is the AI.
Soon on NEAR, 1st Nov
Any business can now set up Clear to Pay from a browser...
Two wallet approvals. No developer, no terminal.
Your own contract: our exact code, no keys, nobody can change it. Not even us.
Top up, withdraw, alerts, printed receipts 👇
https://t.co/84Z4LB9RFN
phewww,
One final strech, i shipped an amazing feature that lets any one make their own contract, fund it, make a pool, withdraw and enjoy this experience without touching any line of code
You literally can experience the process even as a non technical person and max out clear to pay(@cleartopay)...
This was the gap i closed out today and now a real business can go from setup to pay out smoothly and that is the mentality that brought this to life and we extend that to making the app experience frictionless
As we now adopt AI agents to paying invoices. A fake invoice or a "we changed our bank details" email can fool them like it fools people.. but we build a guardrail that makes sure money never goes wrongly
Today any business can set it up in two clicks 👇
Yesterday @elliot_braem reached out after looking at Clear to Pay and asked me one question..
"Is this using the Agent API, or your own contract?"
Our own contract, On purpose.. but there was a way to make @cleartopay even more seamless using agent API so i worked through the night and cooked something
As always the contract is the part that decides who gets paid: the order, two signatures on the delivery, the supplier's signed invoice, an address registered 72 hours earlier. I wasn't handing that to anything else
But he was right about one thing.. once money leaves the contract, the contract can't protect it
So I split it in two
➥ the contract decides 𝘸𝘩𝘰
➥ the supplier decides 𝘸𝘩𝘦𝘳𝘦
Last night a supplier we'd paid on NEAR moved it to Base in one wallet approval.. 2.00 test USDC in, 1.9948 out, through NEAR Intents
NEAR Intents is mainnet only, so on testnet it runs on Tidepool.. a community sandbox running NEAR's own Intents contract. He pointed me to it
Then I had it reviewed the same night, twice. Both reviews found real bugs. All fixed before merge
Next, on mainnet, it goes automatic: the contract pays into a NEAR Intents account whose rules only let money out to the supplier's own address. That's where his Agent API point lands
A ship doesn't leave port until it's cleared.. once it's cleared, the captain picks the route
@NEARProtocol #NEARHackathon
Paid on NEAR.. received on Base
The contract decides who gets paid. The supplier picks where
One approval in their own wallet, and NEAR Intents does the rest
37 seconds, right on testnet 🎬
https://t.co/954OAG7RUN
Day 11 / 14
UPDATE ALERT🚨
NEAR INTENT IS LIVE ON CLEAR TO PAY THROUGH TIDEPOOL
A supplier we paid on NEAR just received it on Base
2.00 test USDC in.. 1.9948 USDC out on Base Sepolia
Through NEAR Intents. One wallet approval 🧵
Next.. on mainnet it becomes automatic
The contract pays into NEAR Intents, to an account whose rules only allow withdrawal to the supplier's own address
The payout, on Base Sepolia:
https://t.co/4JH6DtD3v1
6. 𝗡𝗘𝗫𝗧 ➠ flagged addresses
Every address an attack tried to get paid becomes a flag.. Judge mode feeds it
Supplier asks to move payouts to a flagged address? The buyer sees it before approving
392 tests · 7 reviews · 0/11 attacks paid
https://t.co/W3rXtGcpio
BACK LIKE WE NEVER LEFT!
Build log..Days 04 to 07 / 14
Quiet on X for a few days..
But not quiet in the repo
The AI now reads invoices inside a sealed machine, finance signs a whole order once, and every role has its own page (https://t.co/W3rXtGcpio)🧵
5. 𝗕𝗥𝗢𝗞𝗘 ➠ nothing, but here’s the line
The browser checks the enclave’s signature..
not Intel’s certificate chain, not NEAR AI’s GPU evidence
The CLI reader still checks those on every reading
We wrote down exactly where the line is
Pheewww..
I stayed up till 23:34 last night to watch 7.80 USDC move..
Not because it's a lot of money
Because of what it had to get through first
I work in a shipyard and in materials work, steel isn't paid for because an invoice says so
➥ the storekeeper confirms it arrived
➥ the weighbridge confirms the weight
➥ only then does finance pay
That's the rule I put on @cleartopay built on @NEARProtocol .. for AI agents
Initiall I sent INV-2208 with only one delivery signature first
𝗛𝗘𝗟𝗗 ➠ delivery_signatures_missing
Until storekeeper + weighbridge both signed then:
𝗖𝗟𝗘𝗔𝗥𝗘𝗗 ➠ 𝗣𝗔𝗜𝗗.. 7.80 USDC, to the address the supplier registered 72 hours earlier
The agent never chose who to pay, It can't
𝗧𝗵𝗲 𝗔𝗜 𝗿𝗲𝗮𝗱𝘀.. 𝗰𝗼𝗱𝗲 𝗱𝗲𝗰𝗶𝗱𝗲𝘀
And today you can try to break it yourself, no install:
https://t.co/gnFFWy7Ewe
I love feedbacks, it helps me spot bugs I didn't find earlier, also need some work on the UI, very yourself no need to brag, the backend is crazy solid I'll touch UI once the build is almost complete
5. 𝗡𝗘𝗫𝗧 ➠ no terminal for the company
The storekeeper signs the delivery on a phone. Finance sets orders and limits from a wallet
380 tests · 6 security reviews · contract v2.3
Try the attack:
https://clear-to-pay.vercel. app/console
Day 03 / 14
Clear to pay is more than 80% completed in just day 3!
Last night at 23:34 the first real payment went out
7.80 USDC.. paid only after two people signed for the delivery
And today you can attack it yourself, right in your browser 🧵
4. 𝗕𝗥𝗢𝗞𝗘 ➠ our own demo has to wait
A new supplier address waits 72 hours before any payment.
No exceptions.. not even for us
So the honest invoice in Judge mode clears Friday morning
The attack is SEIZED right now