tangle icon indicating copy to clipboard operation
tangle copied to clipboard

[CHECKLIST] Multi-asset Delegation

Open drewstone opened this issue 1 year ago • 0 comments

Overview

Starting from parachain-staking and removing much of what is unneeded. Our delegation system should be the main entrypoint for validators to signal their intentions to be operators. It should support

Operators

Manipulating the operator set

  • [ ] join_operators to join the operator set and put up a bond that should.
  • [ ] schedule_leave_operators - schedule to leave operators, must have no active services.
  • [ ] execute_leave_operators - executes leave operators, must have a scheduled leave that is satisfied.
  • [ ] cancel_leave_operators - executes cancelling of scheduled leave.

Restaking TNT nominations

  • [ ] operator_bond_more - bond more TNT from one's own nominations.
  • [ ] schedule_operator_bond_less - schedule to bond less tokens, must have no active services using TNT.
  • [ ] execute_operator_bond_less - executes to bond less, must have a scheduled bond less that is satisfied.
  • [ ] cancel_operator_bond_less - executes cancelling of scheduled bond less.

Going offline/online

  • [ ] go_offline - Stop accepting any new service requests indefinitely. All currently running service requests must be honored.
  • [ ] go_online - Start accepting new service requests.

Delegators

Delegations should mint a liquid staked delegation. This allows users to sell their LSD on an open market in order to get out early from any active services.

Manipulating delegations

  • [ ] delegate - Delegates an amount of an non-native asset to an operator.
  • [ ] schedule_delegator_bond_less - schedule to delegate less amount of an asset, must have no active service on this operator using this asset.
  • [ ] execute_delegator_bond_less - executes to delegate less, must have a scheduled delegate less that is satisfied.
  • [ ] cancel_delegator_bond_less - executes cancelling of scheduled delegate less.

Rewards

  • We should start rewards off at 0%, onboard the first services, and then over time increase it. We need to see how it'll all look first unless we're confident otherwise.
  • We need a mechanism to identify how much rewards go to a service.
  • Whatever mechanism defines how much rewards goes to a single service.. If each delegated asset has its own reward %, this makes initially rewarding services with inflation much easier. We simply reward the delegators of an asset proportional to their contribution of the delegation to the operator and repeat across all operators in that service instance.

Hooks

  • [ ] get_delegated_assets_for_service - gets the AssetIds being delegated and used by an active service instance
  • [ ] get_services_for_operator - gets active service instances for an operator.

drewstone avatar May 16 '24 15:05 drewstone