In https://github.com/consensus-shipyard/ipc-actors/pull/36 we introduced the collection of fees for every cross-message operation. These fees are assigned to a governance account in the gateway of the subnet. Through the distribution of these fees we want to:
Incentivize the commitment of checkpoints to the parent.
Reward the validators of the subnet.
To achieve this, the reward distribution will be triggered with the commitment of the subnet checkpoint in the parent. This is also really convenient, as the subnet_actor is the only one keepeing track of the validator set in the subnet. We won't enforce any kind of reward distribution in subnets, and developers will be able to implement whatever reward policy they need in the subnet actor.
Design
New checkpoint templates in the gateway of the subnet are initialized with a new reward_msg in its CrossMsgMeta directed to the Reward function of the subnet_actor in the parent. This message has an initial value of zero.
With every cross_msg_fee collected, the fee is burnt and the amount of the reward message is increased.
When the checkpoint is propagated and committed up, the reward message will be executed, triggering the corresponding forwarding of the message and the call to the reward function in the subnet actor.
With this, the subnet actor distributes the rewards according to whatever policy it implements.
Related: https://github.com/consensus-shipyard/ipc-actors/issues/18
Background
In https://github.com/consensus-shipyard/ipc-actors/pull/36 we introduced the collection of fees for every cross-message operation. These fees are assigned to a governance account in the gateway of the subnet. Through the distribution of these fees we want to:
subnet_actor
is the only one keepeing track of the validator set in the subnet. We won't enforce any kind of reward distribution in subnets, and developers will be able to implement whatever reward policy they need in the subnet actor.Design
reward_msg
in itsCrossMsgMeta
directed to theReward
function of the subnet_actor in the parent. This message has an initial value of zero.cross_msg_fee
collected, the fee is burnt and the amount of the reward message is increased.reward
function in the subnet actor.