Skip to content

Conversation

@pxrl
Copy link
Contributor

@pxrl pxrl commented Mar 27, 2025

Lens uses Circle's Bridged (upgradable) USDC standard and requires a custom bridge for it. On mainnet, the chain adapter contract needs a modified workflow to make deposits. On the L2 it's as simple as depositing via a different contract address, albeit with the same contract interface as the standard ERC20 bridge.

As part of this change, both ends are updated for eventual CCTP compatibility. This introduces some configuration nuance to the constructor arguments of both contracts:

  • usdcAddress = 0x0 => USDC tokens are routed via the standard ERC20 bridge (current required for zkSync USDC.e).
  • usdcAddress != 0x0 AND cctpTokenMessenger != 0x0 => USDC tokens are routed via Circle's CCTP bridges.
  • usdcAddress != 0x0 AND zkUSDCBridge != 0x0 => USDC tokens are routed via the custom bridge for Circle Bridged (upgradable) USDC.

A simple check on the various constructor arguments imposed during deployment, but it's highly recommended to manually verify the configurations post-deployment.

Implementation according to the Matter Labs guidance at https://github.com/matter-labs/usdc-bridge

This is immediately for Lens but is generalised to apply to any zkSync-stack deployment.

@pxrl pxrl marked this pull request as ready for review March 27, 2025 15:26
Copy link
Member

@nicholaspai nicholaspai left a comment

Choose a reason for hiding this comment

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

One Q

@pxrl pxrl changed the title feat: Support Lens Circle bridged USDC in SpokePool feat: Support Circle bridged USDC in zkSync SpokePool Mar 27, 2025
pxrl and others added 7 commits March 27, 2025 17:16
* improve: support upgradeable USDC in zkstack adapters

Signed-off-by: bennett <bennett@umaproject.org>

* update deploy scripts

Signed-off-by: bennett <bennett@umaproject.org>

* conform to CCTPAdapterInterface

Signed-off-by: bennett <bennett@umaproject.org>

---------

Signed-off-by: bennett <bennett@umaproject.org>
nicholaspai
nicholaspai previously approved these changes Apr 2, 2025
nicholaspai and others added 2 commits April 2, 2025 17:49
mrice32
mrice32 previously approved these changes Apr 2, 2025
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.

LGTM!

@nicholaspai nicholaspai changed the base branch from master to march-evm-audit-universal-adapter April 3, 2025 15:46
Copy link
Contributor Author

@pxrl pxrl left a comment

Choose a reason for hiding this comment

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

I can't approve because I authored the PR, but this LGTM.

@nicholaspai nicholaspai changed the base branch from march-evm-audit-universal-adapter to audit-zkstack-usdc April 8, 2025 15:54
@nicholaspai nicholaspai merged commit 77761d7 into audit-zkstack-usdc Apr 8, 2025
9 checks passed
@nicholaspai nicholaspai deleted the pxrl/lensUSDC branch April 8, 2025 16:31
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.

5 participants