Skip to content

Bridged USDC Standard for the OP Stack #836

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 27 commits into from
Aug 21, 2024
Merged

Conversation

krofax
Copy link
Collaborator

@krofax krofax commented Aug 19, 2024

Description

This PR provides a high-level overview of USDC implementations on OP Chains, including the types of USDC representations, deployment options, and considerations for chain operators.

Tests

Please describe any tests you've added. If you've added no tests, or left important behavior untested, please explain why not.

Additional context

Add any other context about the problem you're solving.

Metadata

  • Fixes #[Link to Issue]

@krofax krofax requested a review from a team as a code owner August 19, 2024 16:14
@krofax krofax requested a review from a team August 19, 2024 16:14
Copy link
Contributor

coderabbitai bot commented Aug 19, 2024

Walkthrough

The introduction of bridge-usdc.mdx and bridged-usdc-standard.mdx equips OP Chain operators with essential resources for effectively implementing USDC. These documents explain the distinctions between Bridged USDC and Native USDC, detail deployment strategies, and outline the bridging process from Layer 1 (L1) to Layer 2 (L2). They also address migration strategies, security considerations, and the operational framework of the Bridged USDC Standard, enabling operators to manage USDC effectively while mitigating potential risks.

Changes

Files Change Summary
.../features/bridge-usdc.mdx, .../features/bridged-usdc-standard.mdx Introduced comprehensive guides on USDC implementation, detailing Bridged and Native USDC, deployment strategies, bridging mechanics, migration processes, and security considerations.
.../features/_meta.json Added key-value pair for "bridged-usdc-standard" to enhance configuration options.
words.txt Added entries "marketshare" and "Spearbit" to the vocabulary list.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant L1
    participant L2
    participant Bridge

    User->>L1: Initiates USDC Transfer
    L1->>Bridge: Request bridge from L1 to L2
    Bridge->>L1: Lock USDC Tokens
    L1->>Bridge: Confirm tokens locked
    Bridge->>L2: Mint USDC Tokens
    L2->>User: USDC Tokens Available on L2
Loading

Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between ba67787 and 83171fe.

Files selected for processing (1)
  • words.txt (2 hunks)
Additional context used
LanguageTool
words.txt

[duplication] ~164-~164: Möglicher Tippfehler: ein Wort wird wiederholt
Context: ...ldb lightkdf logfile logfmt marketshare MAXAGE maxage MAXBACKUPS maxbackups MAXPEERS maxpeers...

(GERMAN_WORD_REPEAT_RULE)

Additional comments not posted (1)
words.txt (1)

321-321: LGTM: Addition of "Spearbit".

The addition of the word "Spearbit" is consistent with the file's purpose and structure.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

netlify bot commented Aug 19, 2024

Deploy Preview for docs-optimism ready!

Name Link
🔨 Latest commit 83171fe
🔍 Latest deploy log https://app.netlify.com/sites/docs-optimism/deploys/66c6302868dab400083ee0e6
😎 Deploy Preview https://deploy-preview-836--docs-optimism.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

Outside diff range, codebase verification and nitpick comments (2)
pages/builders/chain-operators/features/bridge-usdc.mdx (2)

10-18: Ensure Consistent Use of Proper Nouns

The introduction and Bridged USDC Standard sections are clear and informative. Ensure that all proper nouns, such as "Circle" and "OP Stack," are consistently capitalized.


83-163: Clarify Descriptions and Ensure Consistent Formatting

Ensure that all steps are clearly described and consistently formatted. Verify that all diagrams are correctly referenced in the text.

Tools
LanguageTool

[uncategorized] ~137-~137: Possible missing preposition found.
Context: ...nsferring USDC tokens from Layer 1 (L1) Ethereum to Layer 2 (L2) through a bridging syst...

(AI_HYDRA_LEO_MISSING_IN)


[uncategorized] ~161-~161: It seems likely that a singular genitive (’s) apostrophe is missing.
Context: ... * The USDC amount is minted to the users address, completing the cross-chain tra...

(AI_HYDRA_LEO_APOSTROPHE_S_XS)

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

Outside diff range, codebase verification and nitpick comments (5)
pages/builders/chain-operators/features/bridge-usdc.mdx (5)

2-2: Use Proper Title Case in Title

