Documentation

Documentation

Documentation

API Documentation

API Documentation
API Documentation

Search

API Reference

API Reference

API Reference

Gas & Fee Management API

Gas & Fee Management API

Gas & Fee Management API

The Gas & Fee Management API provides estimation, prioritization, and fee transparency for executions coordinated by Helios.
Gas is treated as part of execution reliability, not an afterthought.

Helios estimates gas and fees but never funds or signs transactions.


Gas Estimation

Before execution, Helios estimates gas usage based on current network conditions and execution complexity.

const estimate = await helios.gas.estimate({
  asset: "USDC",
  amount: "4500",
  fromChain: "ethereum",
  toChain: "arbitrum",
});

Gas estimates account for:

  • Route structure

  • Protocol interactions

  • Cross-chain coordination

  • Network congestion

Estimates are probabilistic and may change between simulation and execution.


Gas Abstraction

Helios abstracts chain-specific gas mechanics behind a unified interface.

const execution = await helios.execute({
  asset: "USDC",
  amount: "4500",
  fromChain: "ethereum",
  toChain: "arbitrum",
  options: {
    gasStrategy: "auto"
  }
});

Helios handles:

  • Chain-specific gas models

  • Base vs priority fees

  • Execution ordering across chains

Applications do not need to manage per-chain gas logic directly.


Fee Breakdowns

Helios exposes a transparent fee breakdown for each execution.

console.log(execution.fees);

Example response:

{
  "networkFees": {
    "ethereum": "12.43",
    "arbitrum": "0.87"
  },
  "protocolFees": "4.10",
  "totalEstimatedFees": "17.40",
  "currency": "USD"
}

Fee data is informational and intended for display or accounting.


Priority Settings

Execution priority can be configured to balance cost and speed.

options: {
  priority: "standard" | "fast" | "urgent"
}

Priority settings influence:

  • Gas price selection

  • Transaction inclusion speed

  • Execution ordering

Higher priority may result in higher fees during congestion.


Refund & Repricing Logic

If an execution fails before finalization, unused gas is not consumed.
Helios tracks execution state and adjusts fee estimates accordingly.

const status = await helios.getExecution(execution.id);

if (status.status === "failed") {
  console.log(status.feeAdjustment);
}

Repricing occurs when:

  • Network conditions change significantly

  • Execution is retried after failure

  • Priority settings are modified

Helios never auto-retries executions without explicit instruction.


Common Gas Errors

Gas-related issues return explicit error codes.

{
  "error": {
    "code": "GAS_ESTIMATION_FAILED",
    "message": "Unable to estimate gas under current network conditions"
  }
}

Other common errors include:

  • INSUFFICIENT_GAS_BALANCE

  • PRIORITY_UNAVAILABLE

  • NETWORK_CONGESTED

Create a free website with Framer, the website builder loved by startups, designers and agencies.