# Introduction

An introduction to Gradient

Automated Market Makers (AMMs) are the cornerstone of DeFi trading - yet their inefficiencies have allowed billions of dollars in value to remain uncaptured. Traditional DEXs rely entirely on these AMMs, which execute trades against open liquidity pools, often at unfavourable rates. Due to price-impact, every buy order executes above market price, and every sell order executes below it. This not only means that traders are losing money both ways - it also leads to significant instability in the price action of most DeFi tokens. Gradient offers an alternative.&#x20;

Gradient is a decentralized trading layer built to eliminate price-impact and maximize execution efficiency through real-time, on-chain, off-market trading—prioritizing native Market Maker fills and peer-routed matches before falling back to AMM aggregation, all while deepening token liquidity.

Whether buying or selling, users gain full control over their orders—with the option to be filled instantly, wait for better conditions, or route through AMMs at the best available price. Gradient enables smarter, cheaper, and more customizable trading by shifting execution logic from the pool to the participant.

At the heart of the protocol’s innovation is Gradient’s proprietary Coordinated Order Routing Engine (CORE), a matching system that seeks optimal trade paths across a dynamic liquidity network. This system allows Gradient to simultaneously better conditions for traders while promoting greater liquidity depth and sustainability for tokens being traded.

<br>

<br>


# Pitch Deck

The official Gradient pitch deck

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRm0kI3GtvgaABoTyaCL1%2Fuploads%2FiEYyCytQbXMbqNnPPe0v%2FGradient%20Deck.pdf?alt=media&token=87df37e9-3bb0-4588-9607-6d0eddedef3b>" %}

{% file src="/files/Q3LpYF3uCYW4MusURQTi" %}


# Partner Deck

The official Gradient partner deck

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRm0kI3GtvgaABoTyaCL1%2Fuploads%2FFEzrNxKQqE3q5aboM6o4%2FPartner%20Deck.pdf?alt=media&token=a2c02d9a-aea2-4cde-b989-ed0b4eac36a5>" %}

{% file src="/files/B9r3F43D02faYnGg2xEl" %}


# Go To Market Deck

The official adoption & rollout deck.

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRm0kI3GtvgaABoTyaCL1%2Fuploads%2F8IJyDnE7J9UW0LHd6X7h%2FGradient%20Adoption%20%26%20Rollout.pdf?alt=media&token=302d9667-b7fb-4475-a807-71ee6075f510>" %}

{% file src="/files/BDSoB8dSZY4hYA9RxuPG" %}


# Verified MM Deck

Verified market maker deck

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRm0kI3GtvgaABoTyaCL1%2Fuploads%2FklXkjCRi5KK04b6bfpxX%2FGradient%20MM.pdf?alt=media&token=8befcf8c-5765-4ec8-94d7-4711c76f06db>" %}


# The CORE

Gradient's proprietary Coordinated Order Routing Engine

### Introduction

Gradient’s core innovation is its Coordinated Order Routing Engine, a native, off-chain engine designed to match token trades efficiently and transparently before on-chain execution.

With a focus on efficient, constraint-bound order matching, Gradient's CORE matches buyers and sellers with Market Makers and each other, completing transactions off-market in real time at preferred rates.

This system allows users to bypass traditional AMMs when counterparties are available, eliminating price impact & slippage and improving capital efficiency.

### Off-Market Order Matching

Unlike traditional AMMs and fragmented DEX liquidity, Gradient's CORE operates off-market. This allows orders to be matched in a secure, controlled, and private environment. This means:

* Orders are never exposed to front-running.
* Orders are never affected by slippage or price impact.
* Matching is handled off-chain for real-time efficiency.

Orders are submitted with predefined parameters, such as:

* Token pair
* Price limits
* Order size
* Time-to-live (TTL)

CORE continuously scans the order book to identify valid matches between buyers, sellers, and market makers, before sending a single, automatic settlement transaction on-chain.

### On-Chain Settlement

Once a match— either via Market Makers or P2P— is confirmed off-chain, CORE triggers a secure, on-chain settlement.

* Funds are transferred automatically.
* Trade details remain on-chain.
* Users retain custody until execution, minimizing risk.

This hybrid approach combines off-chain speed with on-chain trust.


# Gradient's Layers

Gradient is composed of 3 trading layers — modular by design, but unified in purpose: to power efficient, price-impact free trading.

## Explore the Gradient

<table data-view="cards"><thead><tr><th></th><th data-hidden data-card-cover data-type="files"></th></tr></thead><tbody><tr><td><a href="/pages/JaMOrns22MMKCiNDyFnz"><strong>The Flash Layer</strong></a></td><td><a href="/files/CEJ9NoM9wsSbDrnpzWow">/files/CEJ9NoM9wsSbDrnpzWow</a></td></tr><tr><td><a href="/pages/FNh5iN51brmlK7RDTIIU"><strong>The Matching Layer</strong></a></td><td><a href="/files/k3bFe3RpIGOTq79CxcOw">/files/k3bFe3RpIGOTq79CxcOw</a></td></tr><tr><td><a href="/pages/uqxPoggvBcqsiCO4pt8Z"><strong>The Fallback Layer</strong></a></td><td><a href="/files/Ri07QBIXa13hSkFRmXIp">/files/Ri07QBIXa13hSkFRmXIp</a></td></tr></tbody></table>


# The Flash Layer

Gradient's dedicated layer for instant order fulfillment

### Introduction

The Flash Layer is where trades are fulfilled by Gradient market maker liquidity. This allows for the instant, price-impact free execution of off-market trades at market price.

In order to create constant availability, Gradient allows for the public provision of liquidity to market Maker pools, incentivized via spread-based earnings.

This network of liquidity serves as an immediate counterparty, enabling both buy-side & sell-side instant order fulfillment for traders while promoting deeper liquidity and healthier price action for tokens.

### Market Maker (MM) Liquidity

