6. Gas Abstraction & User Experience

For Frogment to achieve mass adoption, the underlying cryptography must be invisible. We achieve this through Native Gas Abstraction.

6.1 Native Stablecoin Gas

On Ethereum or Solana L1, a wallet with 1,000 USDC but 0 ETH/SOL is useless. On Frogment, that wallet is fully functional.

How it works:

The Frogment Sequencer accepts specific whitelisted tokens (USDC, USDT, EURC) as valid payment for execution resources.

  1. Fee Calculation: The Sequencer calculates the required computation units.

  2. Quote: It provides a quote in USDC (e.g., 0.005 USDC).

  3. Deduction: The user signs the transaction authorizing the transfer of Amount + Fee.

6.2 Code Example: Sending a "Gasless" Transaction

Developers can use the Frogment SDK to construct these transactions easily. The "Gas" is abstracted away from the frontend logic.

Code Snippet (TypeScript SDK):

import { FrogmentClient, Transaction } from '@frogment/sdk';

// Initialize Client
const client = new FrogmentClient('https://rpc.frogment.network');

// Define Transaction
const tx = new Transaction({
  to: 'RecipientAddress...',
  amount: 100, // 100 USDC
  token: 'USDC',
});

// Specify Fee Payer Token (The Magic Part)
// User pays gas in USDC, not FRG or SOL
tx.setFeeToken('USDC');

// Sign and Send
const signature = await wallet.signAndSend(tx);

console.log(`Transaction Confirmed with Soft Finality: ${signature}`);

6.3 Account Abstraction (Smart Accounts)

Frogment supports Smart Accounts natively. This allows for:

  • Session Keys: Users can login to a game or app once, and authorize micro-transactions for the next hour without signing a popup every time.

  • Social Recovery: Users can recover their accounts via email or trusted friends, removing the fear of losing Private Keys.

Last updated