GAZ: A Gas-Pegged Synthetic Asset

Whitepaper – AmericanCrypto

Abstract

GAZ is a synthetic ERC-20 asset designed to track the cost of Ethereum base gas. Inspired by stablecoin architectures such as DAI, GAZ uses overcollateralized vaults and on-chain liquidation mechanics. The key difference is that GAZ attempts to maintain a soft peg to floating gas prices (via the EVM’s block.basefee), rather than to a fiat-denominated price. This allows users to potentially hedge Ethereum gas costs by holding or minting/burning GAZ.

Contents

  1. Motivation
  2. System Architecture
  3. Token & Vault Mechanics
  4. Collateralization Math
  5. Liquidations & Stability
  6. Differences vs. DAI
  7. Risks & Disclaimers
  8. Implementation Notes
  9. Contact
  10. Follow & Contribute

1. Motivation

Gas cost volatility is a major pain point for users and builders on Ethereum. GAZ offers a way to gain gas price exposure—or hedge it—without relying on USD-based oracles. By using internal accounting in gas units and valuing debt via block.basefee, GAZ maintains a floating peg to Ethereum gas prices. All pricing is derived directly from on-chain data, avoiding external dependencies and reducing oracle risk.

2. System Architecture

Core Contracts

  • GAZ (ERC-20): mintable/burnable token controlled by the vault manager. Represents “gas units” exposure. GAZ uses 0 decimals (1 GAZ = 1 gas unit).
  • VaultManager: manages per-user vaults, collateral, and debt accounting in gas units; enforces collateral ratio; handles repay/withdraw; and conducts liquidations.

Data Model

  • Vault: owner, collateralWei, debtGasUnits,lastAccrual.
  • Debt is denominated in gas units. Valuation uses the current block.basefee.

3. Token & Vault Mechanics

3.1 Minting (Deposit & Mint)

Users open a vault, deposit ETH collateral, and optionally mint GAZ. Minted amount is recorded as debtGasUnits in the vault. The vault must satisfy the collateralization requirement at the current block.basefee.

3.2 Repay & Withdraw

Users repay GAZ, which is burned on receipt to reduce circulating supply one-for-one with the vault’s principal debt. After repayment, users may withdraw ETH collateral while keeping the vault safe; if all debt is repaid, remaining collateral can be fully withdrawn. Principal repayments do not go to the treasury.

When a vault still has debt, withdrawals require block.basefee > 0. If block.basefee == 0, the system is repay-only until a non-zero basefee is observed. After any withdrawal while in debt, the vault must pass the safety check again at the current basefee.

Permit-based flows are supported via ERC20Permit using repayAndWithdrawWithPermit.

3.3 Stability Fee (Interest)

A stability fee accrues continuously on outstanding debtGasUnits. The system uses a linear, time-based model. Accrued interest is minted as new GAZ to the protocol treasury and added to vault debt during accrual.

debt += debt * stabilityFee * secondsElapsed / (1e18 * 365 days)

3.4 Vault Ownership

In the reference implementation, vault ownership is fixed to the creator address. Vault transfers are not supported.

3.5 Token Decimals

GAZ uses 0 decimals; 1 GAZ = 1 gas unit. Some third-party UIs and AMMs assume 18 decimals—integrators should account for this design choice.

4. Collateralization Math

Let C be collateral (wei), D be debt gas units, and BF be block.basefee (wei per gas). With collateral ratio CR (scaled by 1e18), a vault is safe if:

C * 1e18 >= (D * BF * CR)

Liquidation threshold replaces CR with a lower LR:

Liquidatable if: C * 1e18 < D * BF * LR

5. Liquidations & Stability

If a vault becomes undercollateralized, anyone may initiate a liquidation by repaying part or all of the vault’s outstanding GAZ debt. In return, they receive a proportional amount of the vault's ETH collateral, increased by a liquidation penalty. This design incentivizes third parties to help maintain solvency and peg alignment while enabling permissionless risk mitigation. A vault becomes liquidatable when it falls below the liquidation ratio (LR).

Liquidations can be partial. There is no requirement that a single action fully clears the debt or immediately restores the vault to the safe band; further liquidations can continue until the position becomes safe or fully repaid. The repayable amount is capped by both the remaining debt and what the vault’s collateral can afford at the current block.basefee and penalty, ensuring liquidators are never underpaid.

// Liquidation (simplified):
// toRepay = min(
//   requestedRepay,
//   vault.debtGasUnits,
//   floor(vault.collateralWei / (block.basefee * penalty / 1e18))
// )
// collateralOut = toRepay * block.basefee * penalty / 1e18

Permit-based liquidations are supported via liquidateWithPermit.

6. Differences vs. DAI

  • Peg Target: DAI targets a USD peg via oracles; GAZ targets floating gas via block.basefee, avoiding USD oracles.
  • Debt Denomination: DAI debt is dollar-like; GAZ debt is in gas units whose value varies as basefee changes.
  • Volatility Profile: GAZ exposure fluctuates with network congestion, potentially making liquidations more prevalent than a fiat-pegged system.

7. Risks & Disclaimers

  • Use at your own risk: The contracts and interface are provided “as-is” without warranties. Users are responsible for understanding the risks of smart contracts, liquidations, and gas volatility. Please always check the actual solidity contracts and interface code. When in doubt, always interact directly with the validated smart contract to avoid potential interface issues. The frontend dapp hosted on this website is a public beta, intended primarily for educational use and testing. Advanced or power users may prefer to interact directly with the validated contracts for more precise control, as the frontend applies built-in cushions (e.g. a 12.5% buffer for sudden basefee changes) to reduce the chance of contract reverts, which may result in slightly less optimal minting or withdrawal amounts compared to direct contract calls.
  • Market price drift: The price of GAZ on third-party exchanges may deviate from the effective “gas value” implied by block.basefee. Market conditions, liquidity, and the activity of arbitrageurs all impact how closely secondary-market prices track on-chain gas.
  • Liquidation dynamics: Because the peg target is floating gas (not a fixed fiat value), vault liquidations may be more volatile than DAI-like systems, especially during gas spikes or network congestion.
  • Protocol parameters: Collateral ratio, liquidation ratio, penalty, and stability fee are configurable and may be updated; parameter changes can affect vault safety thresholds and system behavior.
  • Operational note: On networks/epochs where block.basefee may be zero or unavailable, withdrawals while in debt are temporarily disabled (repay-only) until a non-zero basefee returns.

8. Implementation Notes

The reference implementation consists of two contracts: GAZ (ERC-20) and VaultManager (vault logic, accrual, and liquidations). Mint/burn privileges for GAZ are owned by the VaultManager. Vault debt is tracked in gas units; valuation uses block.basefee for safety and liquidation checks. State-changing actions (deposit & mint, repay & withdraw, liquidate) require the treasury address (feeTo) to be set; openVault() is allowed beforehand. This ensures stability-fee accounting is live from the first mint/repay.

// Highlights (pseudocode):
// 1) depositAndMint(vaultId, mintGasUnits) [payable]:
//    - accrue()
//    - collateralWei += msg.value
//    - if mintGasUnits > 0: increase debtGasUnits and mint GAZ to user
//    - require vault is safe vs. block.basefee and collateralRatio

// 2) repayAndWithdraw(vaultId, repayGasUnits, withdrawWei):
//    - accrue()
//    - transferFrom(user -> contract), burn principal, reduce debtGasUnits
//    - if in-debt: withdrawals require basefee > 0, then re-check safety
//    - send withdrawWei ETH to user (<= collateralWei)

// 3) liquidate(vaultId, repayGasUnits):
//    - accrue()
//    - require vault below liquidation ratio
//    - toRepay capped by debt and affordable collateral
//    - transferFrom(liquidator -> contract), burn toRepay
//    - collateralOut = toRepay * block.basefee * liquidationPenalty / 1e18
//    - send collateralOut ETH to liquidator
//    - partial liquidations allowed; further liquidations can continue

For a deeper read, see the full contract sources in the repository. The whitepaper text here is a high-level guide; the contracts are the source of truth.

9. Contact

For inquiries, partnerships, or responsible disclosure, please email: contact@americancrypto.net. Donations in crypto are welcome as we continue to build GAZ and adjacent DeFi tools.

10. Follow & Contribute

We welcome contributions, audits, feedback, and community support. Explore the codebase and follow updates: