#zk-sync #blockchain

zksync_base_token_adjuster

ZKsync base token adjuster

18 releases (1 unstable)

29.5.0-non-semver-compat Oct 16, 2025
29.1.2-non-semver-compat Aug 26, 2025
29.0.0-non-semver-compat Jul 29, 2025
28.10.0-non-semver-compat Jul 25, 2025
0.1.0 Jul 13, 2024

#67 in #zk-sync

Download history 21/week @ 2025-07-11 2/week @ 2025-07-18 215/week @ 2025-07-25 22/week @ 2025-08-01 5/week @ 2025-08-08 1/week @ 2025-08-15 76/week @ 2025-08-22 147/week @ 2025-08-29 43/week @ 2025-09-05 60/week @ 2025-09-12 183/week @ 2025-09-19 167/week @ 2025-09-26 48/week @ 2025-10-03 74/week @ 2025-10-10 92/week @ 2025-10-17 14/week @ 2025-10-24

247 downloads per month
Used in 11 crates (3 directly)

MIT/Apache

2.5MB
54K SLoC

Base Token Adjuster

This crate contains all the logic to handle ZK Chain with custom base tokens.

Overview

The Base Token Ratio Persister

Contains the building blockss for the BaseTokenRatioPersisterLayer.

  • Connects with external APIs to get the current price of the base token and of ETH.
  • Persists the ETH<->BaseToken ratio in the database.
  • Upon certain configured threshold, update the L1 ETH<->BaseToken conversion ratio.

The Base Token Ratio Provider

Contains the building blocks for the BaseTokenRatioProviderLayer.

  • Periodically fetches from the DB and caches the latest ETH<->BaseToken conversion ratio.
  • Exposes this ratio upon request.

Dependencies

~142MB
~2.5M SLoC