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

startTick == endTick #143

Merged
merged 8 commits into from
Oct 22, 2024
Merged

startTick == endTick #143

merged 8 commits into from
Oct 22, 2024

Conversation

kinrezC
Copy link
Collaborator

@kinrezC kinrezC commented Oct 18, 2024

  • Fixes maxDutchAuctionTest -- in this test we are swapping for exactly 1 asset, warping +1 epoch, then swapping that 1 asset back in. This causes the netSold to be <= 0 to trigger the max DA test. In this test we were checking that the lowerSlug was unset, but this will not be the case given that when we warp +1 epoch after the first swap we will be partially dutch auctioning down. Because of the partial dutch auction we will not be taking out all of the numeraire token, and thus the lower slug is NOT unset.
  • Fixes assetAvailable being passed to _computePriceDiscoverySlug. Previously, we were computing assetAvailable after clearing the slugs and then passing assetAvailable to computeUpperSlugData. In computeUpperSlugData we subtract the asset tokens allocated to the upper slug from assetAvailable, but this operation is done locally in the computeUpperSlugData scope and was not effectively propagated to the parent function call. Now we return a new value assetRemaining from computeUpperSlugData such that we have a correct accounting of the tokens available for the price discovery slugs. (flagged in Check that assetAvailable is correct #103)
  • Tests all pass for isToken0 == true

@kinrezC kinrezC requested a review from kadenzipfel October 22, 2024 00:22
@kinrezC kinrezC merged commit d5cfa35 into main Oct 22, 2024
1 check failed
@clemlak clemlak deleted the feat/no-da branch November 5, 2024 06:05
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.

2 participants