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

feat(auction): allow orders to automatically exit after partial fill #7269

Merged
merged 2 commits into from
Mar 30, 2023

Conversation

Chris-Hibbert
Copy link
Contributor

@Chris-Hibbert Chris-Hibbert commented Mar 29, 2023

closes: #7088

Description

Allow Auction bids to add an offerArgs parameter that says the seat should be exited if the offer is partially filled.

Security Considerations

None

Scaling Considerations

None.

Documentation Considerations

One more detail for the bidding UI and CLI.

Testing Considerations

Well tested.

@Chris-Hibbert Chris-Hibbert added Zoe Contract Contracts within Zoe Inter-protocol Overarching Inter Protocol Vaults VaultFactor (née Treasury) labels Mar 29, 2023
@Chris-Hibbert Chris-Hibbert self-assigned this Mar 29, 2023
@codecov
Copy link

codecov bot commented Mar 29, 2023

Codecov Report

Merging #7269 (2cc2dc0) into master (9b00393) will decrease coverage by 0.36%.
The diff coverage is 80.64%.

❗ Current head 2cc2dc0 differs from pull request most recent head 149f0ba. Consider uploading reports for the commit 149f0ba to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7269      +/-   ##
==========================================
- Coverage   71.00%   70.64%   -0.36%     
==========================================
  Files         451      448       -3     
  Lines       86424    85583     -841     
  Branches        3        3              
==========================================
- Hits        61363    60464     -899     
- Misses      24995    25051      +56     
- Partials       66       68       +2     
Impacted Files Coverage Δ
packages/inter-protocol/src/auction/auctionBook.js 72.89% <53.84%> (+3.07%) ⬆️
packages/inter-protocol/src/auction/auctioneer.js 61.50% <93.54%> (-0.21%) ⬇️
packages/inter-protocol/src/auction/offerBook.js 87.19% <100.00%> (+0.59%) ⬆️

... and 19 files with indirect coverage changes

Impacted file tree graph

@Chris-Hibbert Chris-Hibbert requested a review from turadg March 29, 2023 23:12
@@ -71,6 +73,7 @@ export const makeBidSpecShape = (currencyBrand, collateralBrand) => {
return M.splitRecord(
{ want: collateralAmountShape },
{
exitAfterBuy: true,
Copy link
Member

Choose a reason for hiding this comment

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

why is exitAfterBuy: false invalid?

if it truly is then make it the same in the TS type,

  exitAfterBuy?: true,

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think you're right that the mistake is here. exitAfterBuy is a boolean that defaults to false.

packages/inter-protocol/src/auction/auctionBook.js Outdated Show resolved Hide resolved
packages/inter-protocol/src/auction/auctionBook.js Outdated Show resolved Hide resolved
@Chris-Hibbert Chris-Hibbert requested a review from turadg March 30, 2023 00:46
@Chris-Hibbert Chris-Hibbert added the automerge:squash Automatically squash merge label Mar 30, 2023
@Chris-Hibbert
Copy link
Contributor Author

@turadg I added automerge:squash so this can go in tonight if you approve. If you want to approve with requested changes, please remove the label before approving.

Base automatically changed from 6952-auctionTargeRaise to master March 30, 2023 01:47
@erights
Copy link
Member

erights commented Mar 30, 2023

From the PR comment:

Allow Auction bids to add an offerArgs parameter that says the seat should be exited if the offer is partially exited.

Did you mean "partially filled"?

Copy link
Member

@turadg turadg left a comment

Choose a reason for hiding this comment

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

Thanks for the automerge label comment. This does look mergable to me, modulo resolving conflicts

@Chris-Hibbert
Copy link
Contributor Author

Did you mean "partially filled"?

Yes. Corrected.

@mergify mergify bot merged commit 58d36fb into master Mar 30, 2023
@mergify mergify bot deleted the 7088-autoExit branch March 30, 2023 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge:squash Automatically squash merge Inter-protocol Overarching Inter Protocol Vaults VaultFactor (née Treasury) Zoe Contract Contracts within Zoe
Projects
None yet
Development

Successfully merging this pull request may close these issues.

allow auction Bids to specify "exit on partial satisfaction"
3 participants