zksync_base_token_adjuster

Crates.iozksync_base_token_adjuster
lib.rszksync_base_token_adjuster
version27.0.0-non-semver-compat
sourcesrc
created_at2024-07-13 03:23:03.348067+00
updated_at2025-03-21 17:10:51.802137+00
descriptionZKsync base token adjuster
homepagehttps://zksync.io/
repositoryhttps://github.com/matter-labs/zksync-era
max_upload_size
id1302008
size27,235
(CratesMatterLabs)

documentation

README

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.
Commit count: 2268

cargo fmt