Skip to main content

Overview

One-click trading (1CT) removes the need to interact with a wallet when submitting transactions, reducing time to trade. It does this through the use of two new mechanisms:
  • 1CT wallet
  • Trade delegation
There are two ways to connect to Gains. An instant wallet already includes one-click trading, with no setup and no gas to pay: see Gasless trading. The steps below are for the other path, where you connect an existing wallet such as MetaMask or Rabby.

1CT Wallet

Gains uses a derived externally owned account (EOA) wallet for submitting trading transactions. It relies on the following sequence:
  1. Trader provides a 4 digit PIN
    • This pin should be remembered for future recovery
  2. Trader signs a prefixed message of the PIN using their wallet
    • The wallet used to sign the message should be remembered for future recovery
  3. Gains website generates an Secp256k1 key pair using the signed message as a seed
  4. Gains website encrypts and stores the key material on the local device
Key material is deterministic meaning it can be replicated. Pin + personalSign gives strong security guarantees while allowing a trader to recover material if lost. A trader can also use this to prevent storing on device between trading sessions (clear and regenerate for each session).
Once a trader creates a 1CT wallet, they must grant it permissions to trade on their behalf by approving it as a delegate.

Trade Delegation

Gains 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.
  • Open a trade
  • Open an order
  • Cancel an order
  • Update stop loss
  • Update take profit
  • Close a trade
The 1CT wallet is a delegation wallet.

Set up

One-click trading is in the account dropdown: click your address in the top right corner of gains.trade, then One-Click Trading. It is offered when you connect your own wallet, such as MetaMask or Rabby. The screenshots on this page use example figures.
The account dropdown under the address button: Transactions, Buy Crypto, and One-Click Trading marked Off.

The account dropdown of a wallet without one-click trading.

The setup creates the 1CT wallet, approves it as your delegate and funds it, in three screens:
1

Start

The first screen sums up the setup: create the 1CT wallet, delegate to it, and fund it with gas. Click Let’s go.
The One-Click Trading window listing three easy steps: Create, Delegate and Fund gas, with the buttons Later and Let's go.
2

Create the 1CT wallet

Type a 4-digit PIN, click Sign, and sign the message in your wallet. The 1CT wallet is built from that signature. Remember the PIN and the wallet you signed with: together they rebuild the same 1CT wallet on another device or after you clear your browser.
The Create your One-Click Trading Wallet window with a 4-digit PIN typed in and a Sign button.
3

Approve, fund and enable

The Wallet Setup screen shows your new 1CT wallet and its gas balance, then three actions in order:
  1. Approve sends the transaction that makes the 1CT wallet your delegate.
  2. Fund sends the network’s gas token (ETH on Arbitrum, POL on Polygon) from your wallet to the 1CT wallet, for gas only. The screen proposes an amount, 0.01 ETH on Arbitrum, and estimates how many trades it pays for.
  3. Enable turns one-click trading on.
The Wallet Setup window: the new 1CT wallet with 0 ETH, the Approve button active, and the Fund and Enable buttons greyed out.

Before the approval.

The same window once approved and funded: the 1CT wallet holds 0.01 ETH, about 237 trades, and the Enable button is active.

Approved and funded, ready to enable.

Manage

Once set up, the One-Click Trading entry of the account dropdown reads On or Off and opens these settings:
  • Enable One-Click Trading: the switch that turns it on and off.
  • Fund: send more of the network’s gas token to the 1CT wallet.
  • Withdraw All: send the 1CT wallet’s gas token back to your wallet.
  • Copy Private Key: copy the 1CT wallet’s private key.
  • Reset: remove the 1CT wallet from this browser. Your PIN rebuilds it.
The One-Click Trading settings in the account dropdown: the Enable One-Click Trading switch on, the 1CT wallet address with a Reset button, a balance of 0.00994 ETH for about 231 trades, and the buttons Fund, Withdraw All and Copy Private Key.

The One-Click Trading settings, after one trade and a stop loss update.

Use

Once enabled, trade as usual: your wallet no longer asks you to confirm. The trade button carries a lightning bolt, and the bolt next to your address is filled.
The trading panel on ETH/USD with a lightning bolt on the Market Long button.

The trading panel with one-click trading on.

The address button in the navigation bar with a filled lightning bolt and the tooltip One-Click Trading - Enabled.

The filled bolt next to your address.

The 1CT wallet pays the gas of each trade. When it runs low, a Low Gas button appears in the trading panel, and when it cannot pay any more, the trade button reads Add gas: fund it again from the settings above.

Transactions

Because the 1CT wallet is managed by the site, so are its transactions. The Transactions entry of the account dropdown lists the last transactions sent from this browser. A lightning bolt marks the ones sent by the 1CT wallet, and while one of them is pending, Speed Up and Cancel let you push it through or cancel it.
The Transactions list: Update SL Trade, pending, with Speed Up and Cancel buttons, then Open Trade, Fund Delegate and Set Delegate, all marked Success.

A pending stop loss update sent by the 1CT wallet, with Speed Up and Cancel.

FAQ

Is the 1CT wallet key material stored somewhere?
Only on your device. You can wipe it using “Reset” whenever you choose.
I wiped my device storage, is my 1CT wallet gone?
Yes but you can restore it by using the same PIN and wallet when re-generating.
Are trades opened against my 1CT wallet?
No, they are opened against your connected wallet.
Do I have to have 1CT enabled to interact with trades I opened with it?
No, you may toggle the feature on and off whenever you’d like.
Can I use the same 1CT wallet on multiple devices?
Yes, as long as you use the same PIN and wallet while generating.
Can I use the same 1CT wallet for multiple accounts?
Yes, you may delegate to your 1CT wallet with any connected wallet.
Can I have multiple 1CT wallets?
For each account you use to trade, you may have one delegate. The recommended setup is to use the same 1CT wallet for all trading accounts.
What if my transaction is stuck?
In the accounts dropdown, you’ll find a transactions list. Here you may speed up and/or cancel a stuck transaction.
Do I have to have key material stored on device?
No, you can re-create your 1CT wallet and reset it at the end of each trading session. Just use the same PIN and wallet to sign.