Skip to content
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

SuperchainERC20 best practices #1061

Merged
merged 10 commits into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion pages/stack/interop/assets.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Interop
title: Assets
description: Documentation covering Cross Chain Message, Explainer, Message Passing, Op Supervisor, Superchain Erc20, Superchain Weth, Supersim, Transfer Superchainerc20 in the Interop section of the OP Stack ecosystem.
lang: en-US
---
Expand All @@ -18,4 +18,6 @@ Documentation covering SuperchainERC20, Superchain WETH, Supersim, and how to tr
<Card title="How to transfer a SuperchainERC20" href="/stack/interop/assets/transfer-superchainERC20" />

<Card title="How to deploy assets using SuperchainERC20" href="/stack/interop/assets/deploy-superchain-erc20" />

<Card title="Best practices for SuperchainERC20" href="/stack/interop/assets/superchainerc20-best-practices" />
</Cards>
5 changes: 3 additions & 2 deletions pages/stack/interop/assets/_meta.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"superchain-erc20": "SuperchainERC20",
"superchain-weth": "SuperchainWETH (Interoperable ETH)",
"transfer-superchainERC20": "How to transfer a SuperchainERC20",
"deploy-superchain-erc20": "Deploy assets using SuperchainERC20"
"deploy-superchain-erc20": "Deploy assets using SuperchainERC20",
"superchainERC20-best-practices": "SuperchainERC20 best practices",
"superchain-weth": "SuperchainWETH (Interoperable ETH)"
}
31 changes: 31 additions & 0 deletions pages/stack/interop/assets/superchainerc20-best-practices.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
title: Best practices for managing SuperchainERC20 tokens
lang: en-US
description: Essential best practices for deploying and managing SuperchainERC20 assets across Superchain networks.
---

# Best practices for managing SuperchainERC20 tokens

The following best practices are essential for deploying and managing `SuperchainERC20` assets across the Superchain. These guidelines help ensure optimal cross-chain functionality.

Note that the total supply of your tokens never fluctuates across the Superchain. Cross-chain burning and minting only affects the location of a token across the Superchain.

## Consistent addresses across chains

Use predefined addresses: Assign and verify the same address for each `SuperchainERC20` instance on every chain. Predefined addresses reduce deployment conflicts and ensure tokens are accurately recognized across chains. Otherwise, the SuperchainERC20Bridge would need a way to verify if the tokens they mint on destination correspond to the tokens that were burned on source.

Consider using `Create2Deployer` or one of our [predeploys](https://specs.optimism.io/interop/predeploys.html) to ensure this.

## Testing before mainnet deployment

Test with production-like conditions: Deploy to staging environments that simulate mainnet conditions, especially for functions like `crosschainBurn` and `crosschainMint`. Test under realistic transaction loads to validate performance.

We recommend using [Supersim](https://supersim.pages.dev/introduction) as an easy way to simulate the Superchain and test your SuperchainERC20 deployment.

Test edge cases such as maximum balance transfers and interchain latency to ensure asset reliability across different scenarios.

## Next steps

* Explore the [SuperchainERC20 specifications](https://specs.optimism.io/interop/token-bridging.html) for in-depth implementation details.
* Watch the [Superchain interop design video walkthrough](https://www.youtube.com/watch?v=FKc5RgjtGes) for a visual explanation of the concepts.
* Review the [Superchain Interop Explainer](explainer) for answers to common questions about interoperability.
2 changes: 2 additions & 0 deletions words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,7 @@ VMDEBUG
vmdebug
VMODULE
vmodule
wagmi
Warpcast
xlarge
XORI
Expand All @@ -408,3 +409,4 @@ ZKPs
ZKVM
Zora
zora
interchain
Loading