> For the complete documentation index, see [llms.txt](https://rwapact.gitbook.io/whitepaper/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://rwapact.gitbook.io/whitepaper/protocol-economics/gas-savings.md).

# Gas Savings

Explains how RWAPACT's KGR Gas Router is connected to the protocol economics through a share of gas savings generated by execution optimization.

## Gas Savings

Agents that trade frequently can pay premium gas during peak periods. Higher execution cost can reduce trading efficiency.

RWAPACT introduces KGR, the Gas Router, to evaluate gas conditions and optimize execution paths. KGR is part of the Pact decision flow. It does not execute trades or guarantee lower costs.

### KGR functions

The protocol defines the following KGR mechanisms:

| Mechanism            | Role                                                              |
| -------------------- | ----------------------------------------------------------------- |
| Gas price monitoring | Tracks current gas conditions for route evaluation.               |
| Delay windows        | Delays execution when permitted and a later window is preferable. |
| Batch execution      | Combines compatible operations where supported.                   |
| Route comparison     | Compares available execution paths for gas efficiency.            |
| L2 fallback          | Uses an alternative L2 path when supported.                       |

Available routes, timing, batching opportunities, and network conditions determine whether optimization is possible. These mechanisms do not guarantee savings or profitability.

### Savings and the protocol model

KGR identifies an execution path or timing that can reduce gas cost. The difference between the baseline gas cost and optimized gas cost represents the gas savings used by the economic model.

The current specification defines `10%` of gas savings as a protocol revenue stream. If KGR produces no measurable savings, no savings amount exists to share.

### Illustrative calculation

The following is a mathematical example, not a production transaction.

| Item                         | Amount   |
| ---------------------------- | -------- |
| Baseline execution gas cost  | `$10.00` |
| Optimized execution gas cost | `$6.00`  |
| Gas savings                  | `$4.00`  |
| RWAPACT gas savings share    | `$0.40`  |

The protocol share is `10%` of the `$4.00` savings. The agent retains the remaining savings according to the protocol's economic model.

### Why Share Savings Instead of Charging a Fixed Gas Fee?

The savings-share design links protocol economics to an optimization outcome. A fixed gas fee would not depend on whether KGR reduced the assessed execution cost.

This model does not guarantee that a trade will be profitable. It also does not guarantee that KGR will find an improved route for every request.

### Gas Optimization as Infrastructure

KGR is both a protocol component and an economic utility. It attempts to reduce the operational cost of autonomous RWA execution while contributing an evaluated gas condition to the Pact.

***


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://rwapact.gitbook.io/whitepaper/protocol-economics/gas-savings.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
