The first time I swapped one currency for another on the blockchain, my hands were shaking so hard I had to put the phone down on the table.
We were at the basement café again - the one where she introduced me to wallets, with the damp air and the good coffee. Outside it had snowed overnight, the first proper snow of the season, and the few people on the street were walking with the careful sideways shuffle of Tokyoites who hadn't seen real snow since last March. Inside, the windows were fogged. Dev had bought a cinnamon roll he was tearing into pieces and not eating. Moolah was, as usual, sipping a latte that no one had seen her order.
I had thirty dollars of USDC sitting in my wallet. I wanted to convert it into ether.
"Priya," Moolah said gently. "Breathe."
"What if I send it to the wrong address..."
"Then it's probably gone forever. But you're not going to send it to the wrong address, because we are doing this slowly. What you're about to use isn't an exchange in the way your brain is picturing one. It's something stranger. Before you press anything, let me explain what's actually going to happen."
I put the phone face down. I was grateful.
"What's an exchange," she began, "in the world your brain knows?"
"A place where buyers and sellers meet. A stock exchange. A foreign currency booth at the airport."
"How do they work?"
"There's an order book. People say I'll buy at this price, others say I'll sell at that price, and when those numbers meet, a trade happens." I did my homework because I was just so afraid something would go wrong on these exchanges.
"Good. That's how every exchange has worked, more or less, since stockbrokers gathered under a buttonwood tree in lower Manhattan in 1792. Buyers and sellers, matched by a middleman. Now -" she tapped my phone with one paw - "this app is not that. There is no order book or middleman. There are no buyers or sellers waiting for you. Nobody is on the other side of your trade."
Dev was nodding so vigorously I worried about his neck.
"So who am I trading with?"
"A pool. A liquidity pool. Imagine two enormous buckets connected by a pipe. One bucket is full of USDC. The other bucket is full of ether. The buckets are connected by a rule - a piece of code - that says: the two buckets must always have the same total value. If you take ether out of one, you must put USDC into the other, in just the right amount that the totals stay balanced."
"And the buckets just… exist?"
"They exist because thousands of strangers - liquidity providers - have deposited their own ether and their own USDC into them. They earn a small fee on every trade. Their reasons we'll get to next week. For now, accept that the buckets are full because someone made them full, and they keep being full because the system pays people to keep them that way."
"Okay."
"So when you press swap, here's what happens. You drop thirty USDC into the USDC bucket. The pipe rebalances. Some ether comes out of the ether bucket. You receive that ether in your wallet. Done. There was no buyer or seller. Just a bucket and a rule and you. The whole thing takes about twelve seconds."
I picked the phone back up. I scrolled to the swap screen.
"Now look at the price," Moolah said. "It says you'll get a certain amount of ether for your thirty USDC. Below it, it says minimum received. That's slightly less. Why?"
"I have no idea."
"Because between the moment you press the button and the moment your transaction reaches the network, the bucket might shift. Someone else might trade against the same pool. The price might move a fraction. The minimum received is the worst price you're willing to accept. If the actual price ends up worse than that, your transaction fails and you don't lose anything except the gas fee."
"That's called slippage," Dev said helpfully.
"That's called slippage. Set it too tight and your trades will keep failing. Set it too loose and a bad actor can manipulate the pool to drain you. The default - half a percent, one percent - is fine for ninety-nine percent of trades."
"And the fee on the trade itself?"
"Goes from you to the people who filled the buckets. A small slice of every swap, paid to whoever's keeping the pool full. That's their business model. They put their money in, the world trades against it, they earn pennies on every transaction."
I stared at the screen. The math looked correct. The numbers were small. My finger hovered.
"What if it doesn't work?"
"Then it doesn't work. The transaction reverts. You lose the gas fee - eighty cents - and your USDC is still in your wallet, untouched. Failed transactions on this kind of system are loud, not quiet. Either you get the ether or you get your dollars back. There is no third state where the money simply disappears."
"Unless I sent it to the wrong -"
"You are not sending it anywhere, Priya. You are interacting with a smart contract. The contract has a fixed address, baked into the app, that thousands of people have used today. You don't get to mistype it."
"And what does this approval do, I thought I was going to swap some ether?"
"Technically, you are asking the smart contract to take your asset and make the swap. So you must give them your approval." I wasn't able to voice more concern before she held out a paw. "It’s a one-off thing. Just approve it and try it our."
I approved and a few seconds later, pressed swap.
The phone showed a spinner. The spinner spun for nine seconds. And then, in a quiet popping animation, the ether appeared in my wallet. The number was almost exactly what the screen had promised. I was off by something like four cents on the predicted amount, well within the slippage I'd set.
I had just traded one currency for another, on a global financial network, with no broker and no bank and no permission, in less time than it took me to order the coffee in front of me.
"That's it?" I said.
"That's it."
"That was -"
"Anti-climactic. Yes. Most things in DeFi are. The drama is hidden in the code. From your side, you tap a button and a little number changes."
I sat back. Dev was grinning.
"Now," Moolah said, "I want you to think about what just happened. Not the mechanics - the shape. You did not visit a website that took your money and gave you a balance. The exchange does not have your money. The exchange did not even know your name. There is no ledger anywhere that says Priya owes us nothing or Priya owns this much. There is only the blockchain, where it shows that thirty USDC left your address and a small amount of ether arrived. The exchange was a tool. The exchange did not store anything. The exchange could shut down tomorrow and your ether would be unaffected."
"That's a strange feeling."
"It's the feeling that the system is real. That there isn't a man in a back room writing your balance into a database. There's just code, and pools, and your address, and the rules that connect them."
I wrote in the notebook. DEX = no order book. AMM = a pool with a rule. Slippage = the worst price I'll accept. The exchange does not have my money.
Underneath, I drew a small picture of two buckets with a pipe between them. It was not a good drawing. But it helped.
Dev pulled a piece off his cinnamon roll, finally ate it, and immediately got cinnamon dust on his coat.
"Tell her about how this is built," he said.
"Next week," Moolah said. "Next week we talk about the people who fill the buckets - and the surprisingly painful word impermanent."
I noticed her tone. The careful, measured way she said painful.
"Dev," I said. "Have you done this before?"
He didn't look up from his cinnamon roll. "Yeah."
"How did it go?"
"Badly."
Moolah's whiskers twitched.
"Save it," she said. "We'll need that story next week."

