oxen-io / oxen-electron-gui-wallet

Oxen electron GUI wallet
https://oxen.io
Other
33 stars 46 forks source link

Staking greyed out for reserved, too-small spots #291

Open jagerman opened 3 years ago

jagerman commented 3 years ago

I've had a report (unconfirmed) that the staking button remains grayed out if a reserved staking contributor is attempting to fill his contribution, that that contribution would not be a valid open contribution amount.

For example, with a reserved staking split of:

Operator - 65% (9750) Contr. 1 - 20% (3000) Contr. 2 - 10% (1500) Contr. 3 - 5% (750)

before any subsequent contributions have been made, contributors 2 and 3 are unable to stake because the 1500/750 stakes would not meet the contribution requirement (1750) of an open service node with 9750 contributed.

This should be fixed: if the contributor has a reserved spot in the node then they should be able to contribute their reserved amount, even if it falls below the staking requirement (it doesn't actually fall below the staking requirement, because the requirements are enforced in the reserved spot registration itself).

(NB: This is based on anecdotal evidence -- I haven't yet spun up a registration to test this with the GUI wallet.)

If the above is confirmed then I suspect there is likely also a related issue with contributing to partially open SNs, e.g. if a registration specifies:

Operator - 40% Contr. 1 - 40%

then the minimum contribution spot should be 10% (20% open ÷ 2 open spots), not 20% (60% uncontributed ÷ 3 uncontributed spots), even before Contributor 1 actually submits their stake.