The title should be in proper title case for consistency.

-title: USDC on OP Chains Explainer
+title: USDC on OP Chains: Explainer

33-34: Avoid Gender-Specific Language

The use of "he" should be avoided to maintain gender neutrality.

-  *   he **User** initiates the deployment by interacting with the `L1OpUSDCFactory` contract.
+  *   The **User** initiates the deployment by interacting with the `L1OpUSDCFactory` contract.

80-80: Vary Sentence Structure

The phrase "if the chain operator wants to migrate to native USDC" is repeated. Consider rephrasing to add variety.

- *   Potential fragmentation with having two types of USDC representations on your OP Chain if the chain operator wants to migrate to native USDC
+ *   Potential fragmentation from having two types of USDC representations on your OP Chain if migrating to native USDC is desired
Tools
LanguageTool

[style] ~80-~80: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ... on your OP Chain if the chain operator wants to migrate to native USDC #### Implementa...

(REP_WANT_TO_VB)


217-217: Vary Sentence Starters

Three successive sentences begin with "It". Consider rephrasing for variety.

- *   It locks USDC on Ethereum Mainnet and sends a message to the other chain to mint the equivalent amount of USDC.
- *   It also receives messages from the other chain and unlocks USDC on Ethereum Mainnet.
- *   It controls the message flow between layers and supports the requirements for migrating Bridged USDC to Native USDC if the chain operator and Circle desire.
+ *   Locks USDC on Ethereum Mainnet and sends a message to the other chain to mint the equivalent amount of USDC.
+ *   Also receives messages from the other chain and unlocks USDC on Ethereum Mainnet.
+ *   Controls the message flow between layers and supports the requirements for migrating Bridged USDC to Native USDC if the chain operator and Circle desire.
Tools
LanguageTool

[style] ~217-~217: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...d unlocks USDC on Ethereum Mainnet. * It controls the message flow between layer...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


224-224: Reduce Wordiness

The phrase "as if they were the owner of the contract" can be shortened for clarity.

- *   This contract allows the chain operator to execute arbitrary functions on the Bridged USDC contract as if they were the owner of the contract.
+ *   This contract allows the chain operator to execute arbitrary functions on the Bridged USDC contract as the owner.
Tools
LanguageTool

[style] ~224-~224: You can shorten this phrase to avoid wordiness.
Context: ...on the Bridged USDC contract as if they were the owner of the contract. Contract that allows for...

(BE_THE_MAKER_OF_WORDINESS)

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

Outside diff range, codebase verification and nitpick comments (1)
pages/builders/chain-operators/features/bridge-usdc.mdx (1)

202-207: Clarify Contract Information

Ensure clarity and consistency in describing contract details.

- The factory that chain operators should use on L1 is at `0x7dB8637A5fd20BbDab1176BdF49C943A96F2E9c6`.
+ Chain operators should use the factory at `0x7dB8637A5fd20BbDab1176BdF49C943A96F2E9c6` on L1.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Outside diff range, codebase verification and nitpick comments (8)
pages/builders/chain-operators/features/bridged-usdc-standard.mdx (8)

10-14: Use Proper Nouns Consistently.

In communal documentation, replace personal pronouns with proper nouns for clarity and consistency.

- It aims to help OP Chain operators understand and implement the most suitable USDC strategy for their needs, with a focus on the Bridged USDC Standard by Circle.
+ This guide aims to help OP Chain operators understand and implement the most suitable USDC strategy, with a focus on the Bridged USDC Standard by Circle.

20-30: Improve Consistency and Clarity in Callout.

Ensure consistent use of terms and improve clarity in the callout section.

- OP chain operators can use Bridged USDC at launch, so they can have it available for their users.
+ OP Chain operators can use Bridged USDC at launch, ensuring its availability for their users.

49-51: Apply the Oxford Comma.

Ensure the use of the Oxford comma for clarity in lists.

- *   Enables "in-place" upgrade to Native USDC, preserving contract address, user balances, and DeFi integrations.
+ *   Enables "in-place" upgrade to Native USDC, preserving contract address, user balances, and DeFi integrations.

59-61: Clarify Security Implications.

Clarify the security implications mentioned in the limitations section.

