storyprotocol / story-geth

Go implementation of the Ethereum protocol
https://geth.ethereum.org
GNU Lesser General Public License v3.0
4 stars 8 forks source link

Lost a token with public key in validator #26

Closed roscuong closed 1 month ago

roscuong commented 1 month ago

Problem with staking to another Validator

Dear Team,

Me & @coha05 just found a big issue when using the Validator Stake-on-behalf Command

I got 1300 IP tokens as a reward after completing 4 tasks at StakeMe. And I want to delegate those tokens to another validator.

I used the Validator Stake on BeHalf command according to the project docs instructions.

./story validator stake-on-behalf \
  --delegator-pubkey ${DELEGATOR_PUB_KEY_IN_BASE64} \
  --validator-pubkey ${VALIDATOR_PUB_KEY_IN_BASE64} \
  --stake ${AMOUNT_TO_STAKE_IN_WEI} \

My public key is AhOcUH+wfVhJNkf49Yh2hhAPWnXqxlPGM0+BLYHGa/xt

The public key that I want to delegate is AudHrGoydgdTjG+wZBc+aIH7nW7qW9vSuxodGFbN9Qn2

But I misused the above command by swapping 2 keys as the below command

./story validator stake-on-behalf \
  --delegator-pubkey AudHrGoydgdTjG+wZBc+aIH7nW7qW9vSuxodGFbN9Qn2} \
  --validator-pubkey AhOcUH+wfVhJNkf49Yh2hhAPWnXqxlPGM0+BLYHGa/xt \
  --stake 1300000000000000000000 \

And 1300 IP token was delegated to my validator via Coha's wallet address with the address story15a4fph700vr0t0arfsrleeyh4al9087eh7ddnq

This means it was directly transferred 1300 tokens to Coha's wallet address and staked back to my validator.

And now I can't control the tokens I staked. Only Coha can control those tokens. Weirdly, it staked the IP token to my Validator with his wallet address without his private key

https://testnet.storyscan.xyz/tx/0xbace3d558b9d3cc89abd2cafdd83a6d4f0b4788ac8f3e7cad04f8e65658f5847
https://testnet.story.explorers.guru/validator/storyvaloper1nt2elx52gkgj0jmm52xqpxy8mahc68ter2e66s
https://testnet.story.explorers.guru/validator/storyvaloper15a4fph700vr0t0arfsrleeyh4al9087ee3evct
https://testnet.story.explorers.guru/account/story15a4fph700vr0t0arfsrleeyh4al9087eh7ddnq

Could you please help to investigate this issue?

roscuong commented 1 month ago

wrong repo