Gravitational plate of three masses and a slashed discABC0Static engraved plate. Three-dimensional view is unavailable or reduced motion is requested.

← back to fieldarticle

articleJul 31, 2025

Deposit Forwarder System

Architecture for per-user deterministic deposit contracts: factory, master forwarder roles, and ETH/ERC-20 forward flows for an exchange backend.

Deposit Forwarder System

A system for managing user deposits through deterministic contract addresses.

Architecture

Three main contracts:

  1. DepositForwarder — per-user contract that receives and forwards deposits
  2. DepositForwarderFactory — creates and tracks DepositForwarder instances
  3. MasterForwarder — holds critical addresses and configuration

Role-based access control

  • SAFE wallet — controls MasterForwarder

    • Can change destination address
    • Can change deployer address
    • Can change forwarder caller address
  • Deployer — authorized to create new deposit forwarders

    • Calls createDepositForwarder on the factory
    • Address managed by MasterForwarder
  • Forwarder caller — operator wallet allowed to trigger ERC-20 transfers

    • Calls forward on deposit forwarders
    • Address managed by MasterForwarder

Contract details

DepositForwarder

  • Accepts ETH and ERC-20 tokens
  • Forwards assets to the destination address
  • Deployed at deterministic addresses
  • Protected by a reentrancy guard

MasterForwarder

  • Manages destination addresses
  • Controls deposit forwarders
  • Implements multisig security
  • Handles emergency procedures

Flows

Deposit address creation

Loading diagram…

Deposit address assignment

Loading diagram…

Processing a user's ETH or ERC-20 deposit

Loading diagram…

related

  1. Feb 2, 2023/articleUniswap V2 math and contract review
  2. Jan 25, 2023/articleEthereum P2P eclipse attacks (geth-era study notes)
  3. Jan 19, 2023/articleEVM storage layout collisions and upgradeable proxies

graphfeed