zksync_base_token_adjuster

Crates.iozksync_base_token_adjuster
lib.rszksync_base_token_adjuster
version
sourcesrc
created_at2024-07-13 03:23:03.348067
updated_at2024-07-13 03:23:03.348067
descriptionZKsync base token adjuster
homepagehttps://zksync.io/
repositoryhttps://github.com/matter-labs/zksync-era
max_upload_size
id1302008
size0
crates-io (github:matter-labs:crates-io)

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: 1500

cargo fmt