Metadata Propagation
Beyond token value, M Portals are crucial for synchronizing the M0 protocol state across chains. The purpose and data are the same for both implementations, but the transport mechanism differs.
- Purpose: To ensure yield calculations (
$M Earning Index
) and governance parameters (TTG Registrar
values) are consistent between the Hub and all Spoke chains. -
Propagated Data:
- $M Earning Index: A continuously accruing value representing the aggregate yield earned within the M0 system on Ethereum. Propagating this allows the $M representation on Spoke chains to reflect the correct yield.
- TTG Registrar Values: Key-value pairs stored in the
Registrar
contract on Ethereum, set by M0 governance (TTG). Examples include theEARNERS_LIST
which dictates which addresses are eligible for yield. Propagation ensures Spoke chains respect Hub governance decisions.
-
Propagation Mechanisms:
- Implicit (with token transfers): Every token transfer message from the
HubPortal
automatically includes the current$M Earning Index
in its payload. The receivingSpokePortal
uses this to update its local state. - Explicit (on-demand): Anyone can permissionlessly call functions on the
HubPortal
to send the latest metadata to a specific Spoke chain.sendMTokenIndex(uint16 destinationChainId)
: Sends the current $M Index to a specific Spoke chain.sendRegistrarKey(uint16 destinationChainId, bytes32 key)
: Sends the value associated with a specific key from the HubRegistrar
to a SpokeRegistrar
.sendRegistrarListStatus(uint16 destinationChainId, bytes32 listKey, address entry)
: Sends the inclusion status of a specific address within a list (likeEARNERS_LIST
) in the HubRegistrar
to the SpokeRegistrar
.
- Frequency: Explicit updates are often triggered periodically by automated bots to ensure timely synchronization even without user transfer activity.
- Implicit (with token transfers): Every token transfer message from the