- *   Requires deploying an upgradeable custom bridge that the OP Chain operator custodies (be aware of the security implications)
+ *   Requires deploying an upgradeable custom bridge that the OP Chain operator manages, with significant security implications.

135-135: Add Missing Preposition.

Add the missing preposition for clarity.

- This diagram outlines the flow of transferring USDC tokens from Layer 1 (L1) Ethereum to Layer 2 (L2) through a bridging system.
+ This diagram outlines the flow of transferring USDC tokens from Layer 1 (L1) to Layer 2 (L2) through a bridging system.
Tools
LanguageTool

[uncategorized] ~135-~135: Possible missing preposition found.
Context: ...nsferring USDC tokens from Layer 1 (L1) Ethereum to Layer 2 (L2) through a bridging syst...

(AI_HYDRA_LEO_MISSING_IN)


161-161: Add Apostrophe for Possessive.

Add the apostrophe to indicate possession.

- *   The `USDC amount` is minted to the users address, completing the cross-chain transfer.
+ *   The `USDC amount` is minted to the user's address, completing the cross-chain transfer.
Tools
LanguageTool

[uncategorized] ~161-~161: It seems likely that a singular genitive (’s) apostrophe is missing.
Context: ... * The USDC amount is minted to the users address, completing the cross-chain tra...

(AI_HYDRA_LEO_APOSTROPHE_S_XS)


217-217: Vary Sentence Beginnings for Style.

Reword sentences to avoid repetitive beginnings and improve readability.

- *   It locks USDC on Ethereum Mainnet and sends a message to the other chain to mint the equivalent amount of USDC.
- *   It also receives messages from the other chain and unlocks USDC on Ethereum Mainnet.
- *   It controls the message flow between layers and supports the requirements for migrating Bridged USDC to Native USDC if the chain operator and Circle desire.
+ *   USDC is locked on Ethereum Mainnet, and a message is sent to the other chain to mint the equivalent amount.
+ *   Messages from the other chain are also received to unlock USDC on Ethereum Mainnet.
+ *   Message flow between layers is controlled, supporting migration requirements for Bridged USDC to Native USDC if desired by the chain operator and Circle.
Tools
LanguageTool

[style] ~217-~217: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...d unlocks USDC on Ethereum Mainnet. * It controls the message flow between layer...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


224-224: Avoid Wordiness.

Shorten phrases to enhance clarity and conciseness.

- *   This contract allows the chain operator to execute arbitrary functions on the Bridged USDC contract as if they were the owner of the contract.
+ *   This contract allows the chain operator to execute arbitrary functions on the Bridged USDC contract as its owner.
Tools
LanguageTool

[style] ~224-~224: You can shorten this phrase to avoid wordiness.
Context: ...on the Bridged USDC contract as if they were the owner of the contract. Contract that allows for...

(BE_THE_MAKER_OF_WORDINESS)

@cpengilly cpengilly added the documentation Improvements or additions to documentation label Aug 20, 2024
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Outside diff range, codebase verification and nitpick comments (5)
pages/builders/chain-operators/features/bridged-usdc-standard.mdx (5)

2-4: Ensure Proper Noun Capitalization and Clarity.

The title and description should maintain consistency in capitalization and clarity. Consider using "OP Stack Chain" instead of "OP Stack chain" for consistency.

 title: Bridged USDC Standard on OP Stack
 lang: en-US
-description: This guide explains how chain operators can deploy USDC on their OP Stack chain.
+description: This guide explains how chain operators can deploy USDC on their OP Stack Chain.

13-16: Clarify and Ensure Consistency in Terminology.

