hackquest logo

Goblin- Fully on-chain CLOB

Goblin is a fully on-chain limit order book built on Arbitrum Stylus and Robinhood chain. Matching and settlement both happen on-chain, with no operator and no off-chain

Videos

Project image 1
Project image 2
Project image 3

Tech Stack

Rust
svelte
foundry
stylus

Description

Goblin is a fully on-chain limit order book built on Arbitrum Stylus. Matching and settlement both happen on-chain, with no operator and no off-chain matcher. AMMs are decentralized and provide advantages such as atomic and composable liquidity but come with downsides like impermanent loss.

Hybrid limit order books protect the user from impermanent loss but have a centralized operator and siloed liquidity. Goblin is completely decentralized and has composable liquidity along with onchain matching & settlement and no off-chain matcher. You can place 99 limit orders on Goblin in a single transaction compared to Uniswap V4 which lets you open a single position.

We do this by building upon the EVM's 256-bit key-value structure rather than fighting it. Because of the prohibitive gas costs of using a balanced tree, no viable on-chain limit order book has been built so far. Goblin maps orders straight onto storage slots, so the whole book stays at a few KBs instead of 1 MB+

We have 2 more pieces to make goblin cheap to run: we keep internal balances and net deltas to avoid redundant gas costs. The result is an onchain order book that's actually cheap to run.

Progress During Hackathon

  • The smart contract was in development for 2 years. During the hackathon we hardened the API for making smart contract calls and fixed some bugs. We shipped an SDK for calling the smart contract.

  • We deployed on testnet and benchmarked against Uniswap.

  • We built a high quality interactive demo that explains the protocol from first principles and benchmarks against uniswap with full transparency.

  • Now that the smart contract is stabilized, we worked on the indexer on 2 fronts

1. Building an end user focused indexer using substreams from graph protocol.

2. Building a low latency high performance indexer that lives inside an Arbitrum Nitro node as a live tracer. This indexer will be used for latency sensitive market making. This builds upon our contribution to the core protocol, where we worked with the Arbitrum team and Tenderly to add live tracing feature in Nitro. https://github.com/OffchainLabs/nitro/pull/3066

Fundraising Status

We are a team of privately funded veterans from DeFi, with over 10 years of industry experience. This has allowed us to focus on long term protocol development, without short term distractions like market cycles or VC pressure for liquidity events. This has allowed us to work on the smart contract for over 2 years full time.

The team has extensive management and software development experience with contributions to a tier 1 centralized exhange, a top 3 protocol on Solana by TVL.

Team Leader
AAnna Onchain
Project Link
Deploy Ecosystem
RobinhoodRobinhood
Sector
DeFiRWA