Gradient allows users to participate as market makers by supplying ETH alongside a target token.&#x20;

* Market Makers capture profit from spread and platform volume.
* The system prioritizes MM liquidity, ensuring instant order execution when possible.
* Market Makers retain full control over their liquidity volatility & exposure.
* Market Makers are never subject to impermanent loss or idle capital.

Market Makers enhance and deepen liquidity while improving the Gradient protocol's efficiency.&#x20;

{% hint style="info" %}
**Spread:** A fixed difference between buy and sell prices. In Gradient, this is a deliberate 2% spread per trade, transparently split between liquidity providers and the platform.
{% endhint %}


# The Matching Layer

Gradient’s dynamic peer-matching layer

### Introduction

The Matching Layer is where orders are fulfilled via dynamic peer-matching. This is Gradient’s most flexible execution layer for both buy-side and sell-side participants.

Gradient's matching layer affords users full control over the execution terms of their trade, allowing them to set their own pricing, timing & volatility parameters.

Orders are automatically fulfilled fully or partially depending on the counterparties available, with Gradient's CORE ensuring precise and constraint-respecting execution.

### FIFO Fulfillment Logic

Gradient's CORE enforces a First In, First Out (FIFO) policy for all peer-matched orders. This guarantees:

* Fairness: Earliest orders are prioritized.
* Efficient Liquidity Management: Large orders don't decelerate existing order fulfillment.
* Transparent Execution Sequence: This allows for strategic and predictable order placement.

FIFO applies to all trades fulfilled via the Matching Layer, providing predictability for users submitting large or time-sensitive orders.


# The Fallback Layer

Gradient’s final routing layer for constraint-respecting AMM execution

### Introduction

The Fallback Layer is where orders are executed through external AMMs when off-market fulfillment is unavailable. Acting as Gradient’s safety net, this layer ensures no trade is left unfilled.

When neither the Flash Layer nor the Matching Layer can fulfill an order within the user’s defined parameters, Gradient’s CORE automatically routes the trade through the most favorable AMM — aggregating across platforms to secure the best available price.

This guarantees complete trade execution with minimal friction, preserving intent while maintaining flexibility and price efficiency.

### Fallback Aggregation Logic

Gradient’s Fallback Layer functions as a built-in aggregator, scanning across AMMs in real time to identify the most favourable execution path.

* Route Optimization: Gradient's fallback system intelligently evaluates all available routing paths in real time, factoring in token pricing, gas costs, volatility, and liquidity distribution
* Multi-AMM Liquidity Sourcing: Gradient’s fallback system aggregates liquidity from multiple AMMs to reduce fragmentation and widen access to capital.
* Intent Respecting: Trades are only executed if they meet the user’s original parameters for price and volatility.

This layer ensures that Gradient captures every execution opportunity, without compromising control or pricing integrity.


# Who Benefits?

A breakdown of how gradient creates value for every participant

Gradient, powered by CORE, creates a smarter, fairer, and more efficient trading environment. Traders, liquidity providers and token developers alike benefit from greater **control, capital efficiency, and scale** when leveraging Gradient.

***

### On-Chain Traders

Traders using Gradient leverage user-defined trade parameters & price-impact-free trading, no longer needing to rely on the fragmented, shallow liquidity of AMM-powered decentralized exchanges.&#x20;

Traders benefit from the following when executing trades via Gradient:

<details>

<summary>Price-Impact-Free Trades</summary>

Trades are executed at the exact agreed-upon price—no price-impact from AMM curve mechanics and thin liquidity pools is incurred.

</details>

<details>

<summary>Dynamic Order Control</summary>

Traders set their own price ceilings or floors, time-to-live (expiration windows), and maximum order sizes— retaining full control over execution terms.

</details>

<details>

<summary>MEV-free trades</summary>

No front-running or MEV risk is possible—orders are matched off-chain and executed automatically, ensuring trades remain uninhibited by MEV bots.

</details>

<details>

<summary>Liquidity </summary>

Traders gain access to deeper liquidity through market makers and bulk P2P matches.

</details>

#### RESULT&#x20;

> All parties maximize returns, gain pricing certainty, and avoid the pitfalls of traditional DEXs—promoting more efficient, capital-preserving execution.

***

### Market Makers

Market makers earn from Gradient's deliberate spread by efficiently fulfilling both buy-side & sell-side orders.

Market Makers benefit from the following when providing liquidity to pools on the Gradient platform:

<details>

<summary>No Impermanent Loss</summary>

Gradient MMs incur no risk of impermanent loss—LP positions remain unexposed to volatile AMM re-pricing and token divergence.

</details>

<details>

<summary>Spread Capture</summary>

MMs earn from a consistent, fixed spread between buy and sell orders, defined as 0.25-1.5% each way by the Gradient platform.

</details>

<details>

<summary>Flexible &#x26; Efficient Provision</summary>

Capital is deployed only when trades occur—no capital is subjected to idle exposure or rebalancing cycles.&#x20;

</details>

<details>

<summary>Priority Execution</summary>

MMs receive first priority in order execution and spread capture.

</details>

#### RESULT

> MMs earn consistent yield from real order flow, without exposure to volatility or impermanent loss.

***

### Token Projects

Token projects leveraging Gradient's CORE for strategic liquidity sourcing promote greater stability, deeper liquidity, healthier price action and improved market presence.

Token projects benefit from the following when leveraging Gradient:

<details>

<summary>Sustainable Market Pricing</summary>

Off-market execution mitigates unwanted volatility, ensuring that large inflows or outflows do not destabilize a token’s price behaviour.

</details>

<details>

<summary>Whale-Accessible</summary>

Gradient provides a direct gateway for institutional participants and high-net-worth investors to engage with DeFi tokens without the limitations of fragmented DEX liquidity.

</details>

<details>

<summary>Deeper Liquidity </summary>

Token projects may leverage market maker participation, providing deep, reliable liquidity without relying on inflationary yield strategies or short-term incentives.

