Fixing Agentic Commerce: Why Flat Fees Break x402 (and What to Standardize in v3)
Nothing is loaded from YouTube until you press play, and then without tracking cookies.
About this video
Discover why flat fees break agentic micropayments and how x402 standardization paves the way for scalable autonomous commerce.
NEAR is the unified commerce layer for assets and agents.
Website: near.org NEAR AI: near.ai Intents: near.org/intents Chain Abstraction: proximity.dev Sharding: nearone.org
For the devs GitHub: github.com/near Dev Docs: docs.near.org Devhub: devhub.near.page @NEARDevHub
Connect with socials Twitter: / nearprotocol Blog: near.org/blog Medium: / nearprotocol #NEAR #nearprotocol #NEARAI
Transcript
1,813 wordsCaptions as YouTube publishes them, usually machine-generated, so product and people names can be misheard.
- 0:10
I'm Cartik. Uh I'm a founding engineer at SE. Um so a little bit of my background. I used to work at Nvidia. Um studied at Carnegie Melon and worked at Google. So I have like a very like practical sort of mindset like not very ideological. I come from an AI background. And so one of the things that excites me the most about X42 is that I strongly believe it's the only practical use case in crypto and AI. I think everything else is just like
- 0:34
ideological like you know decentralization for the sake of it. But I think X42 has the pieces that can go beyond just what crypto believes is necessary for people. Um, so I'm particularly excited and I think one component of that is facilitators which we need to get right to make normal users get more used to the chain and get used to this X42 use case. So what are facilitators? As you guys are probably familiar with X42. They are the fundamental gateway for X42 users between um, you know, normal payers and
- 1:06
the actual blockchain, right? So they quote fees, they enforce the limits, they verify and they settle transactions. You can think of them as like RPCs, like pay masters, but they're that fundamental gateway. And so I think it's very important that we make it as usable and make sure that the UX is very strong.
- 1:25
And so one really interesting thing that's happening now as X42 is maturing and there's more activity, there's more hype, facilitators are starting to charge fees. So I noticed this, this happened around like December or November time frame. Um, Third Web was arguing between Coinbase's method of charging a flat fee and their own method of charging percentage fees. Um, so the base thing is that you cannot run a facilitator for free, right? You settle
- 1:50
transactions on the chain. There's gas costs, there's infrastructure costs. Like this is not something that's just going to be subsidized forever. And so this was definitely a um a moment to reflect on how do we want to best charge fees that normal users can uh both easily describe what they're get they're paying for as well as know exactly what they're paying for.
- 2:10
And so we had this basic fee disclosure um as part of this proposal we have for X42 where um the most obvious thing that was missing was I have to go to Coinbase docs or third web docs to even figure out what are the facilitator fees. So let's standardize that. Let's make it so that servers can route based on a specific fee model or how much the fee costs. Um, even this is like controversial, but like it seems obvious
- 2:34
to me that you at least need a standard for disclosure. And I think what X42 v2 at least is moving towards is this system of multifacilitator routing. And what that means is like the SDK itself will choose a facilitator or the server will choose a facilitator based on different heruristics. And right now those heristics are pretty vague, right?
- 2:56
They're like uptime. Maybe there's like a performance heristic. Maybe you can even choose specific facilitators based on like a compliance policy. But the most important in my opinion is the fee model, right? Like especially if X42 is targeting microtransactions.
- 3:12
The fee model that the facilitator uses is very important, right? For determining whether a transaction even makes sense to send. So if you see over here like a certain facilitator may charge like a percentage fee with a cap. Others might charge like a flat fee. And when you're talking like a tenth of a cent or like a hundth of a cent um these facilitator fees can eat up a large
- 3:32
portion of the transaction, right? Um so this sort of multifacilitator routing is what V2 canonicalizes. And when you add in our previous facilitator fee disclosure, you make facilitator fee routing an actual market with more dynamic information. So one big problem is flat fees kill microp payments right and we know this car network minimums are 30 cents right so anything above 50 or anything below 50 cents is like uneconomic right so this is why stable
- 4:02
coins make sense but even with stable coins if I charge one a tenth of a cent or like a hundred of a cent it doesn't make sense for a lot of transactions right and we have to think about it in the way of APIs when I'm getting the weather from San Francisco like this isn't a call that's going to take like $2 or $10 like this is like a millionth of a cent or like a tenth of a cent, right? And so every small transaction
- 4:26
fee will aggregate and will make it uneconomic, right? So you can see here obviously like for $10 amounts like a five- cent flat fee is like fine, but for normal API calls, right, which are high frequency but low value, even charging like a flat fee of 5 cents is way too much, right? you're going to lose like huge amounts of margin on each one of those calls.
- 4:50
So maybe for users, flat fees don't make a ton of sense. But there's another possible issue for facilitators. If you don't charge with fat flat fees, you can run into gas issues, right? So think about it this way. When the settlement cost is greater than the fee earned for every transaction, then you're just losing money on every transaction, right? as a facilitator, I could just be sending like a tenth of a
- 5:15
cent fee transaction and me as a facilitator has to land that transaction on the chain and if the gas is too much, I'm losing a massive amount per that transaction. I'm not going to enable it, right? So there's definitely this weird dynamic where for users you care about really really low fees.
- 5:32
Obviously the microtransactions like um is very sensitive to the amount but for facilitators they have to run an economic business, right? So we at say are sort of thinking about how we can best deal with this. There's some workarounds. Obviously some chains offer gasless transactions but there has to be something in the middle.
- 5:52
The second thing here that I want to discuss is just on different threat models that will come up right and so this is one thing that I think X42 will start bringing to light more is that microp payments add this threat model that we normally aren't used to especially for humans who use like card networks.
- 6:09
On the payer side, there's spam and DOS like I covered. On the facilitator side, they can sort of lie about how much they're settling and, you know, overpric you. And then on the chain side, there's obviously adversaries who can exploit the chain, right?
- 6:24
I'm not going to go into a ton of detail. We kind of covered this before, but like I mentioned, even if you want to make microtransactions economic and viable by, let's say, removing gas costs, right? I can set be an attacker and I can basically spam the facilitator, right? And and because they have to settle that transaction, they're forced to lose a ton on gas costs and I myself only have to pay a fraction of a
- 6:48
cent per transaction, right? So easy spam and DOS vectors that microtransactions enable. Um, and there's ways around this. The one that's most common and frankly what we'll have to deal with is batching, right? Even though we don't have to batch like how card networks batch, you can batch let's say up to an amount that makes economic sense for the facilitator. So they can wait until they receive let's say end transactions that each in aggregate will
- 7:13
allow them to settle a normal transaction that they can take profit from. This is still an open question. Then there's like various like pricing attacks, right? So the facilitator itself there's no guarantees that what they're quoting me is actually what's going to settle right. So in the quote they can say hey I'm going to charge this amount um and variable based on the gas price like I will settle in in the
- 7:39
most fair way u but in theory they can go back and say oh like you know I I charge you 50 50 times more because the chain gas was super high and we're talking about users who are just using an API they they don't want to deal with the blockchain they don't want to deal with any of this infrastructure so in theory these facilitators can get away with it right and so some workarounds that you know kind of we've addressed in the proposal like you can standardize
- 8:02
disclosure like a signature uh in the receipt so that you can guarantee that this was the amount that was used for settling and this was the amount that we quoted you and they're roughly similar. Um and there's other ways as well as like reputation, right? Like so certain facilitators if they over quote or they sort of misuse funds like you can route to the another facilitator who has a better reputation and then yeah there there's like gas fees. Um, this is normal, I'd say, but
- 8:30
like definitely something that gets um worse as you accept microtransactions. Um, if an attacker like can watch the gas and flood the network right as congestion increases, they themselves may not have to pay a ton, but the facilitator is going to be in charge of basically landing these uneconomic transactions, right? So, there's a lot to do here. Um, some of the mitigations here are not super great, right? Like deferring settlement again isn't great UX. Um, I think what is more interesting
- 8:58
to me here is potentially at the L1 layer introducing like a payment lane. So you guarantee inclusion and you have like potentially gasless transactions for just stable coin transfers. Then things like congestion from trading fees and whatnot don't necessarily affect X42 API calls.
- 9:17
So yeah, in general, we're particularly excited about X42 and um, we have this proposal out. There will be a lot more coming. I think one on the product side there's a lot to do to make XRO2 kind of like a card network the product that normal people use but then even from a chain perspective there's stuff on like you know this specific attack vectors payment lanes and whatnot that as more of these payment lanes pop up we're going to have to sort of face so would
- 9:43
love to connect hit me up on Twitter or email and engage with our proposal thanks