parallel
parallel copied to clipboard
Add staking extrinsics to the doracle pallet
- [ ] 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
https://github.com/paritytech/substrate/tree/master/frame/staking
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
For Slashing consider last submitted time For rewards come up with a formula with block number transactions per block .......