-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(refactor): Filter out destination chain bridgeable tokens that are n…
…ot configured on pricegetter (#686) ## Motivation Self service token pools will enable many new TransferTokens to be used across CCIP, most of which may not have a readily available price. ## Context The current procedure (as of [batched price updates](#623)) is for a single lane to be designated as the "leader lane". It reports all prices that other lanes use. Other lanes have their price reporting disabled. To enable this, the leader lane has all supported tokens configured in the CommitJobSpec. The source of truth for which tokens are supported comes from on-chain: queried from the leader lane's destination price registry (FeeTokens) and from each OffRamp's `supportedTokens`. The combined set is given to the `price getter`, and if the number of resulting prices is different from the CommitJobSpec's tokens then the observation is thrown out. ## Solution ### _For v1.4 (current) contracts:_ Use the `CommitJobSpec`'s configured tokens as the source of truth for which TransferTokens need a price update. Filter out TransferTokens that are not configured on the `pricegetter` before they reach `pricegetter.TokenPricesUSD()`. Risks: - Compatability with [shared job specs](#683) ### _For v1.5 (next) contracts:_ Return to on-chain being the source of truth for which tokens need a price update. The list of TransferTokens that need pricing will be created from querying the OnRamps for tokens that have either BPS set and/or Aggregate Rate Limits. FeeTokens will still be taken from the destination Price Registry.
- Loading branch information
Showing
9 changed files
with
261 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.