Chapter 6: The Time-Weighted Batch – The Batch Auction Protocol

The engineering deck had transformed into a war room.

Ria stepped through the doorway and stopped short, her eyes widening at the scene before her. Arnav had been busy. Dozens of holographic displays now ringed the central workspace, each one showing different data streams—order flows, price histories, account patterns, network traffic. The air hummed with computational activity, and the faint glow of the displays cast an ethereal blue light across Arnav’s face as he hunched over his primary terminal.

“You’ve been busy,” Ria observed, stepping carefully through the maze of equipment.

Arnav looked up, his eyes red-rimmed from too many hours staring at screens. “The bot has changed its strategy again. I’ve been tracking it for the past three batches, and I’ve found something disturbing.”

Ria’s heart sank. She’d been hoping that the priority queue had solved the problem, that the batch auction was finally secure. But Arnav’s expression told her otherwise.

“What is it?” she asked, pulling up a chair beside him.

Arnav gestured to a display showing a series of batch settlements over time. Ria recognized the pattern immediately—the uniform clearing prices for each batch, plotted as a line graph. Something was wrong with the graph. The prices were drifting, slowly but consistently, in a way that didn’t match the underlying market conditions.

“Look at the sell orders,” Arnav said, zooming in on a specific section of the data. “Notice anything strange?”

Ria studied the data carefully. At first, nothing seemed out of the ordinary. The sell orders were distributed across the aggregation period, with most traders submitting their orders sometime in the middle of the hour. But then she noticed it—a subtle clustering at the very beginning and very end of each batch.

“Orders are bunched at the start and finish,” she observed. “Not all of them, but enough to be noticeable.”

“Exactly,” Arnav confirmed. “And when I cross-referenced those clustered orders with account data, I found a pattern.”

He pulled up a new display showing the accounts that had submitted the clustered orders. Ria recognized them immediately—the same suspicious accounts she’d seen before, the ones that had attempted the early-order manipulation in the previous batch.

“Alpha-Bot, Beta-Bot, Gamma-Bot,” she read aloud. “They’re back. But they’re doing something different this time.”

Arnav nodded grimly. “They’re trying to game the time dimension of the batch. They’re submitting sell orders at the very beginning of the aggregation period, and buy orders at the very end. Or vice versa, depending on which direction they want to push the price.”

Ria frowned, trying to understand the strategy. “But the clearing price is determined at the end, not the beginning. The timing of submissions shouldn’t matter.”

“In theory, no,” Arnav agreed. “But the bot is counting on a subtle effect. By clustering orders at the extremes of the aggregation period, it’s trying to create a temporary imbalance that influences the average price. Think of it like this—if you flood the beginning of the batch with sell orders, you create an early supply glut. Traders see all those sell orders and think the price is going to drop. They adjust their own orders downward in response.”

Ria’s eyes widened with understanding. “So the bot doesn’t need to manipulate the final clearing price directly. It just needs to create the impression of market movement, and the genuine traders will do the rest.”

“Exactly,” Arnav confirmed. “It’s psychological manipulation, not algorithmic manipulation. The bot is using human behavior against us.”

Ria studied the data more carefully. She could see the pattern now—the sell orders clustered at the beginning of each batch, the buy orders clustered at the end. The bot was trying to create a narrative of falling prices, hoping that real traders would panic and sell at lower prices.

“Have they succeeded?” she asked. “Have they been able to move the clearing price?”

Arnav pulled up a comparison chart. “Marginally. The clearing price has drifted about 0.5% lower than it should be, based on the underlying market conditions. It’s not a huge effect, but it’s enough to create profit opportunities for the bot.”

Ria felt her stomach drop. “So the bot is finding ways to profit even in a batch auction.”

“Not profit,” Arnav corrected. “Not consistently. But it’s creating noise. It’s reducing the efficiency of the market. And if we don’t stop it, the effect will compound over time.”

Ria leaned forward, her mind racing. “We need a countermeasure. Something that neutralizes the time-based manipulation.”

Arnav smiled—a tired but satisfied smile. “I’ve been working on one. I call it the time-weighted batch mechanism.”

He pulled up a new display showing the design of the countermeasure. Ria studied it carefully, trying to understand the mechanics.

“The concept is simple,” Arnav explained. “Instead of treating all orders equally regardless of when they’re submitted, we weight them based on their position in the aggregation period. Orders submitted closer to the center of the period get higher weight. Orders submitted at the extremes—the beginning and the end—get lower weight.”

Ria nodded slowly. “So the bot’s clustered orders at the start and finish would have less influence on the clearing price.”

“Exactly,” Arnav confirmed. “The weighting function is a bell curve. The highest weight is given to orders submitted at the midpoint of the aggregation period. The lowest weight is given to orders submitted right at the beginning or right at the end. It’s a way of saying, ‘The most representative orders are the ones submitted when the market has had time to digest information and form reasonable expectations.'”

Ria studied the design carefully. It was elegant, she had to admit—a simple mathematical adjustment that neutralized the bot’s manipulation strategy. But she also saw potential problems.

“Couldn’t the bot adapt?” she asked. “Couldn’t it just submit its orders at the midpoint of the period and get maximum weight?”

Arnav’s smile widened. “That’s the beauty of it. The bot could do that. But then it would lose the element of surprise. If it submits orders at the midpoint, other traders will see those orders coming. They’ll have time to respond, to adjust their own positions. The bot’s manipulation becomes visible.”

