consensus-shipyard / ipc

🌳 Spawn multi-level trees of customized, scalable, EVM-compatible networks with IPC. L2++ powered by FVM, Wasm, libp2p, IPFS/IPLD, and CometBFT.
https://ipc.space
Apache License 2.0
40 stars 33 forks source link

[Staking] Validator rewards #1079

Open raulk opened 1 month ago

raulk commented 1 month ago

The flip side of #1051 is validator rewards. To keep validators rational and aligned with correct behaviour, IPC needs to deliver cryptoeconomic incentives for subnet validation.

Framework approach

IPC as a framework should be fairly unopinionated by how and which rewards are distributed, as this will depend on concrete subnet tokenomics, especially in the presence of custom ERC20 subnet tokens. Our framework should allow subnet operators to configure, parameterize, and customize the reward mechanics. This implies design choices that favour modularity via hooks and user-pluggable functions and policies. We should provide one or several basic policy/strategies out of the box as quickstarts / examples.

Considerations

raulk commented 1 month ago

@sanderpick @bigs @carsonfarmer @angelo-schalley-p @hannahhoward @boneyard93501 would appreciate your input here!

boneyard93501 commented 1 month ago

Looks pretty good to me. Thanks for writing this up.

Couple things, bottom up:

carsonfarmer commented 1 month ago

Thanks @raulk, this is very much in line with our initial thinking, so great to see alignment there!

  • Coin/token choice. Subnet operators should choose which coin/token rewards get paid in. For sure!
  • Disbursement site. Can happen at the parent when checkpoints are presented (in which case they must carry a digest of proposers), or at the child (where more information is available and disbursement can happen immediately; handicap: we have no link between a validator and an account yet, but that needs to be fixed for Gas completeness (EIP-1559, base fee oscillation, gas premiums, block gas limit) #925 anyway).

Excellent, I think this proposal matches our thinking quite nicely.

  • Vault. In both cases, since the subnet does not control the supply, there must be the concept of a rewards vault/treasury, and possibly the concept of convertible debt to handle continuity in case of temporary vault depletion.

The vault here is exactly what we had in mind, perfect. I'm ok with not handling debt at the expense of the possibility of temporary breaks in continuity, leaving ensuring this doesn't happen to the "application", but if there is a sound way to handle this (that doesn't add a ton of extra work), I'd also be in support of that.

  • Vault transfers. Because subnets can be created dynamically, amounts in vault must be transferred down at subnet genesis, and any remnants back up at subnet EOL.

Yup.

  • Customizable reward function. Depending on the disbursement site, this may have access to more or less data. We should keep this agnostic of the concrete consensus algorithm (e.g. do not model rounds, since some consensus protocols don't have rounds).

Yes please!

  • Vesting curve. Some protocols may want to keep some portion of rewards locked-up for some time, which may be forfeited or not if the validator leaves the network early. TBD.

I do think this is going to be relevant for us, and likely other projects targeting customs rewards and issuance frameworks.

sanderpick commented 1 month ago

Great to see this. @raulk for timeline alignment, do you know where this sits on your priority board?