Type/to search
Built-in Functions
Structures
Built-in Variables and Constants
Conventions
Exchanges
Capability Matrix
Centralized Exchanges
Decentralized Exchanges (DEX)
Prediction Markets
Securities and Futures
On-chain & Custom

Sets the gas limit multiplier: a transaction's gasLimit is the node's gas estimate times this value.

exchange.IO(k)
exchange.IO(k, x)

Examples

Set the gas limit multiplier.

javascript
function main() { exchange.IO("gasMultiplier", 1.5) Log("gas multiplier:", exchange.IO("gasMultiplier")) }

Returns

TypeDescription

number

Returns the current multiplier.

Arguments

NameTypeRequiredDescription

k

string

Yes

Always gasMultiplier, which sets the gas limit multiplier.

x

number

No

The multiplier, from 1 to 5. The default is 1.2. A transaction's gasLimit is the node's gas estimate times this multiplier. If you leave this parameter out, the call returns the current multiplier.

See Also

Remarks

gasLimit is only a cap. The actual fee is charged on the gas the transaction uses, so a higher multiplier does not raise what you pay. However, the wallet balance must be enough to cover the fee at the full gasLimit.

Some LP transactions settle fees that an existing position has earned: increasing liquidity, decreasing liquidity, collecting fees and removing liquidity. On Aerodrome and Velodrome this also includes staking, unstaking and claiming rewards. For these transactions, gasLimit is the larger of "estimate × multiplier" and "estimate + buffer". The buffer is 50000 per position, plus 40000 for each fee (or reward) transfer. This is needed because a position may have no fees yet when gas is estimated, but earn fees before the transaction is confirmed on-chain, and then execution needs extra accounting and token transfers. For exchange.IO("bridge.send", ...), gasLimit is never lower than the gasLimit given in the LI.FI quote.