Post
Share your knowledge.
Does calling withdraw on MaticWETH trigger automatic steps?
I'm trying to understand the process within the Polygon network for transferring MaticWETH tokens back to the Ethereum network. When I call the withdraw function on a token like MaticWETH, it seems to trigger a Transfer event to the zero address. Does this event automatically initiate the first few steps required to bridge the token back to Ethereum, simply because the token is already mapped?
- MATIC
Answers
2The emission of the Transfer
event to the zero address acts as a trigger for the bridging process. It uses the existing mapping of the token to streamline certain steps, such as verification and initiation of the unlock process on Ethereum. This integrated mechanism ensures that the validator nodes have enough information from the Transfer event to carry out the bridging without needing additional data. In short, just the Transfer event emission is generally enough for the validator nodes to process all necessary functions needed for the bridging, eliminating the need for separate events carrying extensive data as the docs have suggested.
When you call the withdraw
function, the process indeed begins with the token on the Polygon side getting transferred. This step involves burning the token on the Polygon network, which is necessary for bridging the asset back to Ethereum. The transfer to the zero address signifies burning the token, which then allows the bridge to unlock and transfer the same amount of tokens to the user address on the Ethereum side.
Do you know the answer?
Please log in and share it.
Polygon is a decentralised Ethereum scaling platform that enables developers to build scalable user-friendly dApps with low transaction fees without ever sacrificing on security.