# One-click Trading (1CT)

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

### What is 1CT?

One-click trading (1CT) allows users to tap into the seamless experience of a CEX, unlocking the full performance of trading.

Without 1CT, users must sign multiple transactions when modifying an order or position with linked triggers. With 1CT, the process is automated delivering the trading experience more akin to a CEX but with self-custody.

The release of 1CT emulates the familiar trading experience of CEXs, where users can log in and start trading until they finish their trading affairs. The near-instant trade execution of 1CT imbues confidence into those fleeting pauses of apprehension preceding every trade instead of idling while you wait for an approval transaction to confirm.

### How 1CT works?

1CT does this through the use of two new mechanisms:

* 1CT wallet
  * AshPerp uses a derived externally owned account (EOA) wallet for submitting trading transactions. **It relies on the following sequence:**
    * Trader provides a 4 digit PIN.
    * Trader signs a prefixed message of the PIN using their wallet.
    * AshPerp generates a **Secp256k1** key pair using the signed message as a seed.
    * AshPerp encrypts and stores the key material on the local device.
  * Once a trader creates a 1CT wallet, they must grant it permission to trade on their behalf by approving it as a delegate.
* Trade delegation
  * AshPerp smart contracts support a delegation feature, allowing EOAs to submit transactions on behalf of other EOAs. To delegate trading to another EOA, a trader must approve the address as a delegate through the trading contract. A delegation wallet only needs gas funds for submitting transactions, as collateral and PnL are tied to the trader address.

### How to use 1CT?

* **Step 1:** Connect your wallet

Currently on Devnet we are supporting the MultiversX DeFi Wallet Extension, for further guide, please kindly [check here](https://docs.ashswap.io/ashswap-feature/connect-a-wallet).

* **Step 2:** Enable 1CT

<figure><img src="/files/9iO4gtFbIFBJf0yTFF3R" alt=""><figcaption><p>Click Enable 1CT</p></figcaption></figure>

* **Step 3:** Setup 1CT with your 4 digit number PIN CODE

<figure><img src="/files/nCPf1qquz4AE0IpTBXiK" alt=""><figcaption><p>Fill in your PIN CODE</p></figcaption></figure>

<figure><img src="/files/hBeMMAnU4uP0tNu8FiXz" alt=""><figcaption><p>Click Approve</p></figcaption></figure>

* **Step 4:** Deposit your token to 1CT wallet and start your trading journey

<figure><img src="/files/tz5YYlbEkiMzxSXIImGv" alt=""><figcaption><p>1CT is on, click Deposit to move your token to 1CT wallet</p></figcaption></figure>

<figure><img src="/files/CjBMY9IcDfafOa1FTWs3" alt=""><figcaption><p>Choose the Amount and click Confirm</p></figcaption></figure>

### FAQ

<details>

<summary>I don't see the Tx confirm when using 1CT</summary>

This is due to the authority you've already granted to your 1CT wallet. 1CT aims to provide an experience comparable to that of a centralized exchange (CEX), yet it's essential to meticulously review the order details before sending it.

</details>

<details>

<summary>I don't want to use 1CT anymore. How can I go back to trading directly from my wallet?</summary>

There are 2 ways you can do that:

1/ Switch off the toggle from "One click trading - ON" to "One click trading - OFF"&#x20;

![](/files/TzgmGU64E1W05bKqqAQo)

2/ Click Reset and confirm, you can always re-activate the 1CT wallet at your will

![](/files/pwfJXCQ1a0ARzD2GBcp6)

</details>

<details>

<summary>I turned on 1CT, but can not create Tx, why?</summary>

Remember to deposit EGLD to your 1CT Wallet for gas fees

</details>


---

# 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.ashswap.io/ashperp/one-click-trading-1ct.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.
