GP - Use Case and Functionalities
Gas Pump (GP) is a Tatum Smart Contract that simplifies dust management and gas fee handling in custodial applications. It enables you to manage deposits and withdrawals at scale with fewer fees and less operational overhead.
Introduction to Gas Pump Basics
1. The Master Gas Pump Address
- You designate a blockchain address as your Master GP Address. You must own the PrivateKey.
- The Master GP Address owns the precalculated Slave GP Contract Addresses.
- The Master GP Address pays all gas fees for operations initiated by the Slave GP Contract Addresses.
2. The Slave GP Contract Addresses
- These are Smart Contract based addresses derived from the Master GP Address.
- If only precalculated, a Slave GP Contract Address can be used for deposits only.
- To enable withdrawals, the address must be activated on-chain, which requires paying activation gas fees.
3. Address Index
- Each Slave GP Contract Address has a unique index.
- You can start indexing at any number, but we recommend starting from 0.
- Example: if you precalculate addresses with indices 3 to 5, the array returns them in order:
[
"0x3cb76aed9c5e336ef961265c6079c14e9cd3d125", // index == 3
"0x2c6079c14e9cd3d2ea8cb76aed9c5e336ef96586", // index == 4
"0xf5e336ef9612614e9cd3d2ea8cb76aed95c6087c" // index == 5
]
Attention
It is strongly recommended to track both the addresses and their indices.
4. Precalculation Limits
- Harmony – up to 4,000 addresses in one call
- TRON – up to 500 addresses in one call
- Other supported networks – up to 5,000 addresses in one call
If you need more, make consecutive API calls.
Example: to precalculate 10,000 addresses on Ethereum, call indices 0–4,999, then 5,000–9,999.
5. Network Specific
Gas Pump smart contracts are network-specific.
- A Gas Pump contract deployed on one network (for example, Ethereum) cannot be used on another networks (e.g., Polygon, BSC).
Standard Transfer (Baseline)
- Assign a standard blockchain address (EOA) to the end-user as a Deposit Address.
- End-user deposits assets (e.g., ERC-20 tokens) into this Deposit Address.
- You calculate and fund gas fees for transferring the assets out.
- Send native assets (for gas) from your Master Exchange Address to the Deposit Address.
- Transfer the end-user’s assets from the Deposit Address to your Master Exchange Address.
Observations
- Two on-chain transactions are required (funding gas + transferring tokens).
- Gas fees are paid twice.
- Dust accumulates in user deposit addresses.
- At scale (thousands/millions of users), this model is inefficient and costly.
Gas Pump Custodial Transfer (Optimized)
- Select a Master GP Address (you must control its PrivateKey).
- This address pays all fees for transactions from Slave GP Contracts.
- Precalculate a Slave GP Contract Address.
- Can receive deposits immediately.
- Withdrawals require activation.
- Assign the precalculated Slave GP Contract Address as the end-user’s Deposit Address.
- End-user deposits assets (e.g., ERC-20 tokens).
- Activate the Slave GP Contract Address (one-time on-chain cost).
- Withdraw and transfer assets directly from the Slave GP Contract Address to your Master Exchange Address.
Observations
- Activation incurs a one-time Smart Contract deployment fee.
- All subsequent withdrawal fees are paid centrally by the Master GP Address.
- Dust accumulation is avoided.
- Activated Slave GP Contracts can be reused or reassigned across end-users as needed.
Important Information
- Gas Pump is only available on some EVM networks.
- Review the smart contracts on our GitHub page:
- All smart contracts audited and certified by Certik:
Warning
Sending assets on the wrong network of a Gas Pump address results in the irrecoverable loss of those assets. Contacting Support or any other Tatum staff member about assets sent to the wrong network won't provide a positive outcome. Tatum cannot help you.
Updated 9 days ago