</details>

#### RESULT

> Off-market trading results in a more resilient market presence and increased capital inflow for DeFi tokens.


# Overview

An an overview of Gradient's fee model

### Introduction

Gradient’s fee model is designed to align incentives across all participants—buyers, sellers, market makers, and the platform—while maintaining predictable, non-predatory fees.

At the core of this model is a **structured spread-based system** that ensures seamless trade execution, liquidity efficiency, and fee transparency.

***

### Fixed Execution Spread

Rather than charging variable, unpredictable fees, Gradient operates using a fixed execution spread.

|                     | Buyers                                          | Sellers                                         |
| ------------------- | ----------------------------------------------- | ----------------------------------------------- |
| **Gradient**        | 0.25-1.5% buy-side spread                       | 0.25-1.5% sell-side spread                      |
| **Traditional AMM** | Variable slippage + LP fees (typically over 6%) | Variable slippage + LP fees (typically over 6%) |

This mechanism allows the platform to:

* **Guarantee** execution at predictable price points
* **Incentivize** protocol participation via the distribution of fees
* **Maintain** a sustainable, transparent, and scalable foundation for fee collection

***

### Fee Distribution at a Glance

How the 0.5-3% spread-based fee is distributed depends on how the trade was fulfilled.

#### Filled Using Market Maker Liquidity

If the trade is filled using liquidity from a Gradient market maker pool:

* 50% of the fee is distributed to market makers in that specific token’s liquidity pool.
  * Distribution is proportional to each individual’s share of the pool.
* 10% is distributed proportionally to market makers platform wide.
* 40% is classified as platform earnings.

#### **Peer-to-Peer Match (Direct Counterparties)**

If the trade is fulfilled directly between buyers and sellers:

* 100% of the fee is classified as platform earnings.
* No portion is routed to any Market Maker pool.

<details>

<summary>What is a spread?</summary>

A fixed difference between buy and sell prices. In Gradient, this is a deliberate 0.5-3% spread (0.25-1.5% on each side), transparently split between liquidity providers and the platform.

</details>

<details>

<summary>What are LP fees?</summary>

A fixed, protocol-defined charge paid to liquidity providers or collected by trading platforms on each trade, regardless of price movement.

</details>

<details>

<summary>What is slippage?</summary>

Variable, often unpredictable cost from liquidity constraints or volatility.

Slippage is especially problematic in micro-cap tokens, where liquidity is shallow and volatility is high. Traders frequently suffer major execution losses—even on relatively small orders—due to the inability of AMMs to absorb volume efficiently.

</details>


# Market Maker Earnings

A breakdown of Market Maker (MM) earnings

Gradient’s fee model is structured to directly reward those who contribute liquidity. Gradient Market Makers earn via two mechanisms: Direct order fulfillment and platform wide fee distributions.

***

#### 1. Direct Order Fulfillment

Market Makers in a specific token pool earn 40% of the fees generated as a direct result of order fulfillment occurring on that specific token. This ensures market makers are fairly compensated for their provision to their chosen asset.

#### 2. Platform-Wide Fee Distributions

10% of the fees generated on Flash Layer trades are distributed platform wide to market makers in every Gradient liquidity pool. This encourages liquidity diversification and mitigates the concentration of capital within the platform. These fees are distributed in Gradient's native token $GRAY.

***

### Why it's Sustainable

Unlike AMMs, which dilute rewards through token emissions and expose liquidity providers to impermanent loss:

* Market makers on Gradient earn **real, transaction-based yield.**
* Market Makers on Gradient incur **no risk of volatility-based divergence loss.**
* Capital is only used when trades occur—**no capital is subjected to idle exposure.**


# Platform Earnings

A breakdown of platform earnings

Gradient platform earnings are intended for the use of market-buying & burning $GRAY, as well as the incentivization of partner participation.

### $GRAY Sustainability

Gradient aims to allocate 100% of platform earnings to supporting $GRAY’s ecosystem through market-buys and burns. This number is adjusted to accomodate partner participation, as detailed in the "Partner Benefits" section of this whitepaper.

This practice creates adds to the total capital inflow occurring on the $GRAY token, while simultaneously creating deflation, reducing the circulating supply organically, through the employment of external capital.


# Partner Benefits

A breakdown of how Gradient partners earn.

Official Gradient partners benefit from additional incentives when participating in protocol activity. Fees collected through token pools of official partners are distributed as follows:

### 1. Market-Maker Earnings

Market-makers in partner token pools earn 40% of the spread on fulfilled trades, distributed proportionally to their share of the pool. Token projects market-making their native pools will thus earn directly via order fulfillment.

### 2. Percentage of Platform Earnings

Officially partnered projects earn 50% of all platform earnings collected as a result of trading on their pair. This includes the collecting of fees on all trades executed through both the Flash and Matching layers.

***

This adjusted distribution for Gradient partners incentivizes the provision of liquidity by token projects directly, allowing for an increased off-market trade execution capacity. This encourages participation in the Gradient protocol, while deepening liquidity and improving sustainability for partnered token projects.

{% hint style="info" %}
Teams may apply to become a Gradient partner via the following URL: <https://form.typeform.com/to/auF5so4Q>
{% endhint %}


# What is $GRAY?

An introduction to Gradient's native token

$GRAY acts as the driving economic component of the Gradient platform. It is designed to align incentives across the ecosystem and directly reward those who contribute to liquidity and execution efficiency. It plays a central role in sustaining the economic health of Gradient’s Coordinated Order Routing Engine (CORE) as well as that of the Gradient protocol as a whole.

Rather than relying on token emissions, Gradient’s design routes protocol fees to certain participants (liquidity providers) as a way to incentivize their participation. The $GRAY token’s role is to help align the ecosystem; active contributors may earn rewards from real platform activity, promoting a self-reinforcing cycle of engagement referred to as a “flywheel”. The intent is that as the ecosystem grows, $GRAY’s utility in the protocol grows as well.


