GoldenWhales

Protecting everyday traders from front-running by splitting and scheduling orders with TWAP.

GoldenWhales

Created At

ETHGlobal New Delhi

Project Description

Imagine you are trying to swap a giant bag of tokens and sneaky bots are hiding in the shadows waiting to jump ahead of you. Our project is like a mischievous bodyguard for your trade. Instead of dropping one huge order into the pool we quietly slice it into smaller pieces and send them out at unpredictable times. A friendly TWAP oracle keeps an eye on prices so you still land near the best average price while the bots are left chasing ghosts. It feels almost like playing hide and seek with the entire mempool. You place one order and behind the scenes it becomes a dance of tiny swaps that confuse attackers and protect your value. Big whales stay safe and even small traders get to enjoy a fairer playground.

Github repos (error when adding on ethglobal site even though public): https://github.com/neelansh15/goldengate-interface https://github.com/Kiwi-Protocol/goldengate-service

How it's Made

GoldenWhales TWAP Service is built with TypeScript/Node.js and Express.js, implementing Time-Weighted Average Price trading through intelligent order splitting. Tech Stack: Supabase (PostgreSQL), BigNumber.js for precise wei calculations, 1inch Limit Order SDK for DEX integration, and Viem for Web3 interactions. The Hack: Our splitting algorithm generates random split points using Math.random() * totalAmount with a Set-based approach, creating unpredictable chunk sizes that prevent MEV exploitation while maintaining proportional pricing. 1inch Integration: Each chunk becomes a signed limit order with MakerTraits for partial fills and 2-minute expirations, submitted to 1inch's order book for optimal DEX routing. Automation: A resolver monitors executions with start_time < current_time, automatically placing orders and updating statuses from PENDING → ONGOING.

background image mobile

Join the mailing list

Get the latest news and updates

GoldenWhales | ETHGlobal