near / stakewars-iii

Stake Wars: Episode 3 challenges and place to report issues
87 stars 177 forks source link

Challenge 8 - Withdraw Rewards #58

Closed joesixpack closed 2 years ago

joesixpack commented 2 years ago

Appears to be a bug with this contract call. Instead of just distributing the rewards (and it appears to have missed the second wallet also), it seems to unstake the entire validator stake and the validator disappears. Had to restake with fresh tokens above the minimum balance and ping to get it back into proposals.

challenge8

https://explorer.shardnet.near.org/transactions/Ge6baSvv7JrLmZERqRjec65ybYSUxmrXSzuxMVbt3nsY

joesixpack commented 2 years ago

I was stupid and tried it again, clearly it should not be unstaking the pool?

image

https://explorer.shardnet.near.org/transactions/HFiFh9fKiTDUy9WSchykqBxsczuSJMbEdBEZ6ed4yL7S#FtBdeLH5arWbhDG2Hjgnw8cjrPZzyX6PDLMK9MrB8d1u

joetan79 commented 2 years ago

I also having the same problem. After run this contract and it's withdraw all my staking as well as validators has been kicked out

joesixpack commented 2 years ago

https://github.com/zavodil/near-staking-pool-owner/issues/2#issue-1326104703

Foo115 commented 2 years ago

Im having same issue, i think there is some bug on the contract. Had change the numerator and denomirator also to low as possible but still gettin unstaking all balance on pool

ivanguardia commented 2 years ago

I had the same. I lost 4 epochs -> unstake all, get rewards, stake all, ping, and finally set active again. The withdrawal should be only the reward and not all the staking available. This is a smartcontract issue.

stiavnik commented 2 years ago

Yes, as part of the challenge I submitted where exactly the error in code is, on the other side I may be wrong because I don't really know Rust yet. Remember the challenge asks as to report if something goes wrong, so...?

onsails commented 2 years ago

Apparently I have the same issue with validator which was in active set and with brand new validator #114

ShaMate256 commented 2 years ago

The same for me It unstaked all.

Use near call pool_id stake_all --accountId account to return stake back.