LogoLogo
  • INTRODUCTION
  • LEARN
    • Espresso in the Modular Stack
    • The Espresso Network
      • System Overview
      • Properties of HotShot
        • EspressoDA
          • How It Works
      • Interfaces
        • Espresso ↔ Rollup
        • Espresso ↔ L1
        • Rollup ↔ L1
      • Internal Functionality
        • Espresso Node
        • Light Client Contract
        • Fee Token Contract
        • Stake Table
          • How the Stake Table Contract Works
        • Smart Contract Upgradeability
    • Rollup Stacks
      • Integrating a ZK Rollup
        • ZK Rollup Architecture
        • Using Espresso
        • Summary of Changes
      • Integrating an Optimistic Rollup
        • Optimistic Rollup Architecture
        • Using Espresso
        • Summary of Changes
  • Guides
    • Using the Espresso Network
      • Integrating Arbitrum Orbit Chain
        • Quickstart with Arbitrum Nitro Rollups
        • Reading Confirmations from the Espresso Network
        • Arbitrum Nitro Integration Overview
          • Using TEE with Nitro
          • Arbitrum Nitro Trust & Liveness Dependencies
        • Migrating Arbitrum Orbit Chains to Espresso
          • Arbitrum Testnet
            • Nitro Testnet
            • Local Deployment (`docker compose`)
      • Using the Espresso Network as a Cartesi application
    • Running an Espresso Node
    • Running a Builder
    • Bridging with the Espresso Network
  • API Reference
    • Espresso API
      • Status API
      • Catchup API
      • Availability API
      • Node API
      • State API
      • Events API
      • Submit API
      • Earlier Versions
        • v0
          • Status API
          • Catchup API
          • Availability API
          • Node API
          • State API
          • Events API
          • Submit API
    • Builder API
  • Releases
    • Mainnet 1
      • Running a Mainnet 1 Node
      • Contracts
      • Rollup Migration Guide
    • Mainnet 0
      • Running a Mainnet 0 Node
      • Contracts
    • Testnets
      • Decaf Testnet Release
        • Running a Node
        • Contracts
      • Cappuccino Testnet Release
        • Running a Node
        • Deploying a Rollup on Cappuccino
        • Benchmarks
      • Gibraltar Testnet Release
        • Interacting with Gibraltar
        • Arbitrum Nitro integration
        • Deploying a Rollup on Gibraltar
      • Cortado Testnet Release
        • Interacting with Cortado
        • OP Stack Integration
          • Optimism Leader Election RFP
      • Doppio Testnet Release
        • Interacting with Doppio
        • Polygon zkEVM Stack Integration
        • Minimal Rollup Example
        • Benchmarks
      • Americano Testnet Release
  • Appendix
    • Interacting with L1
      • Trustless Sync
      • Fork Recovery
      • Bridging
    • Glossary of Key Terms
Powered by GitBook
On this page
  • Public Write Methods
  • deposit
  • Fee Token Contract UML
  • Fee Token Contract Dependency Graph
  1. LEARN
  2. The Espresso Network
  3. Internal Functionality

Fee Token Contract

PreviousLight Client ContractNextStake Table

Last updated 5 months ago

The source code for the fee token contract can be found on .

The fee token contract enables builders to deposit ETH which allows them to pay for a data processing fee associated with HotShot. While the fee token contract facilitates deposits, HotShot itself manages and tracks the working balance of builder deposits. Initially, the fee token contract only supports deposits. Withdrawals are planned to be enabled in a future release.

function deposit(address user) public payable {
    //...
}

The contract defines a minimum and maximum amount for deposits to avoid errors and prevent the fee table from being filled with dust.

uint256 public immutable MAX_DEPOSIT_AMOUNT = 1 ether;
uint256 public immutable MIN_DEPOSIT_AMOUNT = 0.001 ether;

In the Mainnet 0 release, withdrawals are not enabled and thus the MAX_DEPOSIT_AMOUNT aims to minimize how much ETH is locked by a builder.

Public Write Methods

deposit

Allows anyone to deposit an ETH balance for any user

the deposit amount is less than a specified threshold to prevent accidental errors

function deposit(address user) public payable;

Fee Token Contract UML

Fee Token Contract Dependency Graph

GitHub