# Driving Participation

How $GRAY promotes participation within the Gradient ecosystem

$GRAY is designed to incentivize active participation in the Gradient ecosystem. The platform’s economic model is designed with the intention of rewarding those who contribute (e.g. by providing liquidity) with fee-based rewards.<br>

* Market Makers platform-wide are rewarded with a share of Flash Layer fees, incentivizing the provision of capital required to make off-market transactions instant & seamless.

These are distributed through a structured system with the intention of rewarding contributors for the activity they enable.


# Value Routing

How value is routed within the $GRAY ecosystem

### Market Buying

A core feature of the Gradient fee model is the market-buying of $GRAY (buybacks) using platform earnings. Gradient aims to use the majority of platform earnings to market-buy the $GRAY token.

***

### Burn Mechanism&#x20;

Of the $GRAY tokens bought back with platform earnings, the Gradient protocol aims to allocate 100% to burns, with the intention of reducing the amount of available supply on the market.


# Tokenomics

An overview of tokenomics & supply distribution

### Tokenomics

Buys & sells on the $GRAY token are subject to a 5% buy/sell transaction fee, which may be lowered (but never raised) at the team's discretion.&#x20;

Funds accrued as a result of these fees may be allocated towards supporting the platform’s growth and sustainability - for example, funding marketing, development & community incentives. These allocations are not fixed and may be adjusted based on evolving needs.

<br>

### Supply Distribution

The $GRAY token has a fixed total supply of 10 000 000 tokens.

60% of this total supply was added to the GRAY/WETH UNI-V2 liquidity pool upon the token’s launch.&#x20;

The remaining 40% was held aside & partially vested. This supply was/may be used to encourage growth and sustainability - for example funding marketing, liquidity pools on Gradient, community incentives & CEXs. These allocations are not fixed and may be adjusted based on evolving needs.

<br>


# Conclusion

A recap of the $GRAY token's role within the Gradient protocol

The $GRAY token is structurally integrated into the protocol’s core mechanics — not as an accessory, but as a means to reinforce participation, deepen liquidity, and encourage sustained and long-term alignment between the protocol and its users.

Through its fee buybacks, deflationary design, and liquidity incentives, $GRAY aims to allow those who contribute to the protocol’s function to benefit from its activity. Rather than relying on emissions or artificial rewards, Gradient aims to channel platform usage into rewards for active participants.

The result is a system where utility and contribution are tightly coupled — and where $GRAY plays a direct role in promoting the efficiency, stability, and scalability of the platform.


# API documentations

Native Gradient APIs used to fetch real-time platform data.

## Gradient Orderbook API Reference

**Base URL:** `https://api.gradient.trade`

This is the complete API reference for the Gradient Orderbook API. All endpoints are rate-limited to **60 requests per minute** (1 request per second) based on IP address.

***

### Rate Limiting

All endpoints have a global rate limit of **60 requests per minute** (1 request per second).

* Rate limits are based on **IP address**
* When rate limit is exceeded, the API returns a `429 Too Many Requests` status code
* Rate limit headers are included in responses:
  * `X-RateLimit-Limit`: Maximum number of requests allowed
  * `X-RateLimit-Remaining`: Number of requests remaining in the current window
  * `X-RateLimit-Reset`: Time when the rate limit resets

#### Rate Limit Response

```json
{
  "success": false,
  "message": "Too many requests from this IP, please try again later."
}
```

***

### Health Check Endpoints

#### Get Server Status

Check if the server is running.

**Endpoint:** `GET https://api.gradient.trade/`

**Rate Limit:** 60 requests per minute

**Response:**

```json
{
  "success": true,
  "message": "Server is running",
  "timestamp": "2025-11-09T20:47:52.783Z"
}
```

***

#### Get Health Status

Check server health status.

**Endpoint:** `GET https://api.gradient.trade/health`

**Rate Limit:** 60 requests per minute

**Response:**

```json
{
  "success": true,
  "message": "Server is healthy",
  "timestamp": "2025-11-09T20:47:52.783Z"
}
```

***

#### Get Socket.IO Health

Check Socket.IO service status.

**Endpoint:** `GET https://api.gradient.trade/socket-health`

**Rate Limit:** 60 requests per minute

**Response:**

```json
{
  "success": true,
  "message": "Socket.IO service is running",
  "timestamp": "2025-11-09T20:47:52.783Z"
}
```

***

### System Status Endpoints

#### Get Retry Statistics

Get blockchain retry statistics.

**Endpoint:** `GET https://api.gradient.trade/retry-stats`

**Rate Limit:** 60 requests per minute

**Response:**

```json
{
  "success": true,
  "data": {
    // Retry statistics object
  },
  "timestamp": "2025-11-09T20:47:52.783Z"
}
```

**Error Response:**

```json
{
  "success": false,
  "message": "Failed to get retry statistics",
  "error": "Error message"
}
```

***

#### Get RPC Monitor Status

Get RPC monitor status.

**Endpoint:** `GET https://api.gradient.trade/rpc-monitor`

**Rate Limit:** 60 requests per minute

**Response:**

```json
{
  "success": true,
  "data": {
    // RPC monitor status object
  },
  "timestamp": "2025-11-09T20:47:52.783Z"
}
```

**Error Response:**

```json
{
  "success": false,
  "message": "Failed to get RPC monitor status",
  "error": "Error message"
}
```

***

### Order Endpoints

#### Get Active Orders

Get active orders for a specific token with pagination and filtering.

**Endpoint:** `GET https://api.gradient.trade/api/order/active`

**Rate Limit:** 60 requests per minute

**Query Parameters:**

