Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

While a listing is locked in a challenge, tokens cannot be withdrawn if the withdrawal would leave the listing with < minDeposit unstakedDeposit #55

Open
skmgoldin opened this issue Apr 5, 2018 · 1 comment

Comments

@skmgoldin
Copy link
Owner

skmgoldin commented Apr 5, 2018

require(listing.unstakedDeposit - _amount >= parameterizer.get("minDeposit"));

The intent of this line is to prevent people from making withdrawals that would leave them subject to touch-and-removes. It does that.

A side effect is that while a challenge is active, tokens cannot be withdrawn which would leave the unstaked deposit less tnan minDeposit, which is actually unnecessary. If the listing loses the challenge they will go away, and if they win they will necessarily be left with at least minDeposit tokens unlocked since they get their deposit amount unlocked plus their winnings from the challenge loser. Since multiple challenges cannot be in flight against a listing at the same time, it is okay if during a challenge a user withdraws their entire unstaked deposit.

@Kmoneal
Copy link
Collaborator

Kmoneal commented Apr 11, 2018

Let's put a note about this in the Prospect Park Owner's Manual.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants