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

Expose All Bids in Vstorage #1

Open
3 tasks
Jorge-Lopes opened this issue Dec 28, 2023 · 4 comments
Open
3 tasks

Expose All Bids in Vstorage #1

Jorge-Lopes opened this issue Dec 28, 2023 · 4 comments

Comments

@Jorge-Lopes
Copy link
Owner

Work Plan:

  • Establish scope of this task
  • Establish success metrics and required test coverage
  • Identify modules that will be updated
@Jorge-Lopes
Copy link
Owner Author

Jorge-Lopes commented Dec 28, 2023

Objective:

Exposing the state of current bids in vstorage

Desired Bid data structured:

  • timestamp,
  • unique identifier,
  • price or discount bid,
  • amount of IST available,
  • maximum collateral

Considerations:

  • when a Bid get fulfilled, withdrawn or cancelled, we should delete the vstorage node corresponding to the bid.

Information retrieved from issue #7906

@Jorge-Lopes
Copy link
Owner Author

Jorge-Lopes commented Dec 28, 2023

Current status:

Most recent work made by the Agoric team seems to be in this PR #7618

Bid data structure being published on vstorage:

[
      'published.auction.books.book0.bids.bid1002',
      {
        balance: {
          brand: Object @Alleged: Bid brand {},
          value: 116n,
        },
        exitAfterBuy: false,
        originalWant: {
          brand: Object @Alleged: Collateral brand {},
          value: 200n,
        },
        price: {
          denominator: {
            brand: Object @Alleged: Collateral brand {},
            value: 200n,
          },
          numerator: {
            brand: Object @Alleged: Bid brand {},
            value: 232n,
          },
        },
        remainingWant: {
          brand: Object @Alleged: Collateral brand {},
          value: 100n,
        },
        sequence: 1002n,
        timestamp: {
          absValue: 167n,
          timerBrand: Object @Alleged: timerBrand {},
        },
      },
    ],

Major changes made on this PR:

  • auctioneer:
    • timestamp passed as argument to auctionBook.addOffer()
    • makeAuctionBook now gets as argument the created bookNode and bidsNode
  • auctionBook:
    • bidsNode is passed as argument to makeScaledBidBook() and makePriceBook()
    • bidsNode is passed as argument to bidsDataKit, which is exposed in the auctionBook self facet
    • priceBook.add() and scaledBidBook.add() receives timestamp as argument
  • offerBook.js
    • the bidsNode will be provided as argument to the makeBidNode method to generate a child node for each new bid created
    • When adding a new bid, the newly created node will be used to create a recorder kit.
    • the publishOffer() method is the one that will write the bid data to the storage. It is called when the add() or updateReceived() methods are executed.
    • getBidDataRecorder method will return the desired recorder to update bid node data, while deleteNodeIfPresent method will delete the node itself
    • deleteNodeIfPresent is called when the delete method is executed

@Jorge-Lopes
Copy link
Owner Author

Jorge-Lopes commented Dec 28, 2023

blockers preventing the merge of PR #7618

The list of issues that are preventing the merge of PR #7618 is identified in this comment.

  • Issue #7954: auctioneer returns non-durable facets so we’ll need to give vaultFactory the new publicFacet after upgrade. That means we have to upgrade vaultFactory too, giving it a way to receive an auctioneer other than in its terms (because terms are only for initial start of a contract).

  • Issue #7955: Our “upgrade” of Auctioneer will be making a new one and giving it to Vault Factory for liquidations. Any outstanding bids in old one will remain but won’t ever be satisfied.
    Bidders will be able to pull their bids from that one and, if desired, make them anew on the new one.

  • Issue #8079: The vaultFactory contract in master fails upgrading the vaultFactory contract deployed to mainnet (simulated in docker upgrade-test scripts). There are multiple hurdles.

@Jorge-Lopes
Copy link
Owner Author

Jorge-Lopes commented Dec 28, 2023

Open Questions:

  • What is the scope of the project?
    • extend the work made by Chris Hibbert on PR #7618
    • resolve the blockers preventing the PR to be merged
    • address all tasks listed on issue #7159
  • Bid data structure to be exposed is still the same as described above?
  • What is meant by "everyone" or "use price" options for bids list

@Jorge-Lopes Jorge-Lopes changed the title Work Plan: Expose All Bids in Vstorage Expose All Bids in Vstorage Dec 29, 2023
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

1 participant