> ## Documentation Index
> Fetch the complete documentation index at: https://docs.decibel.trade/llms.txt
> Use this file to discover all available pages before exploring further.

# Advanced

> Gas price management, fee payer behavior, and time synchronization

## Gas price manager

Use `GasPriceManager` to fetch and cache gas estimates and pass them to the Write SDK for faster, predictable transaction building:

```ts theme={null}
import {
  GasPriceManager,
  DecibelWriteDex,
  NETNA_CONFIG,
} from "@decibeltrade/sdk";
import { Ed25519Account, Ed25519PrivateKey } from "@aptos-labs/ts-sdk";

const gas = new GasPriceManager(NETNA_CONFIG, {
  multiplier: 2, // default multiplier applied to estimates
  refreshIntervalMs: 60_000, // refresh cadence
});
await gas.initialize();

const account = new Ed25519Account({
  privateKey: new Ed25519PrivateKey(process.env.PRIVATE_KEY!),
});

const write = new DecibelWriteDex(NETNA_CONFIG, account, {
  nodeApiKey: process.env.APTOS_NODE_API_KEY!, // Required
  gasPriceManager: gas,
});
```

Stop the manager when your app unmounts:

```ts theme={null}
gas.destroy();
```

## Gas sponsorship

* By default, transactions are self-pay (the user pays gas in APT).
* To sponsor gas via [Geomi Gas Station](/quickstart/gas-station), add `gasStationApiKey` to your config:

```ts theme={null}
const config = { ...NETNA_CONFIG, gasStationApiKey: process.env.GAS_STATION_API_KEY! };
const write = new DecibelWriteDex(config, account);
```

## Time synchronization

If client clocks are skewed, set `timeDeltaMs` to shift local time used when building transactions:

```ts theme={null}
const write = new DecibelWriteDex(NETNA_CONFIG, account, {
  timeDeltaMs: serverDeltaMs,
});
```

You can compute `serverDeltaMs = serverTimeMs - Date.now()` using your own time endpoint.
