Why a Polygon bridge event names a contract
A StateSynced receiver is the Polygon contract that should handle a cross-chain message, typically ChildChainManager, rather than the wallet meant to receive the tokens. Those roles use separate address fields: the beneficiary is encoded inside the deposit payload. This applies to standard Polygon bridge deposits, not every event named StateSynced.
The event receiver identifies the message handler
The Ethereum transaction target and the StateSynced receiver answer different questions. The transaction target tells you which Ethereum contract was called; for a standard deposit, that is generally RootChainManager. The receiver tells you which Polygon contract is addressed to process the resulting message.
RootChainManager sends that message through StateSender to ChildChainManager. In the RootChainManager contract implementation, the deposit path encodes the user, the Ethereum token address (rootToken), and depositData, then calls syncState with childChainManagerAddress as the receiver. The StateSynced receiver therefore points to the message handler, not directly to the token beneficiary.
That separation is part of what Polygon bridge does after deposit: a standard Ethereum deposit becomes a message for Polygon’s deposit processor, which then handles the token credit. Seeing ChildChainManager in the event is consistent with this route, but that address alone does not tell you which wallet the deposit payload names.
The payload identifies the beneficiary
For a standard deposit, the beneficiary is the user address encoded inside the message. The ChildChainManager contract implementation documents the deposit data as user, rootToken, and depositData; its onStateReceive function decodes the message type and data, then sends deposits to _syncDeposit. That function decodes the user and rootToken, looks up the mapped Polygon token, and calls that token’s deposit function with the user address.
Consider two Ethereum deposits with the same RootChainManager transaction target and the same ChildChainManager event receiver. If the encoded user is your Polygon wallet in the first deposit, that wallet is the intended beneficiary. If the encoded user is a different address in the second, that other address is the intended beneficiary—even though the event receiver is unchanged. The deciding field is user in the payload, not receiver in StateSynced.
To interpret an explorer record, distinguish the event’s receiver from the user encoded in the message. If the explorer does not decode the payload, the event’s receiver by itself cannot confirm the beneficiary; inspect the transaction input or decoded message data. Also, an expected receiver establishes only where the message is addressed. It does not prove that ChildChainManager processed the message or that the mapped Polygon token completed the credit.
Comments
Post a Comment