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

Check bid still exists before calling tick #101

Open
nanexcool opened this issue Nov 22, 2019 · 4 comments
Open

Check bid still exists before calling tick #101

nanexcool opened this issue Nov 22, 2019 · 4 comments

Comments

@nanexcool
Copy link
Contributor

nanexcool commented Nov 22, 2019

If an auction has been dealt and tick is called after but in the same block, there's some residue left in storage (end in Flipper and Flapper, end and lot in Flopper ).

Adding a require(bids[id].guy != address(0), "Fl*pper/auction-not-active"); to the top of tick fixes this.

Not an issue now, but we want to be good citizens and not bloat state.

@kmbarry1
Copy link
Contributor

I might use "Fl*pper/auction-not-active" as opposed to "Fl*pper/guy-not-set" as that's more likely to be meaningful to someone debugging a failed transaction.

@nanexcool
Copy link
Contributor Author

Good point.

@iamchrissmith
Copy link
Contributor

just FYI this was raised by both TOB and Peckshield and we decided that this was not an issue we needed to fix for launch as ticking an inactive/non-initialized auction had no negative effects

@kmbarry1
Copy link
Contributor

Thinking about this more, we should consider just wrapping the tick logic in if (bids[id].guy != 0) { ... } for backwards compatibility. But maybe that doesn't matter.

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

No branches or pull requests

3 participants