> For the complete documentation index, see [llms.txt](https://docs.aark.digital/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.aark.digital/gasless-transaction-framework.md).

# Gasless Transaction Framework

### <mark style="color:purple;">Introduction</mark>

To eliminate gas-related friction, our protocol implements a **gasless transaction framework**, leveraging cryptographic signatures and off-chain relayers for cost-free user interactions. This framework comprises two core components:

### <mark style="color:purple;">1. EIP-2612 Permit for Gasless Deposits</mark>

* We adopt the **EIP-2612** standard, enabling users to sign an off-chain permit message using their private key. This permit, compliant with ERC-20 token standards, authorizes token transfers without requiring an on-chain approval transaction, reducing gas costs to zero for the user.
* The signed permit is processed by off-chain relayers, which execute the deposit transaction on-chain, covering gas fees through a subsidized model. This can be expressed as:

$$
gas(A) = 0
$$

The relayer verifies ( S ) using ( A )'s public key and executes the transfer.

* This mechanism is particularly advantageous for **high-frequency traders**, as it minimizes entry barriers and enhances user experience.

### <mark style="color:purple;">2. Signature-Based Gasless Actions</mark>

* For other critical operations, such as order placement and cancellations, we employ **ECDSA signature-based authentication**. Users sign an off-chain message that authorizes the transaction, which is then executed on-chain by relayers or bundled with other actions.
* The **signature verification process** ensures transaction integrity, using the following function:

$$
V(S, P) \rightarrow {True, False}
$$

where:

* ( V ) is the verification function,
* ( S ) is the signature,
* ( P ) is the public key.

If verified, the transaction is executed, maintaining gas costs at zero for the user.

* We use **ECDSA encoding** to ensure the process cannot retrieve the private key from the signed message in any way.

### <mark style="color:purple;">Key Benefits</mark>

* **Zero Gas Costs**: Users can transact without spending gas fees.
* **Improved Security**: Transactions are executed only with explicit user consent.
* **Enhanced User Experience**: Reduces friction, especially for high-frequency traders.
* **Efficient Execution**: Relayers handle transactions without compromising decentralization.

By integrating this framework, our protocol ensures seamless, gasless transactions while preserving security and decentralization.


---

# 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://docs.aark.digital/gasless-transaction-framework.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.
