Unigox Docs
  • Introduction
  • User Guides
    • Sell crypto
    • Buy crypto (coming soon)
    • Trade as vendor
    • Referral & Points Program
    • Fees
  • FAQ
  • How it works?
    • Platform Mechanics
    • How Offer Matching Works
    • Gasless non-custodial wallet
    • Supported Assets and Blockchains
    • Bridging to Unigox appchain
  • Resources
    • X (formerly Twitter)
    • Telegram
    • Unigox
Powered by GitBook
On this page
  • Overview
  • Understanding Gasless Transactions with Unigox Wallet
  • Why Is This Cool?
  • Technical Implementation
  • Security Considerations:

Was this helpful?

Export as PDF
  1. How it works?

Gasless non-custodial wallet

Say goodbye to gas fees!

PreviousHow Offer Matching WorksNextSupported Assets and Blockchains

Last updated 7 days ago

Was this helpful?

Ever wanted to send tokens or interact with a decentralized application (dApp) without worrying about having enough native currency (like ETH or SOL) for gas fees? With our wallet, you can! Perfect way to onboard your friends into crypto with a simple-to-use gasless transaction wallet like Unigox that makes the experience smoother and more accessible!

Overview

Understanding Gasless Transactions with Unigox Wallet

Gasless transaction feature is exclusively available for operations on the Unigox appchain (currently XAI network).

  • Unigox Wallet supports a wide range of other EVM-compatible chains and the Solana network for all your standard transaction needs (which will require the respective native currency for gas fees).

  • You can easily bridge assets to Unigox's XAI network to take advantage of gasless transactions.

  • Bridge out from XAI to other supported EVM or Solana chains at any time using the Unigox bridge solution.

When you want to send tokens using our wallet:

You choose your action:

  • You select the token you want to send.

  • You enter the recipient's address.

  • You specify the amount.

Unigox app prepares the "Instruction Slip":

  • Our application (the frontend you're using) gathers all these details.

You authorize the Action (The "Magic" Signature):

  • Unigox wallet will ask you to sign a message. This message lays out what you intend to do (send X tokens to Y address).

  • Important! You are signing a piece of data, not initiating a blockchain transaction directly. Therefore, you don't pay any gas fees at this step. Your signature is your secure "OK" for the action.

  • This uses a standard called EIP-712, which makes signed messages human-readable and secure.

Unigox sends your authorized instruction to our Relayer:

  • Once you've signed, your Unigox wallet sends your instruction (the ForwardRequest) and your digital signature to our secure Relayer.

Our Relayer does the "heavy lifting":

  • The Relayer receives your authorized instruction.

  • It validates everything (is the signature correct? is the instruction valid?).

  • One of our "Relayer" accounts (which does have XAI for gas) then creates an actual blockchain transaction.

  • This transaction tells the forwarder contract on the blockchain: "Here's an instruction from User A, along with their signature. Please execute it."

  • Our Relayer pays the gas fee for this blockchain transaction.

The blockchain confirms the Action:

  • The Forwarder Contract receives the instruction from our Relayer.

  • It verifies your signature again (is it really from you?).

  • It checks the nonce (has this instruction been used before?).

  • If everything is valid, the forwarder contract then "impersonates" you (in a secure, pre-approved way) and tells the token contract (e.g., sUSDC) to perform the transfer you originally requested.

  • The token contract is special because it's designed to understand that even though the forwarder contract is calling it, the true originator of the action is you (thanks to EIP-2771 context).

Success!

  • Your tokens are sent.

  • Unigox will show you the transaction hash and confirmation.

  • You successfully made a blockchain transaction without directly paying gas!

Why Is This Cool?

  • User-Friendly: No need to worry about having XAI just to pay for gas.

  • Simplified Onboarding: New users can start interacting with Web3 without the immediate hurdle of acquiring gas tokens.

  • Smoother Experience: Transactions feel more like traditional web app interactions.

Technical Implementation

  • EIP-2771 (Meta-Transactions): This is the Ethereum Improvement Proposal that standardizes how these gasless (or "meta") transactions work. The core idea is to decouple the sender of a transaction (the Relayer) from the originator of the action (you, the user).

  • Forwarder Contract (SyntheticAssetForwarder): This is a trusted smart contract (an OpenZeppelin ERC2771Forwarder implementation) that acts as the entry point for the meta-transactions.

    • It's responsible for verifying your signature and nonce.

    • It then relays your intended call (e.g., token.transfer()) to the target contract.

    • It manages nonces for each user to prevent replay attacks (submitting the same signed message multiple times).

  • We use EIP-712 for signing. This standard provides a way to sign structured data, making it more secure and user-friendly, as Unigox wallet can display what you, as a user, are signing in a readable format.

Security Considerations:

  • You only sign what you intend to do: The EIP-712 signature is for a very specific action (e.g., "send 10 USDC to address 0xabc..."). You are not giving broad permissions.

  • Nonce System: Prevents malicious actors from replaying your old signed messages.

  • Trusted Forwarder: The forwarder contract is a critical piece of infrastructure. Ours is based on well-audited OpenZeppelin contracts.

  • Your Private Keys Remain Secure: Your private keys never leave your Unigox wallet. You only use them to sign messages. With Unigox MPC wallet approach, you never have whole private key on your device as it's split amongs multiple parties like your device and Web3Auth MPC infrastructure provider.