Jeevanjot Singh Vital

Blockchain and crypto work, 2018 to 2022

Smart contracts, oracles and trading systems

I build them end to end, with the services, bots and apps around them.

Between 2018 and 2022 I built a grant-funded oracle service for Aeternity, a web app and volatility index for Volmex Finance, a market-making order manager and two hackathon winners. Each project links to its code or to the public record, and private work is marked.

Email me See my GitHub

Selected work

Ten projects, strongest first, on Aeternity, Ethereum and crypto exchanges. None of the contracts have been audited, and the Kovan deployments went offline when that testnet was retired in 2022.

Say Network Oracle 2.0

2021 to 2022, an Aeternity grant

Winner, Best ae oracles based project, Akshwani Haeck 2021

URL oracles for Aeternity smart contracts. A contract asks for a URL; an off-chain responder fetches it and answers on-chain, with an optional TLSNotary proof, or decrypts the URL first when it carries an API key.

  1. Consumer contractAsks its question through the Say library, in Sophia.
  2. Connector contractEmits the query for responders to pick up.
  3. ResponderNode.js. Fetches the URL and notarises it with a modified PageSigner.
  4. AnswerLands on-chain, with the proof in bytes when one was asked for.
  • Built under an Aeternity Crypto Foundation grant: developer docs, the Q3 2021 final report, and a community vote on the next module, where a trustless price feed with a stablecoin led.
  • The first version ran in Solidity on Kovan, Optimism, BNB Smart Chain and Moonbeam testnets, from February to April 2021.
  • Sophia
  • Solidity
  • Node.js
  • TLSNotary
  • Quasar

Volmex Finance

May 2020 to January 2021, paid contract work

The web app's source is private client work.

Contract work for Volmex Finance: the volmex.finance web app, and a service that computed an ETH implied-volatility index.

  • Built the web app: landing and trade pages with index charts fed from Firebase Realtime Database, the volatility-index pages, and a token-claim page wired to the distribution contract with ethers.js and MetaMask.
  • Wrote a Python service that computed a 30-day ETH implied-volatility index from Deribit options, solving Black–Scholes implied volatility on the two expiries nearest 30 days, and published it to Firebase under monit.
  • Set up the Docker and Okteto (Kubernetes) development environments. 92 commits on the site.
  • JavaScript
  • ethers.js
  • web3.js
  • Python
  • Firebase
  • Deribit API

Fine Exchange AOM

2022, ended in 2022

All five services are public; the client's README walks through them.

An order manager for market makers, built for Fine Exchange, my crypto exchange project on HollaEx Kit. A user links an exchange API key and sets a pair, a side, a spread from the top of the book, a size and an interval, and the system keeps the order at that spread.

  1. Desktop clientQuasar 2 and Electron. Code
  2. APIExpress. Verifies keys with a signed request and spreads tasks round-robin. Code
  3. Queues and workersBullMQ on Redis. Each run places or edits the order through CCXT. Queue Worker
  4. DatabaseTasks in PostgreSQL, with exchange keys encrypted. Code
  • 159 commits on the client alone, March to July 2022. The services ran as Okteto development environments on Kubernetes.
  • I wrote the docs too: REST and WebSocket API guides, a Node.js library guide and AOM guides.
  • Vue 3
  • Electron
  • Express
  • BullMQ
  • Redis
  • PostgreSQL
  • CCXT

æternity token migration

2021, a bounty, merged upstream

Holders of the old ERC-20 AE token use this service to claim native AE on æternity's mainnet. I rewrote its backend in Node.js with the æternity JavaScript SDK, replacing an outdated Go service.

  • Merged into aeternity/aepp-token-migration-backend-nodejs as pull request #2, with 22 commits, in November 2021.
  • æternity's blog presented the rewrite as the community's fix: migration open around the clock, with no more migration phases.
  • Node.js
  • æternity JavaScript SDK
  • Sophia contract calls

Decentralized Insurance

December 2020, built alone

Winner, Best Superhero.com New DeFi Feature, Human DeFi Haeck 2020

Buy an insurance policy, or invest in one and earn from its premiums, from inside the Superhero.com tipping app on Aeternity.

  • Four Sophia contracts: the policy catalogue, insured clients, selling agents, and purchases and investments.
  • A Quasar front end, plus an integration into a copy of the Superhero UI.
  • Sophia
  • Quasar
  • Superhero wallet

MOMP: Money Over Mail Protocol

September 2021, a prototype

Send AE to an email address. The recipient needs no wallet until they claim, and the sender can take back a payment nobody claims.

  1. RegisterA one-time code goes to the email. Only hashes of the email and code are stored.
  2. VerifyThe owner enters the code, and the contract links the email to a wallet.
  3. SendAnyone pays to the email's hash. The contract holds the funds.
  4. Withdraw or refundThe owner withdraws, or after a set time the sender reclaims.
  • The email step reaches the chain through the Say Network oracle. A Node.js service sends the codes, and a Quasar app and a protocol paper complete it.
  • It's the centrepiece of æternity's “In the Spotlight” profile of my work.
  • Sophia
  • Node.js
  • Quasar
  • SMTP

Sedo Network

September 2020, Chainlink Virtual Hackathon

