Skip to content

Commit 3e8f532

Browse files
Jarrod Wattsjarrodwatts
authored andcommitted
Update bridging and gas fees docs
1 parent b2023a9 commit 3e8f532

File tree

4 files changed

+53
-0
lines changed

4 files changed

+53
-0
lines changed

docs/cdk/concepts/bridging.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Bridging
2+
3+
[Bridges](https://ethereum.org/en/developers/docs/bridges/) are a fundamental component of L2s that allow users to deposit and withdraw assets to and from your chain.
4+
5+
CDK-built chains come with a built-in bridge service and customizable UI out of the box, with the option to have a standalone [LxLy bridge](#lxly-bridge) or alternatively opt-in to the AggLayer and use the [Unified Bridge](#unified-bridge) to enable cross-chain L2-to-L2 interoperability.
6+
7+
## LxLy Bridge
8+
9+
The LxLy bridge contracts carry out deposit and withdrawal of assets between L2 and L1.
10+
11+
Chains looking to run their own bridge infrastructure can choose to deploy a new instance of the [LxLy bridge](https://docs.polygon.technology/zkEVM/architecture/protocol/unified-LxLy/lxly-bridge/) that allows users to move assets (both native and [ERC20](https://ethereum.org/en/developers/docs/standards/tokens/erc-20/) tokens) from L1 to the L2 and vice versa.
12+
13+
Deploying an individual instance of the LxLy means interoperability with other L2 chains via the [AggLayer](https://polygon.technology/blog/aggregated-blockchains-a-new-thesis) is not possible. To enable cross-chain interoperability (i.e. L2-to-L2 cross-chain transactions), chains can opt-in to the AggLayer and use the [Unified Bridge](#unified-bridge).
14+
15+
This option is suited to chains that may want to customize how the bridge is managed and operated, or maintain control of the bridge’s funds; as the [upgradeability](./admin-upgradeability.md) of the bridge contracts are managed by the chain operator.
16+
17+
![LxLy Bridge](../../img/cdk/lxly.png)
18+
19+
## Unified Bridge
20+
21+
A single, shared instance of the LxLy bridge, called the [unified bridge](https://docs.polygon.technology/cdk/architecture/staking-the-bridge/) is available to use for all CDK chains that opt-in to the AggLayer.
22+
23+
It is a shared smart contract deployed on Ethereum, responsible for enabling interoperability between chains in the form of cross-chain transactions and L2-to-L2 transfers.
24+
25+
Chains that integrate with the Unified Bridge can benefit from the network effect of the AggLayer, as their chain can therefore access the users and liquidity of other chains that are also part of the AggLayer.
26+
27+
This option is suited to chains that want a standard bridging experience and do not require customization of the bridge’s operation. The shared bridge is also not directly managed by the chain operator, instead, it shares the governance outlined in the [admin upgradeability](./admin-upgradeability.md) section.
28+
29+
![Unified Bridge](../../img/cdk/unified-bridge.png)
30+
31+
## Further Reading
32+
33+
- [Aggregated Blockchains: A New Thesis](https://polygon.technology/blog/aggregated-blockchains-a-new-thesis)
34+
- [Unified Bridge Overview](https://docs.polygon.technology/zkEVM/architecture/protocol/unified-LxLy/lxly-bridge/)

docs/cdk/concepts/gas-fees.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Gas Fees
2+
3+
CDK-built chains have full control over how gas fees are set for users.
4+
5+
By default, gas fees on the L2 are paid in ETH and are determined by a combination of several factors, including the current gas price on Ethereum, the complexity of the submitted transaction, and the current demand on the L2 network itself.
6+
7+
However, developers can use any [ERC-20 token](https://ethereum.org/en/developers/docs/standards/tokens/erc-20/) deployed on the L1 as their native gas token (see the [custom native gas token for a Polygon CDK chain tutorial](https://polygon.technology/blog/tutorial-launch-a-custom-native-gas-token-for-a-polygon-cdk-chain)).
8+
Gas fees can also be omitted entirely, allowing users to interact with the chain without needing to pay gas fees for transactions and have the fees covered by the chain operator.
9+
10+
When building your chain, common options for gas fee configuration include:
11+
- Using ETH as the native gas token for easy onboarding from L1.
12+
- Using an existing ERC-20 token as the native gas token.
13+
- Sponsoring gas fees for all transactions.
14+
15+
For more complex use cases, the CDK is also compatible with several [account abstraction providers](https://ecosystem.polygon.technology/spn/explore/?search=&competency=Wallet&chain=CDK) to provide more flexibility for users in regards to wallet support and gas fee payment.
16+
17+
## Further Reading
18+
19+
- [zkEVM gas fees documentation](https://docs.polygon.technology/zkEVM/architecture/effective-gas/)

docs/img/cdk/lxly.png

71.9 KB
Loading

docs/img/cdk/unified-bridge.png

121 KB
Loading

0 commit comments

Comments
 (0)