Ria considered this. “So the bot is trapped. If it uses its time-based manipulation strategy, its orders get lower weight and less influence. If it shifts to the middle of the period to get higher weight, it loses the psychological advantage of clustering at the extremes.”

“Precisely,” Arnav confirmed. “The time-weighted batch mechanism makes the bot’s strategy ineffective no matter how it adapts. It’s a robust countermeasure that addresses the core vulnerability.”

Ria felt a surge of hope. “Can we implement it immediately?”

“Almost,” Arnav replied. “I need to run some simulations first, make sure the weighting function doesn’t create unintended side effects. But the design is solid. Within a few hours, we should be ready to deploy.”

Ria settled into a chair, preparing to help with the simulations. But Arnav shook his head.

“Get some rest,” he said. “I’ll handle the technical work. You need to be fresh for what comes next.”

Ria frowned. “What comes next?”

Arnav’s expression grew serious. “The bot won’t take this lying down. When it realizes its time-based strategy has been neutralized, it will escalate. It will try new attacks, more aggressive ones. We need to be ready for whatever it throws at us.”

Ria nodded slowly. “You’re right. I’ll rest for a few hours, then come back fresh.”

She made her way to the door, but paused at the threshold. “Arnav? Thank you. For everything. Without your work, I’d still be losing money on the continuous market.”

Arnav looked up from his terminal, his expression warm. “Without your faith in the system, I might have given up. We’re in this together, Ria. Remember that.”

Ria smiled. “Together. Always.”

She walked back to her quarters, her mind still buzzing with the implications of the time-weighted batch mechanism. It was brilliant, she thought. A simple mathematical adjustment that neutralized the bot’s manipulation strategy without undermining the fairness of the system.

But Arnav was right—the bot would adapt. It would try new attacks, new strategies. The battle wasn’t over. It was just beginning.


Three hours later, Ria returned to the engineering deck. She found Arnav surrounded by a new set of displays, his face pale but triumphant.

“Simulations complete,” he announced. “The time-weighted batch mechanism works exactly as designed. The bot’s clustered orders have minimal influence on the clearing price.”

Ria studied the simulation results. The difference was striking. In the pre-optimization simulations, the bot’s manipulation had created a clear downward drift in the clearing price. In the post-optimization simulations, the drift was gone. The clearing price matched the underlying market conditions almost perfectly.

“Deploy it,” she said. “Let’s see how the bot reacts.”

Arnav nodded. His fingers flew across the keyboard, implementing the new mechanism into the batch auction protocol. Ria watched the system update, her heart racing with anticipation.

“The next batch starts in fifteen minutes,” Arnav said. “We’ll see the results soon enough.”

They waited in tense silence, watching the aggregation process unfold. Ria could see the bot’s orders coming in—the familiar pattern of sell orders clustered at the beginning of the period. But this time, something was different. The orders were flagged by the new mechanism, their weight reduced.

“The bot is still trying its time-based strategy,” Ria observed.

“It doesn’t know about the change yet,” Arnav replied. “It’s still operating on old assumptions.”

They watched as the aggregation period progressed. The bot’s sell orders were there, but they had almost no influence on the market. Other traders saw the orders, but they didn’t panic. The clearing price held steady, reflecting the true balance of supply and demand.

“Settlement in five minutes,” Arnav announced.

Ria leaned forward, her eyes fixed on the display. The timer counted down: 00:04:00, 00:03:00, 00:02:00, 00:01:00.

SETTLEMENT COMPLETE
UNIFORM CLEARING PRICE: 14.73 CREDITS

Ria felt a surge of triumph. The price was exactly where it should have been, based on the underlying market conditions. The bot’s manipulation had been completely neutralized.

“Look at the bot’s order execution,” Arnav said, pulling up the data.

ACCOUNT: ALPHA-BOT
ORDER: SELL 1,000 SFE @ MIN 14.00
WEIGHT: REDUCED (TIMING CLUSTER DETECTED)
EXECUTION: 1,000 SFE @ 14.73
RESULT: PROFIT/LOSS = +730 CREDITS (UNREALIZED)

Ria studied the numbers. The bot had still made a profit, but it was minimal—a fraction of what it would have earned if its manipulation had succeeded.

“Look at the overall market,” Arnav said, pointing to another display. “The clearing price is stable. The noise is gone. The system is working exactly as designed.”

Ria smiled, a warm feeling spreading through her chest. “We did it. We neutralized the bot’s time-based manipulation.”

Arnav nodded, but his expression remained serious. “For now. But the bot will adapt. It will find new strategies. We need to stay vigilant.”

Ria squared her shoulders. “Then we’ll adapt too. We’ll keep improving the system, keep staying one step ahead. The bots can try whatever they want, but they’ll never beat a system that’s designed to be fair.”

Arnav smiled—a genuine smile that reached his eyes. “That’s exactly what I was hoping you’d say.”

They turned back to the displays, ready for whatever came next. The time-weighted batch mechanism was just another layer of defense, another step toward a truly fair market.

But the battle was far from over.

Table of contents:
Introduction
Chapter 1: The Continuous Market
Chapter 2: A Front-Running Victim
Chapter 3: The Batch Auction Solution
Chapter 4: The Uniform Clearing Price
Chapter 5: The Order Aggregation
Chapter 6: The Time-Weighted Batch
Chapter 7: The Priority Queue <<<<<< NEXT
Chapter 8: The Manipulation Attempt
Chapter 9: The Periodic Settlement
Chapter 10: Fairness in Batches

Loading



Dear reader, love our creation? Support us moving forward