The false spring had broken.
In the week between Episode Fourteen and Episode Fifteen, the warmth that had coaxed open the early plum blossoms was punished by a hard, sharp cold front that came down out of Siberia and pinned the city under a sky the color of pencil lead. The blossoms that had opened too eagerly were brown at the edges. The puddles from the previous week were skating rinks. Dev had texted me at six in the morning saying bring boots, also possibly a will, which I interpreted as theatrical.
Moolah met us outside Suidobashi Station. She was wearing, for the first time I had ever seen, a small knitted scarf the color of moss, and a faintly impatient expression. She led us, without saying where we were going, down a side street, around a corner, down a narrow flight of stone steps, through an unmarked wooden door, down another flight of steps, and into a basement bar.
There were no windows. There were no clocks. The only light came from amber sconces and the small pool of yellow over the bar where a man in his sixties was carefully wiping a glass. A record was playing - something old, something with a horn - and the air smelled of wood and whisky and something I couldn't identify that I would later realize was simply time. Three other patrons sat at the bar, none of them visible above the shoulders.
Moolah led us to a corner booth. She climbed onto the bench with the practiced ease of a regular and gave the bartender a small nod. Three cups of hot tea arrived without being ordered.
"I needed you in a room like this," she said, "for what I'm going to explain."
"What kind of room is this?"
"A sealed one. No windows or clocks. No sunlight, no street, no sense of what time it is or what's happening outside. You could be in this room for six hours and emerge to find it had snowed, or stopped snowing, or that the city had been evacuated, and you would have no idea. You only know what is inside. Anything beyond the walls of this room - to you, right now, sitting here - is entirely a matter of faith."
Dev took a sip of tea. There was - somehow, in this windowless basement - a small piece of straw floating in it. He didn't notice.
"This room," Moolah said, "is what a smart contract is."
I leaned forward.
"A smart contract," she went on, "lives on the blockchain. It can read the blockchain. It knows every transaction, every balance, every other contract on its own chain. That's all it knows. It cannot look out a window. It cannot read a newspaper. It cannot check the weather. It cannot ask what the price of oil is today, or what time it is in London, or whether the World Cup final is over. None of that information is on the blockchain. None of it is reachable. The contract is a brilliant little machine in a closed room, and the room has no doors."
"So how does a lending contract know the price of ether?"
"Excellent question. Because of course it has to know. If you've borrowed against ether and ether's price drops, the contract has to liquidate you. But the contract can't see the price. The price exists in the world outside - on Binance, Coinbase, and a thousand exchanges - and the contract can't see out. So how?"
She let the question sit.
"It needs," she said, "a messenger. Someone outside the room who comes to the door and tells the room what's happening. In our jargon, that messenger is called an oracle."
"Oracle. Like the ones in Greece?"
"The name is borrowed from exactly there. In ancient Greece, an oracle was a person - a priestess, usually - who delivered messages from the gods to mortals. The mortals couldn't speak to the gods directly. They needed an interpreter. The oracle stood between two worlds and translated. Same problem here. The smart contract is the mortal. The world outside is the gods. The oracle stands between."
"And how does that work, technically?"
"There are services - Chainlink is the largest - that run servers off-chain, gather price data from many exchanges, aggregate it into a single number, and post that number to the blockchain on a regular schedule. Once the number is on the blockchain, the contract can read it. The contract doesn't have to leave the room. The number has been delivered to the room."
I wrote Oracle = messenger that brings outside data into the contract in the notebook.
"But," I said, looking up. "How do I trust the messenger?"
Moolah's whiskers twitched. The same approving twitch I had learned to recognize.
"That," she said, "is the entire problem. Because the oracle is a single point of failure. If a contract trusts one server's price feed, and that server gets attacked, or hacked, or simply makes a mistake - the contract acts on bad information. It might liquidate you when it shouldn't have. It might fail to liquidate someone who should have been. It might price your collateral at a thousand times its real value. The oracle, if compromised, can break a contract that was otherwise perfectly written. The room is only as wise as the messenger at the door."
"And there have been -"
"Many. Many incidents. There is a category of attack - oracle manipulation - where a clever attacker briefly distorts the price on a small exchange that an oracle is reading from, just long enough for a smart contract to make a decision based on the distorted price. The attacker borrows enormous sums against fake collateral, or liquidates real positions at fake prices, and walks away with millions before the next oracle update corrects the number. We will, in the spring, talk about a day in March of 2020 when this kind of thing nearly destroyed MakerDAO. The oracle wasn't attacked that day, exactly. It was outrun. The price was moving faster than the messenger could deliver the news."
She gave me a significant look. I wrote Black Thursday - March 2020 - oracle outrun below the previous note and underlined it.
Dev set his tea down. "Tell her how Chainlink solves it."
"Don't say solves," Moolah corrected. "Mitigates. Nothing solves it. The mitigation is to use many messengers. Chainlink is, in its current form, a network of independent servers - dozens of them, run by different operators - each fetching prices from many exchanges. Their answers are averaged together, with outliers thrown out, and the aggregate is what gets posted. Now, to fool the contract, you don't have to fool one server. You have to fool a majority of dozens of servers, all running independently, all watching different sources, all signing their answers. That's much harder. Possible, but harder."
"Is that the only oracle?"
"The biggest, by a wide margin. There are others - UMA, Pyth, RedStone - each with different designs. Some pull data instead of pushing it. Some are designed for specific kinds of data - sports scores, weather, election results. There is a small and surprisingly philosophical industry of people who think very carefully about how we move information from the outside world into a system that cannot leave its own room. They are the priesthood of this little religion. Most of them have never heard themselves described that way and would be embarrassed to."
"And the failure modes?"
"Three main ones. First, manipulation - the attacker distorts the price the oracle is reading. Second, latency - the price moves faster than the oracle can update, so the contract acts on stale data. Third, centralization - too few oracle nodes, run by too few operators, and a single corrupted operator can poison the well. Every oracle network is, in essence, an ongoing argument about which of these three to prioritize. You cannot perfectly solve all three. You pick which trade-off you can live with."
I sat with that for a moment. The bar was very quiet. The record had ended without me noticing, and the bartender was wiping the same glass with the slow patience of someone who had wiped it for the third time.
"This feels like the most important thing you've taught us," I said.
"Why?"
"Because every other thing we've talked about - lending, swapping, liquidations, derivatives - they all depend on prices. And the prices come from oracles. So the oracles are underneath everything. If the oracles fail, everything fails."
Moolah looked at me for a long moment. Then she lifted her tea, took a slow sip, and said, "Yes. That is exactly correct. And it is the thing that almost no retail user thinks about, ever, and the thing that nearly every protocol failure I will tell you about in the spring traces back to in some form. The oracle is the front door of the sealed room. Most people walk past it without looking. They should look."
"And the room?" Dev asked, looking around the bar. "Is the room safe?"
"The room," Moolah said, "is exactly as safe as the messenger. No more. No less. Every smart contract you have ever interacted with is sitting in a room exactly like this one. The world outside its walls is, to it, a rumor. The rumor is delivered by oracles. The rumor is, mostly, true. The trick of building anything in this industry is making sure the rumor stays trustworthy."
We climbed back up the stone steps into the bitter cold. The street lights had come on while we'd been down there. The plum blossoms, browned at the edges, looked smaller than they had that morning.
I pulled my coat tight and tucked the notebook back into my pocket.
The messenger, I thought, all the way home. Everything depends on the messenger.