A trustless escrow for selling any domain on Ethereum, using the internet itself as the source of truth.

  1. Prove ownershipChainlink VRF makes a random TXT record, and an oracle checks it in DNS.
  2. Pay into escrowThe buyer pays the asking price and names the email they'll own the domain under.
  3. ReleaseFunds go to the seller once the oracle's WHOIS check matches the buyer.
  • Governance, escrow and VRF contracts in Solidity, a custom API on my own Chainlink node, and a subgraph on The Graph.
  • Solidity
  • Chainlink
  • The Graph
  • Truffle
  • Remix

Zero-knowledge private transactions

December 2021 to July 2022, an æternity bounty, unfinished

A Tornado Cash-style privacy app for æternity: deposits become commitments in a Merkle tree, and withdrawals are proven with a zk-SNARK.

  1. CircuitsCircom: Pedersen commitments and Merkle inclusion, compiled for BLS12-381.
  2. SetupOne build script runs the powers-of-tau ceremony and the Groth16 setup.
  3. VerifierThe script writes the verification key into a generated Sophia contract.
  4. CheckThe contract checks each proof with a single pairing call.
  • I patched snarkjs's field library where its BLS12-381 support broke. In April 2022 an æternity developer confirmed on the forum that the verifier accepts a valid proof and rejects altered ones.
  • I also ported the MiMC sponge hash to Sophia to match circomlib. Work stopped in 2022 while the chain lacked a zk-friendly hash (Poseidon).
  • Circom
  • snarkjs
  • Groth16
  • BLS12-381
  • Sophia

Binance trading bot

May 2020

The source is private. I'm happy to walk you through it.

A Node.js bot that quotes limit orders around the order book. It placed real orders on Binance spot markets.

  • Streams the 20-level order book over WebSocket, places limit buys and sells at a set gap, cancels unfilled orders on a randomised timer, and can reverse its strategy when the balance drops.
  • Controlled from Discord: start, stop, buy, sell, cancel, and set the gap and win threshold, with order alerts posted to a channel.
  • Five pairs, including BTC/USDT, ETH/USDT and ETH/BTC. It ran in Docker on Okteto (Kubernetes).
  • Node.js
  • Binance API
  • WebSocket
  • discord.js
  • Docker

Flash-loan arbitrage

September to November 2020, a prototype

The source is private. I'm happy to walk you through it.

Borrow, trade across exchanges and repay, all inside one Ethereum transaction.

  1. WatchA Node.js driver compares Kyber and 0x prices.
  2. BorrowThe contract takes a WETH flash loan from dYdX.
  3. TradeWETH against DAI across Kyber, Uniswap V2 and Balancer, on 0x API quotes.
  4. RepayThe loan goes back to dYdX in the same transaction.
  • Built on the standard DydxFlashloanBase template, in Solidity, with Truffle, the OpenZeppelin CLI and Remix.
  • Tested on a Ganache fork of mainnet and on Kovan. One direction of the arbitrage works, and it never ran with real funds.
  • Solidity
  • dYdX
  • Uniswap V2
  • Kyber
  • Balancer
  • 0x API
  • Ganache

One idea, built three times

Send crypto to someone's identity instead of their address. Over three versions the funds moved from a server holding keys into contracts, with oracle checks and refunds built in.

  1. 2019: Git-NanoPay a GitHub username in Nano. A back end held the wallet keys.
  2. 2020: KeybaseusPay a Twitter handle in ETH. A Chainlink oracle checks the owner's tweet before the contract pays out. Write-up
  3. 2021: MOMPPay an email address in AE. A one-time code proves the address, and unclaimed payments go back. See above

More on-chain work

Blockin Random 2021
A Cosmos SDK chain whose module creates verifiable random values, checkable on-chain or off, and serves them to other chains over IBC. Entered in Cosmos HackAtom VI. Source Devpost
Multisig presale contract 2022
A booster-pack presale in Sophia with per-buyer and total caps and an expiry. Proceeds split among owners by ratio, and owners approve and execute transactions as a multisig. 24 tests. Source
Oracle and NFT starters 2020 to 2021
A weather oracle and a basic NFT template for Aeternity, each with a step-by-step write-up for other developers. Oracle source NFT write-up
Wallets, clients and bots 2018 to 2019
Cross-platform Electron and Cordova wallets and clients for Steem, Funcoin and P3C, a BitShares tipping bot for Discord, and Obyte attestation and tipping bots. qSteem Funcoin Wallet BitShares bot
Merged upstream
aestudio #47 token migration backend #2 Obyte oscript-editor #10

Toolbox

Contracts and proofs
Solidity Sophia Circom and snarkjs (Groth16) Cosmos SDK in Go
Ethereum tooling
Truffle Hardhat Ganache Remix OpenZeppelin web3.js ethers.js The Graph Chainlink: Any API, VRF, my own node
DeFi and trading
dYdX flash loans Uniswap V2 Kyber Balancer 0x API CCXT Binance API Deribit API
Aeternity
aeproject JavaScript SDK Oracles BLS12-381 in Sophia
Back end
Node.js Express BullMQ Redis PostgreSQL Python Firebase
Apps and infrastructure
Vue Quasar Electron Cordova Docker Kubernetes (Okteto) Netlify

Get in touch

I'm open to new roles and to select freelance work, including smart contracts, oracles and trading tools. I'm based in Amritsar, India, on IST (UTC+5:30).

burlier-digraph-9p@icloud.com