Skip to content

Conversation

pxrl
Copy link
Collaborator

@pxrl pxrl commented Apr 30, 2024

This update to the InventoryClient permits multiple tokens to map to a single HubPool token. This will be used with USDC/CCTP, where the existing USDC deployment will map to both native USDC and bridged USDC on the various non-mainnet chains supported by Across. See below for an example of how this is configured. Note that the symbol _USDC is the temporary label for native USDC.

  "USDC": {
    "USDC.e": {
      "10": { "targetPct": 8, "thresholdPct": 4 },
      "137": { "targetPct": 4, "thresholdPct": 2 },
      "324": { "targetPct": 8, "thresholdPct": 4 },
      "42161": { "targetPct": 8, "thresholdPct": 4 },
      "59144": { "targetPct": 5, "thresholdPct": 2 }
    },
    "USDbC": {
      "8453": { "targetPct": 5, "thresholdPct": 2 }
    },
    "_USDC": {
      "137": { "targetPct": 4, "thresholdPct": 2 }
    }
  },

pxrl added 7 commits April 30, 2024 09:43
- Only append unwrapWethThreshold for WETH.
- Dereference the l1Token/chainId pair for less repetition.
This change permits the InventoryConfig to be specified in either
HubPool token address or token symbol. Token symbol is preferred because
it's simpler to configure and reduces the chance of mistakes.

During config, any symbols are resolved to their underlying token
addresses on the HubPool chain, so no subsequent changes are required
for any accesses into the post-processed inventory config.
This update to the InventoryClient permits multiple tokens to map to a
single HubPool token. This will be used with USDC/CCTP, where the
existing USDC deployment will map to both native USDC and bridged USDC
on the various non-mainnet chains supported by Across. See below for an
example of how this is configured. Note that the symbol _USDC is the
temporary label for native USDC.

  "USDC": {
    "USDC.e": {
      "10": { "targetPct": 8, "thresholdPct": 4 },
      "137": { "targetPct": 4, "thresholdPct": 1 },
      "324": { "targetPct": 8, "thresholdPct": 4 },
      "42161": { "targetPct": 8, "thresholdPct": 4 },
      "59144": { "targetPct": 5, "thresholdPct": 2 }
    },
    "USDbC": {
      "8453": { "targetPct": 5, "thresholdPct": 2 }
    },
    "_USDC": {
      "137": { "targetPct": 1, "thresholdPct": 1 }
    }
  },
Base automatically changed from pxrl/inventoryConfigSymbols to master May 1, 2024 09:14
@pxrl pxrl changed the base branch from master to pxrl/crossChainTransfer May 9, 2024 12:08
Base automatically changed from pxrl/crossChainTransfer to master May 9, 2024 19:41
Copy link
Contributor

@mrice32 mrice32 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pxrl pxrl merged commit 8c179a7 into master May 10, 2024
@pxrl pxrl deleted the pxrl/usdcInventory branch May 10, 2024 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants