Skip to content

statechain type and message update

Ghost User requested to merge updatemsg into master

Thanks @jpthor for explaining the calculations behind the project,Calculation is super helpful Following that I believe there are three different type of actions will happen on statechain

  1. Stake - MsgSetStakeData
  2. Unstake - MsgSetUnStake
  3. Swap - MsgSwap

There will have two types of information that need to be stored into statechain's KV store. PoolStruct and Staker

PoolStruct will be changed when Stake, UnStake , and Swap happens, we will not directly mutate PoolStruct Staker will add when they stake , removed when they unstake

I believe we need to keep the address on binance chain for pool , and staker , thus I added it to the structure

In this PR I defined some of the new structure to implement these logic correctly, and also please pay attentions to the TODO comments I put in , basically if I think those are not needed , then they are the target for removal.

@jpthor @bmcd_brent Could you please review this PR, and add comments if you disagree

Merge request reports