| Parameter       | Type   | Required | Description                                   |
| --------------- | ------ | -------- | --------------------------------------------- |
| `tokenAddress`  | string | Yes      | Ethereum token address                        |
| `orderType`     | string | No       | Filter by order type: `buy` or `sell`         |
| `executionType` | string | No       | Filter by execution type: `limit` or `market` |
| `page`          | number | No       | Page number for pagination (default: 1)       |
| `limit`         | number | No       | Number of results per page (default: 10)      |

**Example Request:**

```bash
curl "https://api.gradient.trade/api/order/active?tokenAddress=0x123...&orderType=buy&page=1&limit=20"
```

**Response:**

```json
{
  "success": true,
  "message": "Active orders retrieved successfully",
  "data": [
    {
      "id": "order-id",
      "owner": "0x...",
      "orderType": "buy",
      "executionType": "limit",
      "token": {
        "address": "0x...",
        "symbol": "TOKEN",
        "decimals": 18,
        "logoURI": "https://...",
        "name": "Token Name"
      },
      "amount": "1000.0",
      "filledAmount": "500.0",
      "remainingAmount": "500.0",
      "filledPercent": 50.0,
      "price": "0.001",
      "executionPrice": null,
      "executionUsdPrice": null,
      "ethAmount": "1.0",
      "ethRemainingAmount": "0.5",
      "ethFilledAmount": "0.5",
      "expirationTime": 1234567890,
      "expiresIn": "2d 5h",
      "status": "active",
      "createdAt": "2025-01-13T12:00:00.000Z",
      "updatedAt": "2025-01-13T12:00:00.000Z",
      "usdPrice": null,
      "createTransactionHash": "0x...",
      "cancelTransactionHash": null,
      "expireTransactionHash": null,
      "fulfillTransactionHash": null,
      "partialFulfillTransactionHashes": []
    }
  ],
  "aggregates": {
    "totalSellRemainingAmount": "1000000000000000000",
    "totalSellRemainingAmountFormatted": "1.0",
    "totalBuyRemainingAmount": "2000000000000000000",
    "totalBuyRemainingAmountFormatted": "2.0",
    "tokenDecimals": 18,
    "priceInEth": "0.001"
  },
  "pagination": {
    "currentPage": 1,
    "totalPages": 5,
    "totalCount": 20,
    "hasNextPage": true,
    "hasPrevPage": false,
    "limit": 20
  }
}
```

**Error Responses:**

* `400 Bad Request` - Missing or invalid token address
* `404 Not Found` - Token not found

***

#### Get Order by ID

Get a specific order by its ID.

**Endpoint:** `GET https://api.gradient.trade/api/order/{orderId}`

**Rate Limit:** 60 requests per minute

**Path Parameters:**

| Parameter | Type   | Required | Description  |
| --------- | ------ | -------- | ------------ |
| `orderId` | string | Yes      | The order ID |

**Example Request:**

```bash
curl "https://api.gradient.trade/api/order/0x123abc..."
```

**Response:**

```json
{
  "success": true,
  "message": "Order retrieved successfully",
  "data": {
    "id": "0x123abc...",
    "owner": "0x...",
    "orderType": "sell",
    "executionType": "limit",
    "token": {
      "address": "0x...",
      "symbol": "TOKEN",
      "decimals": 18,
      "logoURI": "https://...",
      "name": "Token Name"
    },
    "amount": "1000.0",
    "filledAmount": "1000.0",
    "remainingAmount": "0.0",
    "filledPercent": 100.0,
    "price": "0.001",
    "executionPrice": "0.001",
    "executionUsdPrice": 1.5,
    "ethAmount": "1.0",
    "ethRemainingAmount": "0.0",
    "ethFilledAmount": "1.0",
    "expirationTime": 1234567890,
    "expiresIn": "Expired",
    "status": "filled",
    "createdAt": "2025-01-13T12:00:00.000Z",
    "updatedAt": "2025-01-13T12:00:00.000Z",
    "usdPrice": null,
    "createTransactionHash": "0x...",
    "cancelTransactionHash": null,
    "expireTransactionHash": null,
    "fulfillTransactionHash": "0x...",
    "partialFulfillTransactionHashes": []
  }
}
```

**Error Responses:**

* `400 Bad Request` - Missing order ID
* `404 Not Found` - Order not found

***

### Token Endpoints

#### Get Token Information

Get comprehensive token information including price, volume, and market data.

**Endpoint:** `GET https://api.gradient.trade/api/token/info`

**Rate Limit:** 60 requests per minute

**Query Parameters:**

| Parameter | Type   | Required | Description            |
| --------- | ------ | -------- | ---------------------- |
| `address` | string | Yes      | Ethereum token address |

**Example Request:**

```bash
curl "https://api.gradient.trade/api/token/info?address=0x123..."
```

**Response:**

```json
{
  "success": true,
  "data": {
    "name": "Token Name",
    "symbol": "TOKEN",
    "chainId": 1,
    "logoURI": "https://...",
    "decimals": 18,
    "pairAddress": "0x...",
    "buyTax": 0,
    "sellTax": 0,
    "usdPrice": 1.5,
    "priceChange": 5.2,
    "volume24h": 1000000.0,
    "buyVolumeUsd24h": 600000.0,
    "sellVolumeUsd24h": 400000.0,
    "buySellRatio24h": 1.5,
    "marketCap": 10000000.0
  }
}
```

**Response Fields:**

| Field              | Type   | Description                      |
| ------------------ | ------ | -------------------------------- |
| `name`             | string | Token name                       |
| `symbol`           | string | Token symbol                     |
| `chainId`          | number | Blockchain chain ID              |
| `logoURI`          | string | Token logo URL                   |
| `decimals`         | number | Token decimals                   |
| `pairAddress`      | string | Liquidity pair address           |
| `buyTax`           | number | Buy tax percentage               |
| `sellTax`          | number | Sell tax percentage              |
| `usdPrice`         | number | Current USD price                |
| `priceChange`      | number | 24h price change percentage      |
| `volume24h`        | number | 24-hour trading volume in USD    |
| `buyVolumeUsd24h`  | number | 24-hour buy volume in USD        |
| `sellVolumeUsd24h` | number | 24-hour sell volume in USD       |
| `buySellRatio24h`  | number | Buy/sell ratio for last 24 hours |
| `marketCap`        | number | Market capitalization in USD     |

**Error Responses:**

* `400 Bad Request` - Missing or invalid token address
* `404 Not Found` - Token not found or invalid address

**Note:** If the token is not in the database, the API will fetch it from the blockchain and save it automatically. For new tokens, `volume24h` will be 0.

***

#### Get Token Reserves

Get token reserves (ETH and token reserves) from the liquidity pool.

**Endpoint:** `GET https://api.gradient.trade/api/token/token-reserves`

**Rate Limit:** 60 requests per minute

**Query Parameters:**

| Parameter | Type   | Required | Description            |
| --------- | ------ | -------- | ---------------------- |
| `address` | string | Yes      | Ethereum token address |

**Example Request:**

```bash
curl "https://api.gradient.trade/api/token/token-reserves?address=0x123..."
```

**Response:**

```json
{
  "success": true,
  "data": {
    "reserveETH": "1000000000000000000",
    "reserveToken": "2000000000000000000"
  }
}
```

**Response Fields:**

| Field          | Type   | Description                               |
| -------------- | ------ | ----------------------------------------- |
| `reserveETH`   | string | ETH reserve in wei (raw format)           |
| `reserveToken` | string | Token reserve in token units (raw format) |

**Error Responses:**

* `400 Bad Request` - Missing or invalid token address

***

### Response Format

All API responses follow a consistent format:

#### Success Response

```json
{
  "success": true,
  "message": "Optional success message",
  "data": {
    /* Response data */
  },
  "pagination": {
    /* Pagination info if applicable */
  }
}
```

#### Error Response

```json
{
  "success": false,
  "message": "Error message",
  "error": "Detailed error information"
}
```

***

### Error Handling

The API uses standard HTTP status codes:

* `200 OK` - Request successful
* `400 Bad Request` - Invalid request parameters
* `404 Not Found` - Resource not found
* `429 Too Many Requests` - Rate limit exceeded
* `500 Internal Server Error` - Server error

All errors are handled by a global error handler and return consistent error response format.

***

### Code Examples

#### JavaScript/TypeScript

```typescript
// Get active orders
const response = await fetch(
  'https://api.gradient.trade/api/order/active?tokenAddress=0x123...&page=1&limit=20',
);
const data = await response.json();

// Get token info
const tokenResponse = await fetch('https://api.gradient.trade/api/token/info?address=0x123...');
const tokenData = await tokenResponse.json();
```

#### Python

```python
import requests

# Get active orders
response = requests.get(
    'https://api.gradient.trade/api/order/active',
    params={
        'tokenAddress': '0x123...',
        'page': 1,
        'limit': 20
    }
)
data = response.json()

# Get token info
token_response = requests.get(
    'https://api.gradient.trade/api/token/info',
    params={'address': '0x123...'}
)
token_data = token_response.json()
```

#### cURL

```bash
# Get active orders
curl "https://api.gradient.trade/api/order/active?tokenAddress=0x123...&page=1&limit=20"

# Get token info
curl "https://api.gradient.trade/api/token/info?address=0x123..."

# Get order by ID
curl "https://api.gradient.trade/api/order/0x123abc..."
```

***

### Security Features

* **CSRF Protection** - All endpoints are protected against CSRF attacks
* **Helmet** - Security headers are set automatically
* **CORS** - Configurable CORS policy
* **Rate Limiting** - IP-based rate limiting on all endpoints
* **Input Validation** - All inputs are validated before processing

***

### Support

For API support and questions, please contact the Gradient team.

**API Base URL:** `https://api.gradient.trade`


# Overview

An overview of the beta program.

## Introduction

The Beta Program is designed to allow for real users to test early versions of the Gradient platform ahead of public releases. This initiative will remain active both prior to and following the full release of the Gradient.

Allowing select users access to pre-release builds enables the following:

* Gathering of feedback from real trading behaviour
* Identification of edge case bugs
* Optimization of the user experience
* Enhancement of pre-release visibility & engagement

### Participation Requirements&#x20;

In order to be eligible to become a beta tester, certain criteria must be met.&#x20;

Firstly, beta testers must be active and engaged Gradient community members.&#x20;

Secondly, beta testers must have a platform through which to share their experience and/or extensive knowledge pertaining to decentralized finance.

Finally, beta testers must be holders of the $GRAY token.

<br>


# Events

Event schedules and details.

## Events

{% stepper %}
{% step %}

### Beta Event #1&#x20;

The first event of Gradient’s Beta Program allows participants to buy & sell $GRAY through both the Flash & Matching Layer at market price. The following is a breakdown of the rollout process & instructions pertaining to participation in this event.
{% endstep %}

{% step %}

### Beta Event #2

The second event of Gradient’s beta program marks the final private beta prior to public release. During this event, participants will be able to buy & sell both $GRAY and select token partners, through the Flash & Matching Layers, at market or custom prices. Participating individuals and partnered token projects will also be able to provide liquidity to the Gradient Flash Layer for the duration of this beta event.
{% endstep %}
{% endstepper %}

### Event 2 Details:

<details>

<summary>Whitelisting your wallet</summary>

Beta participants are required to submit the wallet they will be testing with ahead of time. This wallet will be whitelisted in order to allow for its trading and/or market-making through the Gradient.

</details>

<details>

<summary>Buying &#x26; Selling Tokens</summary>

Once whitelisted, beta participants may freely buy & sell $GRAY & select partnered tokens through the Flash & Matching Layers at both market & custom prices.

</details>

<details>

<summary>Market Making</summary>

