
Dara shared her screen, and Val found herself staring at two empty contract templates—side by side like patient ghosts waiting to be filled. One bore the seal of Chain A: a stylized vault door with the words Aureus Ledger inscribed beneath. The other displayed Chain B’s emblem: an open hand with currency symbols floating above the palm.
“Watch carefully,” Dara said, her voice carrying the crisp tone of a teacher who had done this dozens of times before. “I’ll only explain this once. Not because I’m impatient—because if you don’t understand it after one explanation, you shouldn’t be doing it.”
Val leaned closer to her tablet, the blue light washing over her face. “I understand more than you think.”
“Prove it.” Dara dragged a graphic onto the screen: two boxes connected by a glowing thread. “Explain atomic swaps to me like I’m ten years old.”
Val took a breath. She’d practiced this in her head a hundred times, lying awake in her narrow bed while the wall clock ticked. “Two people want to trade apples for oranges. But they don’t trust each other. So they each put their fruit in a box with a timed lock. Both boxes are programmed to open only with the same secret key. They swap boxes. Then they both reveal the key at the same time. If someone tries to cheat, their box locks permanently and the fruit goes back to the owner.”
“Close.” Dara smiled. “The boxes don’t lock permanently—they have timers. If someone doesn’t reveal the key before the timer runs out, the box automatically returns the fruit. That’s the safety hatch.” She pointed to the templates. “Your Aureus goes in Box A. My Credits go in Box B. Box B’s timer is shorter. That means I have to reveal the key first, or I lose my Credits. Once I reveal, you see the key and open Box B to claim my Credits. Then I use the same key to open Box A and claim your Aureus. Atomic. Either both swaps happen, or neither does.”
“Trustless,” Val said.
“Trustless.” Dara nodded. “Now let’s talk about how the key works. It’s not a physical key—it’s a secret. A string of data. We call it the preimage.”
She pulled up a new window: a command line interface with a blinking cursor.
“You, Val, are going to generate this secret. You can pick anything—a sentence, a random string of numbers, a line from a poem you like. But it needs to be long enough that no one can guess it. At least twenty characters. Mix of letters, numbers, symbols.”
“Why me? Why not you?”
“Because I’m the broker. The person who needs the swap—that’s you—should control the secret. That way you know I can’t pre-commit to something shady.” Dara’s fingers hovered over her keyboard. “Once you have your secret, you run it through a hash function.”
The screen filled with text:
text
hash(preimage) -> 64-character hexadecimal string
“A hash is one-way math,” Dara continued. “You can put a secret in and get a fingerprint out. But you can’t take a fingerprint and reverse it to get the secret. That’s the magic. You give me the fingerprint—the hash—but you keep the actual secret to yourself. I lock my box with that fingerprint. Only the correct secret—the preimage—can unlock it.”
Val felt a small spark of pride. This was exactly what she’d studied. “So you never know my secret until I choose to reveal it.”
“Correct. And once you reveal it, the swap completes instantly. No take-backs.” Dara leaned back. “Any questions so far?”
“The timelocks,” Val said. “You mentioned staggered deadlines. How much time are we talking?”
Dara pulled up a calendar. “Standard terms: your contract on Chain A gets a twenty-four-hour timelock. My contract on Chain B gets a twelve-hour timelock. That means I have to reveal my preimage—your secret—within twelve hours, or my Credits go back to me. You, on the other hand, have a full day to claim my Credits after I reveal. The extra time protects you in case of network delays or other problems.”
“So you reveal first.”
“I reveal first. That’s the risk I take as the broker—it shows good faith.” Dara’s expression turned serious. “But here’s what you need to watch for. If I don’t reveal within twelve hours, the swap fails. Your Aureus stays locked for another twelve hours—until the full twenty-four are up—then it returns to your wallet. You lose nothing but time.”
“What about you? If you reveal and I don’t claim your Credits in time?”
“Then your Aureus is still locked, and I have your secret—so I can claim it. That’s the asymmetry. The person who reveals first is vulnerable to the other party stalling. That’s why I charge a fee—to cover that risk.” Dara’s eyes met Val’s through the video feed. “But I’ve done forty-seven swaps. I’ve never stalled. My reputation depends on it.”
Val nodded slowly. It made sense. The incentives aligned—Dara wanted the fee, so she wanted the swap to complete. “Okay. What are the rates again?”
“5,000 Aureus for 4,800 Credits. My fee is 200 Credits, which is roughly four percent. Fair market rate is 1.02 Credits per Aureus, so you’re getting 0.96—standard cross-chain friction.” Dara typed, and the contract templates updated with the numbers. “I’ll lock 4,800 Credits. You lock 5,000 Aureus. We use the same hashlock. Timelocks: twelve hours for me, twenty-four for you.”
Val did the math again, checking for hidden fees or gotchas. It was straightforward—almost painfully so. “Agreed.”
“Then we need to record the terms.” Dara pulled up a third window—a smart contract generator with editable fields. “I’m going to write the agreement in plain language, then we’ll both sign with our wallet addresses. This isn’t legally binding—the Warden doesn’t recognize cross-chain contracts—but it creates a record that the community can verify. If someone cheats, their reputation gets destroyed.”
She typed quickly:
ATOMIC SWAP AGREEMENT
Between: PreimageSeeker (Chain A, wallet: [TBD])
And: HashlockHero (Chain B, wallet: [TBD])
Terms:
- PreimageSeeker locks 5,000 Aureus in HTLC on Chain A with hashlock H.
- HashlockHero locks 4,800 Credits in HTLC on Chain B with same hashlock H.
- Chain B timelock: 12 hours. Chain A timelock: 24 hours.
- HashlockHero agrees to reveal preimage within 12 hours.
- PreimageSeeker agrees to claim Chain B funds within 24 hours of reveal.
- Fee: 200 Credits, deducted from swap (already reflected in locked amount).
Consequences of breach: Public posting of evidence, permanent reputation ban on all major forums, and referral to cross-chain arbitration if available.
“Sign here,” Dara said, highlighting two lines at the bottom.
Val hesitated. “You haven’t told me how to generate the preimage.”
“I was getting to that.” Dara closed the agreement window temporarily. “First rule: never use something predictable. Not your birthday. Not your sister’s name. Not a quote from a famous movie. The hash function is secure, but if your secret is guessable, someone could brute-force it.”
“I know how to generate entropy,” Val said, a little defensively.
“I’m sure you do. But humor me.” Dara pulled up a random number generator. “I recommend at least twenty characters. Mix of uppercase, lowercase, numbers, and at least one symbol. Write it down on paper—not on your tablet, not in the cloud. Paper. Then memorize it.”
Val pulled a small notebook from her pocket—the same one she used for the Hash Club meetings. She flipped to a blank page and clicked her pen.
“Ready,” she said.
“Go ahead. I’ll look away.” Dara’s camera feed tilted upward, showing only the ceiling of her booth. “Tell me when you’re done.”
Val thought about Mira. About the voice message. About the quiet, tired way her sister had said “When are you coming?”
She wrote:
SisterSurvives2025!$#
That was twenty-two characters. Uppercase S, lowercase letters, numbers, symbols. It wasn’t random—but it was meaningful. And no one would guess it because no one knew Mira was sick. The Warden’s surveillance hadn’t flagged the medical records. The Black Market Dealer didn’t even know Val existed.
It would work.
She added a random salt—five extra characters she generated by closing her eyes and mashing the keyboard: 9xT&2. Then she appended it to the end.
SisterSurvives2025!$#9xT&2
Twenty-nine characters. Unpredictable. Unrepeatable.
“Done,” Val said.
Dara’s camera tilted back down. “Good. Now hash it.”
Val opened a hash calculator on her tablet—a trusted offline tool she’d downloaded months ago. She typed the preimage into the input field and pressed ENTER.
The screen returned:
a4b8f2c9d1e5f7a3b2c4d6e8f9a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0
Sixty-four characters of hexadecimal. A fingerprint of her secret, utterly unrecognizable from the original.
“That’s the hash,” Val said. “I’ll send it to you.”
She copied the string and pasted it into the chat. Dara’s eyes scanned it, then nodded.
“Perfect.” She reopened the agreement and added the hash to the terms. “Now we both sign.”
Val linked her wallet address—a pseudonymous identifier on Chain A’s ledger. Dara did the same on Chain B’s system. The agreement timestamped itself, recording their commitment.
“One last thing before we lock funds,” Dara said. “The hashlock contract on Chain A needs to be funded from your wallet. You’ll send 5,000 Aureus to a temporary escrow address. The contract will hold it until either you reveal the preimage, or the timelock expires. The same for me on Chain B.”
“I understand.”
“Then let’s do it.” Dara’s voice softened. “You’re sure about this? Once you lock, there’s no undo. Even if you change your mind, the funds stay frozen until the timelock runs out.”
Val thought about Mira’s medical chart. The blue line sloping downward. The twenty-eight days left.
“I’ve never been more sure of anything.”
Dara walked her through the locking process step by step.
First, Val navigated to Chain A’s smart contract platform—a clunky, government-sanctioned interface designed for internal transactions. She had to bypass three warnings about “unauthorized contract interactions” and click through a disclaimer that threatened legal penalties. Her hands were steady, but her heart pounded hard enough that she could feel it in her throat.
She pasted the contract code Dara had provided. It was short—only fifty lines—but every line mattered. She double-checked the hash, the timelock value, her own wallet address, and Dara’s.
Everything matched.
She pressed CONFIRM.
The wallet interface asked for her private key passphrase. She typed it—sixteen characters she’d memorized years ago—and felt the familiar lurch of funds leaving her control.
TRANSACTION BROADCAST: 5,000 AUREUS LOCKED IN HTLC. TIMELOCK: 24 HOURS. HASH: a4b8f2c9...
The screen updated. Her wallet balance dropped from 5,000 to zero.
Val stared at the zero. Two years of saving. Gone from her control in a single click.
“Your turn,” she said, her voice quieter than she intended.
Dara nodded. She spent several minutes on her end—Val could see her typing, clicking, checking. Chain B’s interface was faster, more colorful, but also more chaotic. Dara had to navigate around pop-up ads and network congestion warnings.
Finally, Dara leaned back. TRANSACTION BROADCAST: 4,800 CREDITS LOCKED IN HTLC. TIMELOCK: 12 HOURS. HASH: a4b8f2c9...
“We’re live,” Dara said. “Both contracts are funded. Now we wait for the timers.”
Val pulled up the status page. Two boxes appeared on her screen: one gray (Chain A), one blue (Chain B). Both had glowing green indicators that read ACTIVE.
Beneath the Chain A box: TIME REMAINING: 23:58:12
Beneath the Chain B box: TIME REMAINING: 11:58:12
“The reveal should happen before my timer hits zero,” Dara said. “I’ll message you here when I’m ready. You’ll need to be online to claim my Credits within ten minutes of my reveal—the faster, the better.”
“I’ll be here.”
“Good.” Dara’s smile returned, but it didn’t reach her eyes. “Same time tomorrow. Don’t be late.”
The video feed cut off.
Val sat alone in the abandoned subway station, staring at the two glowing boxes on her screen. The emergency beacon flickered. The rain had started again, dripping through a crack in the ceiling somewhere behind her.
Twenty-three hours and fifty-eight minutes.
She had a secret—SisterSurvives2025!$#9xT&2—written on a piece of paper in her pocket.
Dara had a hash.
The swap was locked.
Now all they had to do was reveal.
Val walked home through the rain, her hood pulled low over her face. The streets of Chain A were empty at this hour—just the occasional Warden drone humming overhead, its camera eye scanning for curfew violators. She kept her head down, her hands in her pockets, the notebook with the preimage pressed against her thigh.
Her apartment building loomed ahead, gray concrete against a gray sky. She climbed the stairs to the third floor, unlocked the door, and stepped inside.
The wall clock said 2:47 AM.
Her father’s boots were by the door. He was home from his shift, asleep in the bedroom, probably exhausted from another twelve hours at the Mint. Val was grateful—she didn’t have the energy to explain where she’d been.
She tiptoed to her room, closed the door, and collapsed onto her bed.
The tablet was still open. The two glowing boxes remained on the screen.
Chain A: 23:47:03 remaining
Chain B: 11:47:03 remaining
Val set an alarm for ten hours—one hour before Dara’s timelock expired. Then she closed her eyes and tried to sleep.
But every time she drifted off, she saw the hash. The sixty-four-character fingerprint of her secret. It floated behind her eyelids, taunting her with its unbreakable simplicity.
You have the preimage, she told herself. Dara doesn’t. You’re safe.
But somewhere in the back of her mind, a small voice whispered: What if Dara doesn’t reveal? What if she lets her timelock expire? What if this was never a real swap at all?
Val pushed the thought away.
She had to trust the system.
That was the whole point of atomic swaps.
Trustless.
She repeated the word until it lost its meaning, then repeated it again, until finally the rain and the ticking clock and the weight of the night pulled her under.
Table of contents:
Introduction
Chapter 1: Two Chains, One Prison
Chapter 2: The Hashlock Agreement
Chapter 3: A Secret Preimage <<<<<< NEXT
Chapter 4: The Timeout Problem
Chapter 5: The Uncooperative Counterparty
Chapter 6: The Trustless Escrow
Chapter 7: A Cross-Chain Hunt
Chapter 8: The Reveal
Chapter 9: Settling the Swap
Chapter 10: Interlinked
![]()