Ensure consistent use of terms like "Superchain ecosystem" and "OP Stack bridge." Clarify the sentence for better readability.

 Circle introduced the [Bridged USDC Standard](https://www.circle.com/blog/bridged-usdc-standard) to ensure that chain operators can easily deploy a form of USDC that is capable of being upgraded in-place by Circle to Native USDC, if and when appropriate, and prevent the fragmentation problem.

-Bridged USDC Standard for the OP Stack allows for an efficient and modular solution for expanding the Bridged USDC Standard across the Superchain ecosystem. Utilizing the cross chain messaging of the canonical OP Stack bridge the adapter allows for easy access to Bridged USDC liquidity across OP Stack chains.
+The Bridged USDC Standard for the OP Stack provides an efficient and modular solution for expanding the Bridged USDC Standard across the Superchain ecosystem. By utilizing the cross-chain messaging of the canonical OP Stack Bridge, the adapter allows for easy access to Bridged USDC liquidity across OP Stack Chains.

19-22: Clarify Callout Content for Better Readability.

Ensure the content is clear and concise. Consider rephrasing for better readability.

<Callout type="info">
-    OP stack chain operators can deploy Bridged USDC Standard at launch, providing immediate USDC availability for their users. 
-    Importantly, the Bridged USDC Standard allows for a seamless, in-place upgrade to Native USDC if an agreement is later reached between the chain operator and Circle.
+    OP Stack Chain operators can deploy the Bridged USDC Standard at launch, providing immediate USDC availability for their users. 
+    Importantly, the Bridged USDC Standard allows for a seamless, in-place upgrade to Native USDC if an agreement is later reached between the Chain Operator and Circle.
</Callout>

24-27: Clarify and Ensure Consistency in Security Considerations.

Ensure consistent terminology and clarify governance details.

*   The Bridged USDC Standard for the OP Stack has undergone [audits](https://github.com/defi-wonderland/opUSDC/blob/main/audits/spearbit.pdf) and is recommended for production use.
*   While the Bridged USDC Standard for the OP Stack utilizes the cross domain messenger, governance over the upgradable contract would be managed by the chain operator.
+*   While the Bridged USDC Standard for the OP Stack utilizes the Cross-Domain Messenger, governance over the upgradable contract is managed by the Chain Operator.

29-31: Ensure Clarity in Next Steps.

Ensure the content is clear and concise. Consider rephrasing for better readability.

*   Ready to get started? Read our setup guide on the [Bridged USDC Standard for the OP Stack](https://github.com/defi-wonderland/opUSDC#setup).
*   If you experience any problems, please reach out to [developer support](https://github.com/ethereum-optimism/developers/discussions).
+*   Ready to get started? Read the setup guide on the [Bridged USDC Standard for the OP Stack](https://github.com/defi-wonderland/opUSDC#setup).
+*   If you experience any problems, reach out to [Developer Support](https://github.com/ethereum-optimism/developers/discussions).

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Outside diff range, codebase verification and nitpick comments (2)
pages/builders/chain-operators/features/bridged-usdc-standard.mdx (2)

9-17: Add Missing Comma for Clarity.

A comma is needed after "OP Stack bridge" to improve readability.

 Utilizing the cross chain messaging of the canonical OP Stack bridge the adapter allows for easy access to Bridged USDC liquidity across OP Stack chains.
+Utilizing the cross chain messaging of the canonical OP Stack bridge, the adapter allows for easy access to Bridged USDC liquidity across OP Stack chains.
Tools
LanguageTool

[uncategorized] ~17-~17: A comma might be missing here.
Context: ...ain messaging of the canonical OP Stack bridge the adapter allows for easy access to B...

(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)


19-22: Clarify Upgrade Process for Consistency.

Consider rephrasing to emphasize the seamless upgrade process to Native USDC.

 Importantly, the Bridged USDC Standard allows for a seamless, in-place upgrade to Native USDC if an agreement is later reached between the chain operator and Circle.
+This guide explains the different types of USDC representations and how to get the Bridged USDC Standard on your OP Stack chain.

Copy link
Contributor

@zainbacchus zainbacchus left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Outside diff range, codebase verification and nitpick comments (1)
pages/builders/chain-operators/features/bridged-usdc-standard.mdx (1)

15-15: Simplify Wordy Phrase.

Consider replacing "prior to" with "before" for conciseness.

Use this diff to simplify the sentence:

- and USDC is often bridged to new chains prior to any action from Circle.
+ and USDC is often bridged to new chains before any action from Circle.
Tools
LanguageTool

[style] ~15-~15: ‘prior to’ might be wordy. Consider a shorter alternative.
Context: ...and USDC is often bridged to new chains prior to any action from Circle. This can create...

(EN_WORDINESS_PREMIUM_PRIOR_TO)

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

@krofax krofax merged commit d3a2c31 into main Aug 21, 2024
7 of 8 checks passed
@krofax krofax deleted the feat-bridge-usdc-opstack branch August 21, 2024 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants