How I Built 3 Chainlink CRE Workflows in One Week — FBA Oracle, Privacy Payroll & DeFi Intelligence at 3 AM in Secunderabad — From a 2021 Podcast to a 3 AM Deployment
Author: Venkateshwar Rao Nagala
GitHub: https://github.com/tenalirama2025-creator/chainlink-prediction-settler
Competition: Chainlink Convergence Hackathon 2026
Demo Video
▶️ Watch the full pipeline in action:
[INSERT DEMO VIDEO LINK HERE]
My Story
I worked on blockchain projects earlier using JavaScript, RUST and Python for settlement of forex transactions across banks. The blockchain forex settlement enabled banks to settle forex transactions within minutes down from weeks. This blockchain experience helped me in my decision to be part of this Convergence Hackathon 2026.
Last month I won the Velocity Award at the Solo.io MCP & AI Agents Hackathon
for building a COBOL→Rust modernization pipeline with zero-trust AgentGateway
security. This month I applied that same velocity to the Chainlink Convergence
Hackathon.
My interest in Chainlink did not start in February 2026 when I received the
hackathon email. It started on May 1, 2021 — I have the MIT Open email to
prove it — when I watched Lex Fridman's podcast with Sergey Nazarov on Smart
Contracts and Chainlink. That podcast planted a seed. I have followed Chainlink
Foundation activities ever since — Smart Conferences, Bootcamps, developer
updates. Five years later, at 3 AM in Secunderabad, I was watching Chainlink
CRE workflows simulate green on my terminal.
On February 28, 2026 — just one week before the March 8 deadline — I received
the Chainlink Convergence hackathon email. I was still finishing the Solo.io
submission. Another round of late nights was about to begin.
I have 30 years of software experience — from writing Fortran for gearbox
manufacturing simulations in my final year of Mechanical Engineering, to 10
years of IBM Assembler programming for insurance companies in the USA
(Homecomm/Lifecomm), to Core Banking reconciliation at RBC, to Big Data
Analytics at AIG, to Assembler and COBOL at Thrivent. I gathered all of that
experience and decided to compete.
The Problem That Started It All
Prediction markets need trustworthy, automated settlement. But a single AI
oracle can hallucinate. A single LLM can be wrong with high confidence.
A single data source can be compromised.
I had studied Byzantine fault tolerance throughout my career in distributed
systems. I knew about Stellar's Federated Byzantine Agreement protocol. The
question was: could FBA be applied to LLM oracles?
The answer became this project.
The "Aha Moment"
Initially I decided to go with claude-opus-4-6 LLM for prediction, but
decided to add another LLM that is GPT-4o. If anyone of the LLM
hallucinates then one of them will give the correct prediction,
but the problem was how to decide which one is correct and other
is not correct. The solution is Byzantine algorithm.
I knew that consensus on blockchain networks is achieved through Byzantine
algorithms. I had three project ideas initially — a prediction market settler,
a privacy-preserving payroll workflow, and a DeFi market intelligence tool.
After seeing the scope, I decided to combine all three as individual MCPs in
a single unified project.
The "aha moment" came when I saw the FBA consensus result appear — Claude
Opus saying NO at 99% confidence, GPT-4o saying NO at 95% confidence, the
FBA engine confirming quorum intersection — and knowing that result was about
to be written to a smart contract on the blockchain via MetaMask. That moment
made every late night worth it.
What I Built
A complete AI-powered prediction market settlement system with:
ai_prediction_mcp — FBA consensus oracle (Claude Opus + GPT-4o) via
Chainlink CRE. Both LLMs independently evaluate a prediction statement.
FBA computes quorum intersection. On agreement: auto-settle on-chain.
On disagreement: autonomous settlement BLOCKED — human review triggered.payroll_mcp — Privacy-preserving batch payroll settlement. Recipient
addresses and salary amounts never appear on-chain. Only a keccak256 batch
hash is recorded. CRE Confidential Compute keeps all sensitive data private.hyperliquid_mcp — Hyperliquid DEX market intelligence. Queries 229
perpetual markets via CRE Confidential HTTP. Computes BTC bid-ask spread
in basis points. API credentials managed at DON level — never exposed.Rust CLI — FBA consensus engine (TypeScript port of Stellar's SCP),
fetch-fed, simulate, and status commands.PredictionMarket.sol — Solidity smart contract deployed and verified
on Ethereum Sepolia. Verified on Sourcify, Blockscout, and Routescan.
Live FBA Result:
Statement: "Did the Fed cut rates at March 2025 FOMC?"
Claude Opus: NO | 99% confidence
GPT-4o: NO | 95% confidence
FBA Outcome: NO | 97% confidence
Quorum: ✅ INTERSECTED
Safety: ✅ CLEARED
Action: SETTLE NO — Fed held rates confirmed
Architecture
┌─────────────────────────────────────────────────────────────────┐
│ CHAINLINK CRE LAYER │
│ │
│ ┌──────────────┐ ┌──────────────────┐ ┌──────────────────┐ │
│ │ payroll_mcp │ │ hyperliquid_mcp │ │ ai_prediction │ │
│ │ │ │ │ │ _mcp │ │
│ │ Privacy- │ │ DEX Market │ │ FBA Oracle │ │
│ │ preserving │ │ Intelligence │ │ (Claude+GPT-4o) │ │
│ │ batch settle │ │ BTC/ETH spreads │ │ │ │
│ └──────┬───────┘ └────────┬─────────┘ └────────┬─────────┘ │
└─────────┼───────────────────┼──────────────────────┼────────────┘
│ │ │
▼ ▼ ▼
┌─────────────────────────────────────────────────────────────────┐
│ RUST CLI (settler) │
│ ┌─────────────────────────────────────────────────────────┐ │
│ │ FBA CONSENSUS ENGINE │ │
│ │ Claude Opus ──┐ │ │
│ │ ├──► Quorum Intersection ──► SETTLE │ │
│ │ GPT-4o ────┘ (Stellar Protocol) or REVIEW │ │
│ └─────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ ETHEREUM SEPOLIA (Smart Contract) │
│ PredictionMarket.sol │
│ 0xEA856dF995C58DEc18221C907DC221c4487Ae499 │
│ Question: "Did the Fed cut rates at March 2025 FOMC?" │
└─────────────────────────────────────────────────────────────────┘
The Three Thrillers
Thriller 1: The MetaMask Maze 🦊
When I wanted to install MetaMask, I searched for it online. The search showed
a page full of websites. I clicked one that instructed me to download a .msi
file for Windows. The downloaded files ended up in my project folder — around
10,000 files in two separate folders. This filled my C drive completely.
I only discovered this during the GitHub upload — the files showed up in git
and I immediately deleted them from VSCode and GitHub.
The MetaMask website itself was a maze for a first-time visitor. They clearly
display browser extension options — Chrome, Edge, Firefox — but when I clicked
the Chrome extension, the GET button was greyed out with a message:
"You can't add or remove items when in Incognito or Guest mode."
I was in Incognito mode on Edge. I switched to normal mode. Same message.
I eventually found the Chrome Web Store option — but that led to another
problem.
I created Account 1 and added a wallet. Then imported Account 1, creating an
"Imported Account 1." I got 0.05 Sepolia ETH from the Google faucet and added
it to Account 1.
When I tried to Deploy & Run my Solidity contract in Remix, MetaMask picked
the Imported Account 1 — which had no funds. I was confused. I had just added
tokens!
I investigated. I went back to the MetaMask Chrome extension and discovered
that Account 1 and Imported Account 1 had DIFFERENT wallet addresses. MetaMask
prioritises the Imported Account during Deploy & Run.
I deleted the Imported Account 1. Recompiled. Deployed. This time MetaMask
used Account 1 with the funds — and the contract was deployed successfully.
Thriller 2: The Wrong Contract Address 📋
After deployment I committed the contract address to GitHub — but I captured
the wrong URL. The address I saved was for the default Remix Storage contract,
not my PredictionMarket.sol.
The same wrong address was deployed to CRE by Thomas of Chainlink team. Two days
before submission I discovered the mistake.
I corrected the address everywhere — .env, config files, README. Then I
informed Thomas from the Chainlink team and requested redeployment with the
correct address. Waiting for him to complete the redeployment — with the
submission deadline two days away — was nothing short of watching a thriller
movie.
Thriller 3: The 3 AM CRE Debugging Session 🌙
The night of March 3-4, 2026. It was past midnight in Secunderabad. I was
trying to get all three CRE workflows simulating.
The errors came one after another:
✗ ConfigPath must be a valid existing file: ./config.staging.json
✗ environment variable PAYROLL_API_KEY_VALUE not found
✗ 'btoa' is not defined
✗ Expected identifier but found "," (double comma syntax error)
✗ Buffer.from base64 encoding required
Each error revealed the next. Missing config file. Wrong secrets format.
Wrong base64 encoding function. Double comma from a PowerShell replace command.
At 1:42 AM the terminal showed:
╭──────────────────────────────────────────────────────╮
│ Simulation complete! Ready to deploy your workflow? │
╰──────────────────────────────────────────────────────╯
All three workflows. Green. That moment made every late night worth it.
CRE Workflow Deep Dive
ai_prediction_mcp — FBA Consensus Oracle
The key innovation: secrets fetched at DON level, passed into node mode as
arguments. API keys for Claude and OpenAI never leave Chainlink's confidential
compute environment.
// Fetch secrets at DON level — same pattern as payroll_mcp
const claudeSecret = runtime.getSecret({ id: config.claudeApiKeySecretName }).result();
const openaiSecret = runtime.getSecret({ id: config.openaiApiKeySecretName }).result();
// Pass both keys into runInNodeMode
const result = runtime
.runInNodeMode(
runFbaConsensus,
consensusIdenticalAggregation<SettlementResult>()
)(claudeApiKey, openaiApiKey)
.result();
payroll_mcp — Privacy-Preserving Settlement
Only the batch hash is recorded on-chain. Amounts and recipient addresses
stay inside CRE confidential compute:
// PRIVATE — never written on-chain
type PayrollEntry = {
recipient: string;
amount: number;
memo: string;
};
// Only this is recorded on-chain
return {
batchHash: computeBatchHash(batch),
privacy: "recipient_addresses_and_amounts_not_recorded_onchain"
};
hyperliquid_mcp — DeFi Market Intelligence
CRE Confidential HTTP — API credentials managed at DON level:
body: Buffer.from(
JSON.stringify({ type: "meta" })
).toString("base64"), // CRE requires base64 encoded body
Key Technical Lessons
On CRE secrets:
Use secretsNames format in secrets.yaml — not a secrets list. Each
workflow needs its own local ./secrets.yaml — sharing ../secrets.yaml
causes cross-workflow secret conflicts.
On CRE HTTP:
The CRE HTTPClient requires request body as base64. Use
Buffer.from(JSON.stringify(body)).toString("base64") — not btoa() which
is not available in the CRE runtime.
On MetaMask:
Always install as a Chrome extension from the Chrome Web Store. Never download
desktop packages. Delete any Imported Accounts before deploying — they take
priority over regular accounts during Remix deployment.
On contract verification:
Always click the Contract tab on Blockscout after deployment and verify the
contract name matches your Solidity file — not the default Remix Storage
contract.
On FBA for LLMs:
Byzantine fault tolerance is not just for distributed databases. Applied to
LLM oracles, FBA provides quorum intersection guarantees — a hallucinating
model cannot unilaterally settle a market.
Chainlink CRE Dashboard
[INSERT THOMAS'S DASHBOARD SCREENSHOT HERE]
All three workflows active on Chainlink's DON — confirmed by the Chainlink
team. Running every 10 minutes via CronCapability.
Quick Start
git clone https://github.com/tenalirama2025-creator/chainlink-prediction-settler
cd chainlink-prediction-settler
# Build Rust CLI
cargo build
# Simulate FBA consensus (free — no API keys needed)
./target/debug/settler fba \
--statement "The Fed maintained rates at 4.25-4.50%"
# Run CRE workflow simulations
cd workflow/payroll_mcp
$env:PAYROLL_API_KEY_VALUE = "dev-api-key"
cre workflow simulate . --target staging-settings
cd ../hyperliquid_mcp
cre workflow simulate . --target staging-settings
cd ../ai_prediction_mcp
$env:CLAUDE_API_KEY_VALUE="dev-api-key"
$env:OPENAI_API_KEY_VALUE="dev-api-key"
cre workflow simulate . --target staging-settings
Prize Tracks
| Track | Amount | How This Project Qualifies |
|---|---|---|
| Prediction Markets | $16,000 | FBA consensus settles real on-chain predictions |
| Privacy | $16,000 | payroll_mcp — batch hash only, amounts never on-chain |
| CRE & AI | $17,000 | 3 production CRE workflows running on DON |
| Risk & Compliance | $16,000 | FBA blocks unsafe settlements — human review triggered |
| DeFi | $16,000 | hyperliquid_mcp — DEX intelligence via confidential HTTP |
Total potential: $81,000
My Message to You
Please take the risk if you enjoy the thrills that accompany such projects
with tight deadlines.
Two days before submission you realize the contract URL is wrong. The same
mistake was hosted on CRE by Thomas of Chainlink team. Requesting him to redeploy
after correcting the mistake, and waiting for him to complete the redeployment,
is nothing short of watching a thriller movie.
I received the hackathon email one week before the deadline. I had a Solo.io
submission still in progress. I had never built a CRE workflow before.
I entered anyway.
The MIT Open email from May 1, 2021 — the Lex Fridman podcast with Sergey
Nazarov that started this journey — sits in my inbox. Five years from that
email to this submission.
Take the risk. The thrill is worth it.
About Me
Venkateshwar Rao Nagala
- GATE 1994 AIR 444 — Top 0.4% of India's engineering graduates
- Fortran — Final year Mechanical Engineering project: Computer Assisted Manufacturing of Gear Boxes
- 1994-2004 — IBM Assembler expert, insurance companies USA (Homecomm/Lifecomm)
- RBC — Senior Project Manager, Core Banking (RDDA/BDDA)
- AIG — Manager Big Data Analytics
- Thrivent — Consultant, Assembler 80% / COBOL 20%
- Solo.io 2026 — Velocity Award 🏆
- Chainlink follower since May 1, 2021 (MIT Open — Sergey Nazarov podcast)
📧 tenalirama2019@gmail.com
📱 +91-9701908080
🐙 https://github.com/tenalirama2025-creator
Built with Rust. Orchestrated with Chainlink CRE. Settled on Ethereum Sepolia.
From Assembler to blockchain — one late night at a time. 🚀
GitHub: https://github.com/tenalirama2025-creator/chainlink-prediction-settler
Contract: 0xEA856dF995C58DEc18221C907DC221c4487Ae499 (Sepolia)
Demo: [INSERT VIDEO LINK]
Top comments (0)