Snapshot - Staked ONE Strategy

When creating a new snapshot proposal, the basic strategy does not account for staked ONE. Which is abysmal in my opinion! So the first question would be:

  1. Is there already a strategy that I’m missing? @giv

If not, I would like to create a bounty for it and would require your professional opinions @sophoah @MaxMustermann2 on creating that strategy. There are two options (a) utilize a single contract call or (b) create a custom strategy.

(a) would be the easiest and wouldn’t require waiting for the PR to get merged, but the ABI of the staking contract has no such function and it should also take the current wallet balance into account.

(b) writing a custom strategy by combining current RPC methods. Would require waiting for snapshot to merge that pull request. This could use the “hmyv2_getDelegationsByDelegatorByBlockNumber” in combination with “eth_getBalance”

I think this is quite important and I would really like to get your opinions on this.

5 Likes

I’m also waiting on this because I’m not sure how long the old ABI will work.

I believe the read only precompile could help with this, in combination with using a contract call as you stated.

I am in touch with the author of that precompile, and they believe they can submit by the end of this week. However, the balance is still something you will need to add on top in the contract.

Taking into consideration the stake ONE totally make sense !

option (a) @MaxMustermann2 works of course but it will need some wait time.
option (b) might be faster if snapshot can merge the propose strategy code in their codebase. My only comments here is about eth_getBalance. We need to query the 4 shard to retrieve the user total ONE balance. We know most of the account balance are now on shard 0 but let’s be future proof and also query balance on the 3 other shards.

2 Likes

Yeah, that’s true, the shard balance should be taken into account. The hmyv2_getBalanceByBlockNumber does also only contain the information for the current shard.

However, I think if, like @MaxMustermann2 said, the precompile extension will be done in a few days it would be the more elegant solution to use the smart contract call and then a bounty would not be required at all.

1 Like

looks like it’s ready Harmony Read-Only Staking Precompile
can you may help you find out a strategy for snapshot?

It’s not yet merged, though.
But sure :slight_smile: