paideiadao / paideia-app

paideia-app.vercel.app
MIT License
5 stars 6 forks source link

Unable to partially withdraw staked tokens (cannot read properties of undefined (reading 'data) #59

Closed FlyingPig69 closed 1 year ago

FlyingPig69 commented 1 year ago

Steps to recreate:

  1. Stake 1000 tokens.
  2. Attempt to withdraw any partial amount.

Get error message "Cannot read properties of undefined (reading 'data)

I read an earlier issues which was related to a tx being in mempool, i verified there were no pending txs in the mempool for my address.

(Note: I was able to succesfully withdraw all/max amount, issue is restricted to partial unstake)

Luivatra commented 1 year ago

Partial unstake is disabled, because it opens up for gaming the staking rewards/profit distribution. So intended behaviour, the error message just isnt too pretty :)

Luivatra commented 1 year ago

To do:

FlyingPig69 commented 1 year ago

Partial unstake is disabled, because it opens up for gaming the staking rewards/profit distribution. So intended behaviour, the error message just isnt too pretty :)

How is partial unstake different to unstaking all of it and then restaking a smaller amount?

esot321c commented 1 year ago

Bounty: Please remove ability to partially unstake

image

Remove input box, force it to unstake the entire amount. Input box can be there, auto-filled with the amount, but disabled.

Luivatra commented 1 year ago

Partial unstake is disabled, because it opens up for gaming the staking rewards/profit distribution. So intended behaviour, the error message just isnt too pretty :)

How is partial unstake different to unstaking all of it and then restaking a smaller amount?

A DAO can have delayed staking/profit rewards so that only those that have staked for a certain amount of time get rewards. Partial unstaking could circumvent this.