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

New surplus auction simulation on the latest block #449

Merged
merged 7 commits into from
Sep 7, 2022

Conversation

KirillDogadin-std
Copy link
Contributor

@KirillDogadin-std KirillDogadin-std commented Sep 7, 2022

Closes #448

Checklist:

  • issue number linked above after pound (#)
    • replace "Closes " with "Contributes to" or other if this PR does not close the issue
  • issue checkboxes are all addressed
  • manually checked my feature / not applicable
  • wrote tests / not applicable
  • attached screenshots / not applicable

@KirillDogadin-std KirillDogadin-std changed the title New surplus simulation Add new surplus auction simulation Sep 7, 2022
@KirillDogadin-std KirillDogadin-std marked this pull request as ready for review September 7, 2022 13:01
Copy link
Contributor

@valiafetisov valiafetisov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you also want to create a test like debt-test.ts to validate that it works in the CI?

@KirillDogadin-std
Copy link
Contributor Author

Do you also want to create a test like debt-test.ts to validate that it works in the CI?

with this pr's topic it would be surplus-test.ts

I suggest opening a separate issue and resolving it there for both simulations unless you're against it for some reason.

@valiafetisov
Copy link
Contributor

Alright, let's open a new issue then to add a full-blown test for each step of the auction!

@valiafetisov
Copy link
Contributor

  • ✅ Was able to start and participate in the surplus auction using new simulation
    • ✅ setting allowance
    • ✅ bidding
    • ✅ collecting

Screenshot 2022-09-07 at 18 22 47

Although some problems got found which would also be addressed in the next PR:

  • Price on uniswap is not fetched
  • Next lowest bid is set to 0 (which is not accepted by the protocol). We need to set it to > 0, at least one 1 * 10-18
    • Since keeper will be using it to make first bid, we should make it more realistic, eg a uniswap price * gap to reach 1k net profit
  • Auction state displays a date, not state
  • After the auction ended it still counts down (not up) for some reason (possibly invalid determination of the earliestEndDate?)

@valiafetisov valiafetisov merged commit 2b9c8d2 into main Sep 7, 2022
@valiafetisov valiafetisov deleted the new_surplus_simulation branch September 7, 2022 16:55
@valiafetisov valiafetisov changed the title Add new surplus auction simulation New surplus auction simulation on the latest block Sep 7, 2022
@valiafetisov valiafetisov mentioned this pull request Sep 7, 2022
9 tasks
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

Successfully merging this pull request may close these issues.

Add surplus auction simulation
2 participants