VELOCORE V2
V1 DocszkSyncEraLineaTelos
  • Introduction
  • Our Philosophy
    • Vision
    • Gas Optimization
    • General Bedrock for All Kinds of AMM
    • Epoch-less Predictability
    • Free Flowing Easy Vote System
  • DEX Innovation
    • Token Vault
      • Flashloan
    • Gas Saving Matters : Benchmark
    • AMM Flexibility
    • Multi In/Out Swap
    • Batch Swap
    • Adjustable Trading Fee Mechanics
    • Accumulating Swap Fees in LP Tokens
  • ve(3,3) Innovation
    • Removing 'Epoch' Systems
      • Bribe Optimization
    • Fungible Votes ($veVC)
      • No Decay & Easy Liquidation
    • Decentralized Gauge Deployment
    • Rebase Elimination
  • Security & Contract Address
    • zkSyncEra Contracts
    • Linea Contracts
    • Telos Contracts
    • V1 zkSyncEra (deprecated)
    • Three Rounds of Audits
  • Technical Docs
    • Concepts
    • Architecture Overview
      • Source Files Overview
    • How to interact with VELOCORE
      • Uniswap compatible interface
    • How to Read Data
    • Example Codes
      • Swap
      • Add liquidity
      • Stake
      • Voting
      • Multicall operations
      • cf) wrapper functions
    • Typescript Examples for Integration
    • Pool Specifics
      • Generalized CPMM
      • Wombat Stableswap
    • Events & Chart Integration
      • Getting a pair list
      • Interpreting Swap / LP events
    • Flashloan
  • zkSync Era
    • Migration Plan
      • $VC 1:1 Exchange
      • veNFT -> $veVC
      • One-Step LP Migration
      • Migration Schedule
      • Emission Migration
    • V2 Tokenomics
      • $VC Gauge
      • Bribe Mechanics
      • $veVC VOTING
    • Paymaster as a Service
  • Linea
    • Launch Details
      • Getting Ready
      • Bridging
      • V2 Launch Event
      • $LVC Presale
    • $LVC Tokenomics
      • $LVC Gauge
      • Bribe Mechanics
      • $veLVC VOTING
  • Telos
    • Launch Details
      • Getting Ready
      • Bridging
      • Launch Event
    • $TVC Tokenomics
      • $TVC Gauge
      • Bribe Mechanics
      • $veTVC VOTING
  • Free Loot Box for Future Airdrops
  • PASSPORT - F'air drops
  • Legal Disclaimer
  • Velocore Brand Assets
Powered by GitBook
On this page
  1. zkSync Era

Paymaster as a Service

Integrate our Paymaster with a wide range of token choices into your dApp.

Last updated 1 year ago

Velocore provides free & easy paymaster implementation support and common reward pool benefits for partners to promote zkSyncEra's native AA feature.

Available tokens

As a Dex, we want to take over the inventory risk and add as many different tokens to the paymaster as possible.

  1. Major tokens : USDT / USDC / DAI / wBTC

  2. Proxy tokens whitelisted by MatterLabs

  3. Partner protocol tokens

When you use the Velocore paymaster, your tokens will automatically be available for gas on all protocols that use our paymaster. We're stronger together.

How to integrate?

Follow this procedure from the official docs to change the paymaster param to be sent with the transaction when it's sent, and simply add the associated settings UI to make it usable.

import { Contract, Provider, types, utils, Wallet } from ‘zksync-web3’;
import { ethers } from ‘ethers’;
// Define the Paymaster address constant
const PAYMASTER_ADDRESS = ‘0x86E6Ab1950770e24035D1b3a5907C7D503d43B01’;
const provider = new Provider(RPC_URL);
const signer = new Wallet(PRIVATE_KEY, provider);

const contract = new Contract(CONTRACT_ADDRESS, CONTRACT_ABI, provider);
// Transaction methods: approve and swap
// Define the public address as ACCOUNT
const prepareContractTx = await contract.populateTransaction[method](...params, {
      from: ACCOUNT,
});
// Estimating gas requirements for the transaction
const estimatedGas = await provider.estimateGas({ ...prepareContractTx, from: ACCOUNT });
const currentGasPrice = await provider.getGasPrice();
// Setting up parameters for the Paymaster
// ERC20 token address used to pay for gas
const paymasterSetup = utils.getPaymasterParams(PAYMASTER_ADDRESS, {
  type: “ApprovalBased”,
  TOKEN_ADDRESS,
  minimalAllowance: ethers.BigNumber.from(1),
  innerInput: new Uint8Array(),
});
prepareContractTx.customData = {
  gasPerPubdata: utils.DEFAULT_GAS_PER_PUBDATA_LIMIT,
  paymasterSetup,
};

const transactionResult = await signer.sendTransaction({
  ...prepareContractTx,
  maxFeePerGas: currentGasPrice,
  maxPriorityFeePerGas: BigNumber.from(0),
  gasLimit: estimatedGas,
});

Reference dev docs : /

Official paymaster contract :

Paymaster
zksync sdk for AA
0x443F985fd3484b9FDC7B5df58c9A0FAdbe449b92