Select partnered token projects may add liquidity to their pair to allow beta participants to instantly buy & sell their token without price-impact. Liquidity amounts added by teams will be test amounts, and do not represent each project’s full liquidity commitment to the Gradient. Individuals will also be able to freely add & remove liquidity to the GRAY/ETH trading pair as well as to partnered tokens’ trading pairs.

</details>


# Initializing the Gradient

The first phase of Gradient's roadmap.

{% hint style="success" %}
**Completed**
{% endhint %}

## Paving the Way to Adoption.

> Adoption moves faster when everyone gets it. Gradient's rollout starts by raising awareness and understanding about both the platform and the problem it solves. This develops a community of early adopters, which accelerates platform growth in early stages. Here's how we do it:

### 1. Spreading Awareness

Gradient’s first phase starts with an information rollout introducing: The cost and consequences of price-impact > Gradient's solutions and potential market share > Platform benefits and features > Participation incentives.

### 2. Collaborating with Token Projects

Although any token can be traded through the Gradient permissionlessly, collaborating with leading projects allows for accelerated adoption and boosted incentives. Gradient’s upcoming partner campaign is designed to incentivize token teams to drive early use to the platform:

***

## Building the Gradient.

> Change takes time, but it can never come too quickly. With a high focus on driving immediate adoption, here is how the Gradient will rollout ahead of its full release.

### 1.  Open-Sourcing & Auditing of the Trading Layer

Building trust and showing transparency is key, especially when introducing a new way to trade. All on-chain components of Gradient will be open-source and independently audited.&#x20;

### 2. Interactive Demonstrations

The Gradient will be showcased through a series of interactive demonstrations designed to build a better understanding of how the platform works. These will be targeted towards Gradient’s community of early adopters.


# Launching the Gradient

The second phase of Gradient's roadmap.

{% hint style="success" %}
**Completed**
{% endhint %}

## Beta Testing

> Pre-release beta testing allows for the collection of feedback to occur & for adjustments to be made prior to the public release of the Gradient.

### 1. Beta Event 1 (July)&#x20;

This event will consist of the buying & selling of $GRAY on Gradient at market price by selected beta participants.

### 2. Beta Event 2 (August)

This event will consist of the trading & market-making of $GRAY at market or custom prices by selected beta participants.

## Public Releases

> Limited public releases allow Gradient to attract & onboard a strong initial user base by leveraging the pre-release liquidity sourced, hence facilitating immediate adoption upon the full release.&#x20;

### 3. $GRAY goes live on Gradient (Late August-September)&#x20;

At this stage, the general public will be able to trade & market-make $GRAY on Gradient at market and custom prices.


# On-Boarding to the Gradient

The third phase of Gradient's roadmap.

{% hint style="success" %}
**Completed**
{% endhint %}

## Overview&#x20;

> Phase 3 takes a strong focus on driving sustained and scalable usage that establishes the protocol as a DeFi staple for trading within low-cap markets.
>
> This phase represents Gradient’s transition from internal development to public market activity and growth. It encompasses platform-wide security validation, the full release of the Gradient platform, the deployment of native SDK, and integrations with established protocols.

### 1. Total Platform Integrity Assessment&#x20;

Gradient continues to undergo comprehensive penetration testing and independent audits to validate that its contracts and infrastructure maintain the highest standards of security and resilience.

### 2. Partnered tokens go live on the Gradient&#x20;

{% hint style="info" %}
Currently Rolling Out.
{% endhint %}

At this stage, the general public will be able to trade both $GRAY and partnered tokens on the Gradient. Partnered token teams will be able to autonomously provide liquidity to the Gradient.

### 3. Implementation of Gradient's SDK&#x20;

{% hint style="info" %}
**Release Time:** Completed/ Currently Rolling out.
{% endhint %}

The implementation of Gradient’s native SDK makes the Gradient platform accessible beyond direct smart contract interaction. The SDK will provide developers with streamlined methods for integrating Gradient’s matching engine & liquidity layers directly into their applications.

### 4.  Full-Release of the Gradient (ERC20)

{% hint style="info" %}
**Release Time:** December
{% endhint %}

The public launch of the Gradient unlocks permissionless access to the platform, allowing anyone to trade and provide liquidity for any ERC20 token.


# v1.1 Update

The Gradient's first platform update.

{% hint style="success" %}
**Completed**
{% endhint %}

### Introduction

The Gradient will shortly be undergoing a series of updates. These new implementations to the platform are designed to complete and enhance the user experience when trading through the Gradient, as well as ready the protocol for its full release, which includes the permissionless trading of all pairs. These updates and their specifications are detailed below.

#### Support for UNI-V3 Token Pairs.

The v1.1 Update includes support for the off-market, price-impact free trading of UNI-V3 pairs. This allows traders access to an entire new market of tradable pairs, and contributes to readying the platform for its full release, including permissionless pair tradability.

#### Implementation of Auto-Fallback&#x20;

When enabled by the user, the Auto-Fallback feature automatically routes the remainder of a trader’s order through Gradient’s native DEX aggregator should their TTL (Time-to–Live) expire before complete fulfillment. This implementation provides greater flexibility to traders on the Gradient, as well as a smoother user experience when trading.

#### Displaying of the amount saved on each trade.

In the “My Orders” tab of the Gradient, users will be able to view the amount saved as compared to DEX pricing in real time for each individual order. This update provides traders with a real-time view of the benefits permitted by off-market, price-impact free trading.

#### Cumulative amount saved.

In conjunction with the displaying of the amount saved on each trade, the Gradient platform will also display to users the cumulative amount saved as compared to DEX pricing over the lifetime of the trader’s wallet. This provides traders with a comprehensive view of the long-term benefits of price-impact free trading.


# Growing the Gradient

Gradient's 4th Roadmap Phase.

## Expanded Network and DEX support.

Gradient will expand its list of supported networks and decentralized exchanges to accommodate the largest number of tokens possible. Currently, Gradient supports Ethereum tokens trading on Uniswap.

Gradient will expand support to the following chains:

