parallel icon indicating copy to clipboard operation
parallel copied to clipboard

Add staking extrinsics to the doracle pallet

Open drbh opened this issue 2 years ago • 3 comments

  • [ ] stake
  • [ ] unstake

a person can signup to be a repeater. they have to submit more than a min amount. we need a way to verify they're in the pallet storage. they should be able to unstake.

tokens are native - (from balances pallet not assets pallet)

unstake

  • your deposits
  • your rewards

Stake

check if origin is allowed to stake

transfer HKO from staker to pallet

increment stake balance

add to repeaters if not in list

  • to in N rounds (maybe 2-3)
  • or implemented as a warming up period

Unstake

check if origin is staked

decrement stake amount

remove from repeater is stake is 0

unstake has a cool down period

  • to deter staking supplying prices and unstaking in a short period of time

drbh avatar Apr 25 '22 19:04 drbh

https://github.com/paritytech/substrate/tree/master/frame/staking

drbh avatar Apr 25 '22 19:04 drbh

Continuation

  • [ ] Implement rewards and slashing
  • [ ] Configure static reward amount ( native currency )
  • [ ] Rewards should calculate per round basis
  • [ ] Come up with a formula for this
  • [ ] Staking should lock for a specific epoch
  • [ ] Change the repeaters structure for requirements

c02fee avatar Apr 29 '22 19:04 c02fee

For Slashing consider last submitted time For rewards come up with a formula with block number transactions per block .......

c02fee avatar May 04 '22 18:05 c02fee