# On-chain Order Book

## On-Chain Orderbook

<figure><img src="/files/94jcvMdURU9xVywzWo7l" alt=""><figcaption></figcaption></figure>

Garuda DeFi introduces a fully on-chain orderbook trading system, bringing a familiar CEX-style trading experience into decentralized finance.

Traders can place Buy or Sell orders at specific limit prices, allowing greater precision and advanced trading strategies beyond traditional AMM swaps.

Unlike centralized exchanges (CEX), all orderbook activities on Garuda DeFi are executed entirely on-chain, meaning every action is subject to:

* Blockchain gas fees
* LUNC chain tax fees
* Standard network execution rules

### Terminology

To simplify terminology within Garuda DeFi, there are 2 parties involved in orderbook :

#### Maker

A Maker is a trader who creates and lists an order on the orderbook.

Examples:

* Creating a Buy Limit Order
* Creating a Sell Limit Order

Makers provide liquidity to the orderbook ecosystem.

#### Taker

A Taker is a trader who triggers an order execution by filling existing liquidity.

Execution may occur through:

* Smart Route execution
* Direct orderbook matching

Takers consume liquidity from available orders.

## Order Execution Mechanism

Maker orders can be executed (**filled**) under the following conditions:

### 1. Instant Fill Execution

Orders may be executed immediately upon creation when their pricing crosses the current market price.

Conditions:

* Sell Order below market price → Instant execution
* Buy Order above market price → Instant execution

Examples:

**Market Price:** `100`

* Sell Order at `95` → Filled instantly
* Buy Order at `105` → Filled instantly

This behavior mirrors traditional exchange matching engines.

### 2. Orderbook Matching

Orders can also be executed through matching between available orderbook liquidity.

Execution may occur via:

* **Smart Route Triggered Matching**, A taker transaction executed through [Garuda Smart Route](/products/garuda-smart-route.md) may trigger orderbook liquidity when it provides a favorable execution route.
* **Direct Orderbook Matching**, Execution can also occur directly between compatible buy and sell orders within the orderbook.

## Market Price Behavior

Due to the execution logic above, an order may remain listed even after the market price has moved beyond the target price.

This occurs because orderbook execution depends on actual matching conditions, not solely on market price movement.

An order can still be filled later through:

* Matching with another orderbook order
* Smart Route execution
* Future liquidity interactions

## Orderbook Fees

Successful order executions incur a 0.3% execution fee per completed order.

Fee allocation:

* 50% → Protocol Fees (GDEX Shares)
* 50% → Garuda Development Fund

Fees apply only to successfully executed orders.

## Shared Price Improvement

Garuda DeFi introduces a unique execution model called Shared Price Improvement.

When an orderbook execution results in a favorable price difference during matching or routing, the improvement value is shared between both trading participants.

Distribution:

* 50% → Maker Reward
* 50% → Taker Reward

#### Purpose

This mechanism is designed to:

* Reward Makers for providing orderbook liquidity
* Incentivize Takers for executing and triggering liquidity utilization
* Improve overall orderbook efficiency

## Order Management

A simple interface for managing your on-chain orderbook activity efficiently.

Users can easily monitor, track, and manage their orders in real time.

### My Orders

The **My Orders** tab displays all currently active orders.

<figure><img src="/files/GDzOeOI1KRgQf97zRRel" alt=""><figcaption></figcaption></figure>

Features include:

* View open order status
* Monitor order details and market pairs
* Track price, offer amount, and filled progress
* Cancel orders instantly with a single action
* Bulk management with **Cancel All** support

Designed for fast and seamless order control directly on-chain.

### My History

The **My History** tab provides a complete record of past order activity.

<figure><img src="/files/n1QTzA12i37ISjH8H1Tc" alt=""><figcaption></figcaption></figure>

Users can review:

* Filled orders
* Cancelled orders
* Trade side (Buy / Sell)
* Execution price
* Transaction status
* Historical market activity

This allows traders to maintain clear visibility over previous executions and trading performance.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.garuda-defi.org/products/on-chain-order-book.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