* SOLANA
* BASE
* BNB

Gradient will equally expand its supported DEX’s, the following will be integrated.

* SushiSwap
* PancakeSwap
* Aerodrome
* PumpSwap
* Raydium
* Meteora
* Orca

## Scaling API integrations and key partnerships.

Gradient seeks strategic partnerships with DeFi aggregators, trading tools, and decentralized exchanges. Price-impact-free trading should be widely accessible—integrating Gradient's APIs into third-party swaps will naturally expand its user base.

Progress will be made through general listing applications and targeted outreach by our BD team.

Updates will be shared as they become available.

## Interface Refresh

Gradient will receive interface upgrades focused on delivering a faster, simpler, and more scalable experience.

The infrastructure isn’t changing — CORE continues to power execution. What’s evolving is how users interact with it.

Rather than placing heavy UX emphasis on matching and flash layers, we’re optimizing the default experience around seamless instant swaps at the best available market prices.

This update removes friction, reduces cognitive load, and increases transaction flow — while preserving the full execution flexibility Gradient is built on.


# -

{% hint style="info" %}
This page is currently being updated and will be available shortly.&#x20;
{% endhint %}


# Terms

Gradient & $GRAY terms of use

#### Gradient Protocol Use

* Gradient is a decentralized, non-custodial platform that facilitates peer-to-peer and automated off-market token trades. It does not hold user funds, act as a broker-dealer, or provide custodial services.
* Participation in the Gradient protocol may be subject to local laws and regulations in your jurisdiction. It is your responsibility to understand and comply with all applicable laws before using the protocol.
* Access to the platform may be restricted in certain regions where regulatory risks are high.
* The protocol is offered as open-source software and is not operated by any centralized entity or legal organization.

#### $GRAY Token Use

* $GRAY is the native utility token of the Gradient protocol.
* Holding or using $GRAY does not confer ownership, equity, profit-sharing rights, or governance rights unless explicitly stated by the protocol in future iterations.
* $GRAY is intended to facilitate fee distribution, incentivize liquidity provision, and reward protocol participation.
* By interacting with the token (e.g., buying, selling, staking), you acknowledge that you are doing so voluntarily and at your own discretion.


# Disclaimers

Gradient & $GRAY disclaimers

#### No Investment or Financial Advice

* Nothing contained in this documentation, on the Gradient platform, or in associated communications constitutes investment advice, financial advice, legal advice, or trading advice of any kind.
* Users are solely responsible for evaluating the risks and suitability of using the Gradient protocol and participating in any associated activities, including trading, staking, or market making.
* Always consult a qualified professional before making any financial, legal, or investment decisions.

#### Risks & Limitations

* Using the Gradient protocol involves risk, including but not limited to:
  * Smart contract vulnerabilities or failures
  * Impermanent loss or market volatility
  * Regulatory enforcement actions
  * Loss of funds due to user error, third-party exploits, or integration bugs
* The Gradient protocol is provided **“as-is”** with no warranties or guarantees of any kind.
* By using the platform, you agree that you do so at your own risk and that no developer, contributor, or affiliate shall be liable for any loss.

#### **Forward-Looking Statements**

This documentation may contain forward-looking statements, including projections, future functionality, or anticipated outcomes related to the Gradient protocol or the $GRAY token. These statements are inherently subject to risks, uncertainties, and changes in technology, regulation, or market conditions. Actual results may differ materially from those expressed or implied. No assurance is given that the protocol will achieve any specific objectives or milestones mentioned herein.

#### **Development & Delivery Disclaimer**

All features, mechanisms, and protocol components described in this documentation are subject to ongoing development and refinement. While the Gradient team intends to build according to the outlined design, unforeseen technical, regulatory, or operational challenges may alter the final implementation. Nothing in this document should be interpreted as a guarantee of delivery, performance, or availability of any specific feature.

#### Final Notes

* This document is intended for informational purposes only and does not constitute a prospectus, offering document, or legal agreement.
* The Gradient protocol and its related systems are experimental, and participation should be approached with caution.
* Gradient contributors disclaim any and all liability for damages, losses, or claims arising from the use of the platform or reliance on this documentation.
* No Right to Fee Proceeds: All fees collected by the protocol are owned by the protocol and not by token holders or users. Any use of fee proceeds (whether for buy-backs, burns, marketing, or distributions) is undertaken voluntarily by the protocol and creates no rights or claims for any party. Users and $GRAY holders are not entitled to any fees or revenues generated by the platform.
* No Guaranteed Distributions or Returns: While the Gradient protocol may, at its discretion, allocate tokens or other rewards to participants (e.g. stakers, liquidity providers) from time to time, such distributions are not guaranteed. They are subject to change, suspension, or cancellation without notice. There is no guarantee of any return, revenue share, or increase in token value from holding or staking $GRAY.
* Token is Utility, Not Investment: $GRAY is offered as a utility token for accessing and participating in the Gradient platform’s features. It is not an investment. Purchasing or holding $GRAY should be done with the understanding that it does not provide you with ownership, equity, or a share in any profits of any entity. Any potential appreciation in $GRAY’s value or any rewards you might receive are purely contingent on the usage of the platform and protocol settings, and no expectation of profit should be derived from them.
* Forward-Looking Tokenomics: Any description of how the protocol currently handles fees and token economics (for example, using fees to buy back $GRAY or distributing tokens to users) is intended to explain the present design. These mechanisms may be adjusted or eliminated in the future as the protocol evolves. Nothing herein should be taken as a permanent policy or promise. Actual future tokenomics could differ, and no commitment is made that any specific allocation or burn will occur indefinitely.
* Non-Refundable Fees: Transaction fees (including the $GRAY trading fee and any spread-based fees) are non-refundable and are collected for the operation and benefit of the protocol. Paying these fees does not entitle you to any service beyond the execution of the transaction, nor to any distribution of the protocol’s assets.


