-
Notifications
You must be signed in to change notification settings - Fork 112
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
Only allow auctions to be started at most once a month per token #185
Comments
@area Can I take a stab at this? My initial thought is to use a storage variable
If the auction was successfully created, then we update the mapping with |
Of course! What you've outlined sounds correct. Just remember that the storage variable should be declared in |
@area Why should the mapping be stored in |
You're absolutely right. That's what I get for trying to be helpful before breakfast. |
Another thing: it looks like Seeing as a |
It's clear why we're not doing the functionality in @elenadimitrova is more familiar with the decisions that went in to the auction code. She's on holiday right now, but tagging her so she can drop some knowledge when she finds her way back from whatever beach she's currently on. |
I guess the question to answer is:
If there is an advantage to a Regardless, these are the approaches we have: Approach 1 (requires calling .start() in startTokenAuction): We store the auction cooldown expiration time instead of the auction start time so we do not have to make calculations each time we want to check if an auction can be run (instead of checking Approach 2 (if we cannot call .start() in startTokenAuction): Approach 3 (if we cannot call .start() in startTokenAuction): |
I don't see the benefit here? That calculation will be done on chain exactly once in either scenario, unless someone tries to start an auction without doing a Either way, I think we should go for Approach 1, moving the call to |
That would be the only benefit. I am up for the challenge! 😄 |
Okay, well feel free to start working on it, and don't feel like you have to wait until you're done to open a PR; it's much easier for us to give feedback with a PR to look at, and lets us catch anything that appears to be going awry early. |
Got it. I've already created the PR that adds It also looks like I do not have permissions to set any fields in the PR (labels, assignee, etc). |
Currently (or at least, once #168 is merged), auctions for a specific token can be started repeatedly and as often as people like. For a particular token, an auction should only be able to be started one month after the last auction was started. The intention for this is to ensure that a moderate number of tokens are sold off each time, and to reduce the burden on users who are interested in buying a particular token (they only have to track one auction per month, rather than an arbitrarily large number).
The text was updated successfully, but these errors were encountered: