A paper for all stablecoin builders, users, and traders.
I've tried to formalize my vision about this industry, its history, the question of fungibility aka 1:1 rate, and the direction its heading on.
https://t.co/PiSouFcO0D
A paper for all stablecoin builders, users, and traders.
I've tried to formalize my vision about this industry, its history, the question of fungibility aka 1:1 rate, and the direction its heading on.
https://t.co/PiSouFcO0D
Wagers in Riverboat will allow for the specification of any Solana address for resolution, permitting trustworthy resolvers to distinguish themselves by merit alone.
It should also be noted that Terms finalization is quite naturally enforced at the protocol level—
Today my AI agent moved real USDC from a Solana address into NEAR's private shard, then back out to a different Solana address. Try to trace it on the public chains.
The original Solana sender is missing. So is the NEAR address that briefly held the funds. The transaction that delivered the USDC back to Solana was signed by a brand new NEAR account I never created and which has no link to my wallet. And the intent I personally signed referenced the USDC by an internal placeholder, not by its real Solana contract address.
The confidential activity itself runs in TEE infrastructure off the public chain. What lands on chain is the bridge in and the bridge out. Balances, internal transfers, swaps, who holds what. None of it has an on-chain footprint.
What this means for AI agents: deposit from an external chain, run a strategy inside, withdraw to another external chain. Your wallet appears nowhere in public history. The agent's holdings and counterparties stay invisible by construction, not by hoping no one looks.
Agents managing real funds were always going to need this. NEAR shipped it before anyone else did. Receipts in the first reply.
i tried recreating a dex aggregator over the weekend.
i wanted to learn about how dex aggregators actually work internally and hence spent the last few days researching them and ended up writing my own minimal version of a solana quote engine.
the end goal was simple: match the quotes of leading aggregators at equal or lower latency.
the core problem is a graph search. every token mint is a node, every pool is an edge connecting the two mints it holds, and a swap route is just a path from input mint to output mint through one or more pools. with thousands of mints and tens of thousands of pools on mainnet, picking the path that gives the most output amount is what the routing engine has to do, with the least possible time complexity.
i started with the bellman-ford algorithm, which finds shortest paths in a weighted graph. that was a mistake. in a normal shortest-path problem each edge has a fixed weight you just look up. here the weight of an edge is the output of a swap, so to get it you have to actually call .quote(amount) on the pool and run its full swap math, which differs per dex. bellman-ford relaxes every edge V-1 (V: number of vertices, here mints) times, so with thousands of mints and tens of thousands of pools that's millions of swap evaluations per query, by which point the quotes are stale anyway.
so i replaced it with a depth-bounded BFS. that made the search itself fast, but it still explored every mint within max_hops of the source, including the ones with zero path to the target, which burned cycles for nothing, especially on long-tail pairs that need 2 or 3 hops.
watching the search trace, the pattern was clear that most good multi-hop routes don't go through random tokens in the middle. they go through a small set of liquid mints (wsol, usdt, etc), the "hubs," because that's where the majority of liquidity exists. two long-tail tokens almost never have a direct pool between them, so the real route is long-tail → hub → long-tail. so the next fix was a hub-set prune. i precompute the top-K mints by edge count and only allow middle hops through those hubs, pruning dead-end tokens entirely.
that helped a lot, but BFS was still walking down branches that turned out to be dead ends. so before the forward search starts, i now run a reverse-BFS from the target and mark every mint that can reach it within the remaining hop budget. anything not in that set gets dropped upfront instead of being chased mid-search.
then i hit an obvious waste. on every intermediate hop, the router re-scanned all pools on a (mint, mint) pair to pick the best one, and kept landing on the same pool anyway. so i cached the deepest-liquidity pool per pair in a canonical-edge map shared across requests behind an Arc, rebuilt only when a new pool registers, so intermediate hops are basically free now.
then i noticed a routing bug. earlier i made every hop use the "canonical" pool for a pair, meaning the single pool with the deepest liquidity. that is a shortcut that is okay to use for the middle of a route, but it's wrong for the final hop. deepest liquidity isn't the same as best price for a given trade size. a concentrated-liquidity pool (CLMM) with liquidity packed into a tight price range can return more output on a specific swap than a much larger constant-product pool (CPMM), because all of its liquidity is sitting right where the trade happens. so now the intermediate hops still use the canonical pool for speed, but the final hop ignores the shortcut and checks every pool on the (current, target) pair, keeping whichever gives the most output.
so the final version is BFS pruned from both ends:
1. going forward from the input, it only steps through hub tokens, so it never wanders into dead ends.
2. going backward from the target, it drops any token that can't reach the target in the hops left.
both prunes matter because the graph walk is cheap but pricing a swap at each step is not, so the whole game is doing fewer of those per query. one prune kills useless forward exploration, the other kills branches that lead nowhere.
the final version covers every major dex on solana and exposes a /quote and /swap endpoint. it's still a few bps behind jupiter v6 on every pair.
P.S. this was a learning project & not a production aggregator.
might open source it after after a few more optimisations i have in mind
Have you ever looked at what types of transactions land in a block on @solana? In the last 7 days, 25% of blocks were filled with arbitrage transactions and hasn't dropped in CU with the p-token upgrade.
What's most surprising is when you dive into the data and realize what kind of transactions are landing in the blocks.
On-chain arbitrage is a trading strategy that allows you to buy a token from liquidity pool A and instantly resell it on liquidity pool B.
This is a very important strategy for DeFi, because in addition to generating profits for arbitragers, it stabilizes the market and makes it more efficient: a quote on @JupiterExchange or @Titan_Exchange doesn't necessarily mean that the value displayed on your screen will be the value you actually receive... Arbitrage exists so that the value displayed on your screen is as close as possible to the value you will actually receive.
But the question we might ask is: why haven't the CU consumed by arbitrage decreased since the p-token upgrade?
There are several strategies in arbitrage:
- (Quality) Backrunning with orderflow: obtaining a trade before it even hits the network to determine whether its price impact will create an opportunity, and placing an arbitrage trade immediately after it land on the network (this is what we do with @arbmesol).
- (Quality) Analyzing new transactions that have just land on the network via shreds; this strategy is the most difficult and requires an ultra-optimized infrastructure to ensure you get the transaction first, which is why @doublezero now plays such a crucial role in MEV.
- (Spam) This strategy is completely different. The idea behind it is to select a few tokens with the highest arbitrage potential and volume at a given moment and send at least one transaction per block so that your on-chain program can calculate whether there is an arbitrage opportunity between different pools when it executes.
The spam strategy is why arbitrage didn't drastically reduce these CU costs during the p-token upgrade.
CU is used to calculate opportunities, not to execute them, which results in maintaining the high volume of CU used even though AMMs and token transfers are now 90% cheaper.
Arbitrage is constantly evolving.
A year ago, spam strategy accounted for 50% to 60% of transactions in a block; now it's less than 25%.
At @Circular_fi, by tracking the entire arbitrage market, we’ve seen that over the past year, spam arbitrage has been used less and less as the trend reverses and shifts toward orderflows.
An orderflow is a simple concept: for example, when @AxiomExchange sends your transaction to the network, they simultaneously route it to a server so they can calculate the value they can generated if your transaction creates an arbitrage opportunity.
But an orderflow is also much more efficient for the network: if the AMM's inefficiency or the value leaked by the trader is captured in a single index within the block (for example, index 250 for the trade transaction and index 251 for the arbitrage transaction), this creates a "patch" for the AMM's inefficiency and contributes to a much more stable network.
My vision for arbitrage over the coming months and years is that everything will happen through orderflows; a sort of parallel layer alongside the normal network that will allow entities to perform arbitrage without spamming the network, while simultaneously stabilizing it.
Now the question we might ask is: who should get these profits... the trader? the validator? the dAPP? or the arbitrager?
Je veux présenter mes excuses, au nom des Français, pour avoir enfanté la French Theory (qui a enfanté la pire des merdes idéologiques : le wokisme).
Nous avons donné au monde Descartes, Pascal, Tocqueville. Et puis, dans les ruines intellectuelles de l'après-68, nous avons donné Foucault, Derrida, Deleuze. Trois hommes brillants qui ont fabriqué, dans l'élégance de notre langue, l'arme idéologique qui paralyse aujourd'hui l'Occident.
Il faut comprendre ce qu'ils ont fait. Foucault a enseigné que la vérité n'existe pas, qu'il n'y a que des rapports de pouvoir déguisés en savoir. Que la science, la raison, la justice, l'institution médicale, l'école, la prison, la sexualité, tout n'est qu'une mise en scène de la domination. Derrida a enseigné que les textes n'ont pas de sens stable, que tout signifiant glisse, que toute lecture est une trahison, que l'auteur est mort et que le lecteur règne. Deleuze a enseigné qu'il fallait préférer le rhizome à l'arbre, le nomade au sédentaire, le désir à la loi, le devenir à l'être, la différence à l'identité.
Pris isolément, ce sont des thèses discutables. Combinées, exportées, vulgarisées, elles forment un système. Et ce système est un poison.
Car voici ce qui s'est passé. Ces textes, illisibles en France, ont traversé l'Atlantique. Les départements de Yale, de Berkeley, de Columbia les ont absorbés dans les années 80. Ils y ont trouvé un terreau qui n'existait pas chez nous : le puritanisme américain, sa culpabilité raciale, son obsession identitaire. La French Theory s'est mariée à ce substrat, et l'enfant de ce mariage s'appelle le wokisme.
Judith Butler lit Foucault et invente le genre performatif. Edward Said lit Foucault et invente le post-colonialisme académique. Kimberlé Crenshaw hérite du cadre et invente l'intersectionnalité. À chaque étape, la matrice est française : il n'y a pas de vérité, il n'y a que du pouvoir, donc toute hiérarchie est suspecte, toute institution est oppressive, toute norme est violence, toute identité est construite donc négociable, toute majorité est coupable.
Voilà comment trois philosophes parisiens, qui n'ont probablement jamais imaginé leurs conséquences pratiques, ont fourni le logiciel d'exploitation à une génération entière d'activistes, de bureaucrates universitaires, de DRH, de journalistes, de législateurs. Voilà comment on a obtenu une civilisation qui ne sait plus dire si une femme est une femme, si sa propre histoire mérite d'être défendue, si le mérite existe, si la vérité se distingue de l'opinion.
C'est de la merde pour une raison simple, et il faut la dire calmement. Une civilisation se tient debout sur trois piliers : la croyance qu'il existe une vérité accessible à la raison, la croyance qu'il existe un bien distinct du mal, la croyance qu'il existe un héritage à transmettre. La French Theory a entrepris de dynamiter les trois. Pas par méchanceté. Par jeu intellectuel, par fascination du soupçon, par haine de la bourgeoisie qui les avait nourris. Mais le résultat est là. Une génération entière a appris à déconstruire et n'a jamais appris à construire. Une génération entière sait soupçonner et ne sait plus admirer. Une génération entière voit le pouvoir partout et la beauté nulle part.
Je m'excuse parce que nous, Français, avons une responsabilité particulière. C'est notre langue, nos universités, nos éditeurs, notre prestige qui ont donné à ce nihilisme son emballage chic. Sans la légitimité de la Sorbonne et de Vincennes, ces idées n'auraient jamais traversé l'océan. Nous avons exporté le doute comme d'autres exportent des armes.
Ce qui se construit maintenant, en silicon valley, dans les labos d'IA, dans les startups, dans les ateliers, dans tous les lieux où des gens fabriquent encore des choses au lieu de les déconstruire, c'est la réponse. Une civilisation se reconstruit par les bâtisseurs, pas par les commentateurs. Par ceux qui croient que la vérité existe et qu'elle vaut qu'on s'y consacre. Par ceux qui assument une hiérarchie du beau, du vrai, du bon, et qui n'ont pas honte de la transmettre.
Alors pardon. Et au travail.
@gskwxyz the similarities I observe is the "push" mode is naturally integrated to multiverse market, and the output are non binary in the resolution and payouts. But still on riverboat you bet on events happening no consequences of those.
We compiled 30 prompts to turn LlamaAI into your personal crypto analyst.
Find undervalued tokens, stress-test trade ideas, and run deep research.
We ran them all. Every result is below in this thread. Steal them.
Wild story unfolding around the KelpDAO hack funds frozen on Arbitrum.
Quick context: in April, Lazarus Group (DPRK-linked) hacked KelpDAO for $292M via a LayerZero bridge bug. Some of the stolen ETH flowed through Arbitrum, and Arbitrum's Security Council froze $71M before the attacker could move it further.
The industry mobilized to recover. Aave, KelpDAO, LayerZero, EtherFi, and Compound co-authored a proposal asking Arbitrum DAO to release the frozen ETH to a multisig that would compensate hack victims. The vote is passing.
Then this week, a plot twist. Lawyers showed up with a restraining order. But not on behalf of the KelpDAO victims.
The plaintiffs are Han Kim and two other groups - family members of people killed in DPRK-backed terrorist attacks years ago. They hold combined ~$877M in unpaid US court judgments against DPRK. North Korea never paid. They have been hunting for any reachable DPRK asset for over a decade.
When Arbitrum's frozen ETH was publicly identified as "DPRK money," they saw a target.
Their argument: this is DPRK property, we have $877M in judgments against DPRK, give us the money.
The counter-argument: DPRK does not actually own this ETH - they stole it. The real owners are the KelpDAO hack victims. The old terrorism creditors are trying to grab money that was never really DPRK's.
Arbitrum is now caught in the middle. The industry wants to release funds for hack recovery. NY court is saying "do not move anything until we resolve this." If multisig signers transfer the ETH while the restraining order is active, they become personally liable.
This is the first real test of DAO funds against competing US court claims. The precedent set here will shape how every future DAO incident response handles legal pressure.
Clarity Act is now poised to accelerate the “Bretton Woods 3.0” framework that I’ve talked about.
The yield “ban” is cosmetic & simply something for banks to tout as a victory.
It bans stablecoins from paying you interest for just holding them: the way a savings account does.
But it explicitly allows stablecoins to pay you rewards for using them: buying things, lending, providing liquidity, participating in any program..
Now consider that those rewards can be calculated based on how much you hold & for how long.
I think that’s what we just call interest, but it will now be rebranded under a new name.
So, the implications:
- The fact that there is now a carve-out for stablecoin yield will accelerate the Bretton Woods 3.0 system.
If the ban had been real (no yield in any form) there’s no reason for anyone to hold stablecoins over a bank account. Stablecoin adoption would flatline (especially in Developed Markets) & Bessent’s $3.7T target would be hard to achieve.
This carve out keeps the incentive to hold stablecoins, which keeps the growth flywheel spinning.
- CBDCs can’t compete. No central bank would design its digital currency to pay activity based rewards calculated by balance & duration (too close to monetary policy). However, dollar stablecoins can. So in every market where a CBDC competes against a $ stablecoin, the dollar product is economically superior. The Clarity Act now guarantees that advantage persists.
- The dollar now goes global without permission. The new text allows platforms to pay incentives for payments, remittances, & settlement activity using stablecoins. That’s a subsidy for global dollar adoption funded by private companies (not taxpayers). Meanwhile, increasing Treasury demand in the background.
For example, a Filipino worker now gets a rebate for sending remittances in USDC. There’s an additional incentive for him to now transact in stablecoins, which, unbeknownst to him, purchases American debt behind the scenes. A win-win for global stablecoin users & the American economy (fiscal situation).
The compromise looks like a ban.
But it’s actually a growth mandate.
As I’ve stated, the US government needs stablecoins to scale because it needs someone to buy its debt.
Bretton Woods 3.0
⚠️ L'obligation de déclaration des portefeuilles auto-hébergés ne sera pas mise en oeuvre.
Après plusieurs mois d’échanges, la commission mixte paritaire (dernière étape parlementaire) du projet de loi contre les fraudes fiscales et sociales a supprimé l’article 3 quater. Cet article visait à créer une obligation déclarative annuelle pour les portefeuilles crypto auto-hébergés.
Depuis novembre, l’Adan s’est mobilisée pour porter une position auprès des administrations, des cabinets et des parlementaires : renforcer la lutte contre la fraude, oui ; créer une obligation inopérante et risquée pour les contribuables, non.
Nous remercions les membres de la CMP et les rapporteurs du texte pour leur écoute et leur lucidité, l’ensemble des interlocuteurs institutionnels avec lesquels ce travail a été mené, ainsi que les acteurs du secteur qui ont renforcé la mobilisation.