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

Place Liquidation Bid via CLI #6930

Closed
4 of 5 tasks
otoole-brendan opened this issue Feb 6, 2023 · 6 comments · Fixed by #7256
Closed
4 of 5 tasks

Place Liquidation Bid via CLI #6930

otoole-brendan opened this issue Feb 6, 2023 · 6 comments · Fixed by #7256
Assignees
Labels
enhancement New feature or request Inter-protocol Overarching Inter Protocol vaults_triage DO NOT USE

Comments

@otoole-brendan
Copy link
Contributor

otoole-brendan commented Feb 6, 2023

What is the Problem Being Solved?

In the absence of a liquidation UI for Vaults launch, we will need a means for user (presumably with bots) to be able to place bids for liquidated collateral via CLI

Description of the Design

revised by @dckc

Follow established pattern for commands that format smart wallet offers and sign/send them. See also test plan below.

Security Considerations

agoric cli relies on cosmos-style agd for key / keyring management.

Scaling Considerations

none?

Test Plan

Among others, test that...

Tasks

  1. 2 of 2
    Inter-protocol auction enhancement test vaults_triage
    dckc

To modify a bid, users can cancel and place another bid.

Testing has been a mix of manual and automated approaches.

@otoole-brendan
Copy link
Contributor Author

#6889 serves to document how one might follow the CLI bidding process

@dckc dckc added the Inter-protocol Overarching Inter Protocol label Feb 7, 2023
@dckc
Copy link
Member

dckc commented Feb 7, 2023

I added some detail to the design, test plan.

@dckc
Copy link
Member

dckc commented Mar 8, 2023

modify bid feasible? required?

Having looked at this in a little detail (#7132) I don't see how to do "modify bid". @Chris-Hibbert I don't see support for it in the contract. Did I miss it? Or did you plan to add it?

@otoole-brendan can we do without modify?

I can probably combine "exit bid offer" and "place new bid" into one cli action, if that's close enough... though partial failure makes it tricky.

p.s. in a user stories doc, I see: "If ‘modify’ is challenging, sufficient to cancel and create a new one - UI could abstract this into a ‘modify’"

@Chris-Hibbert
Copy link
Contributor

I don't see how to do "modify bid". @Chris-Hibbert I don't see support for it in the contract. Did I miss it? Or did you plan to add it?

I missed this requirement. I have no plans or design. The easiest approach is probably exit and place new bid.

@dckc
Copy link
Member

dckc commented Mar 21, 2023

Place priced bid; receive payouts working

2023-03-20T23:46:04.918Z SwingSet: vat: v49: ----- VM.11  20 lockPrice { brand: Object [Alleged: IbcATOM brand] {}, value: 1_000_000n } { brand: Object [Alleged: IST brand] {}, value: 2_600_000n }
$ inter bid list --from gov1 --keyring-backend=test
{"id":"bid-1679355396104","give":{"Currency":"50IST"},"want":"5IbcATOM","price":"0.000009IST/0.000001IbcATOM}","payouts":{"Collateral":"5IbcATOM","Currency":"37IST"}}

@dckc
Copy link
Member

dckc commented Mar 29, 2023

some sequence diagrams:

Notes:

  • dotted lines are "replies" to (or more generally: consequences of) solid lines
  • "10 IST Pmt" denotes a payment of 10 IST -- actual assets -- where "10 IST" is an amount -- just a description of assets.

Context: Creating a Vault

sequenceDiagram

title Creating a Vault

actor Alice
participant Zoe
participant VaultFactory
participant Oracle

    Oracle->>VaultFactory: pushPrice(12.34)
    Alice->>Zoe: contract: VaultFactory<br>give: 15 ATOM Pmt<br>want: 100 IST
    Zoe-->>VaultFactory: seat1<br>give: 15 ATOM<br>want: 100 IST
    VaultFactory-->>Zoe: reallocate 100 IST for 10 ATOM<br>result: vault0
    Zoe-->>Alice: 100 IST Pmt, vault0
    Zoe-->>VaultFactory: 15 ATOM
Loading

Liquidation Bidding

sequenceDiagram

title Liquidation Bidding

actor Alice
participant Zoe
participant VaultFactory
participant Auctioneer
participant Oracle
actor Bob

    Bob->>Zoe: contract: Auctioneer<br>give: 50 IST Pmt<br>want: 5 ATOM<br>price: 10 IST/ATOM
    Zoe-->>Bob: UserSeat 2
    Zoe-->>Auctioneer: seat 2<br>give: 50 IST, want: 5 ATOM<br>price: 9.5 IST/ATOM
    Oracle->>VaultFactory: pushPrice(9.99)
    VaultFactory-->>Alice: vault0 liquidating
    VaultFactory-->>Auctioneer: 15 ATOM Pmt to sell
    Auctioneer->>Zoe: seat: 2<br>reallocate 5 ATOM for 47.5 IST
    Zoe-->>Bob: 5 ATOM Pmt, 2.5 IST Pmt
Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Inter-protocol Overarching Inter Protocol vaults_triage DO NOT USE
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants