frontend-monorepo icon indicating copy to clipboard operation
frontend-monorepo copied to clipboard

Spike: subsets of "opening auction"

Open ckpringle opened this issue 2 years ago • 2 comments

Spike

Can we derive whether an opening auction is open because it hasn't finished or because it didn't have the necessary liquidity at the end of the auction period?

Answer = Yes you can

How?

Call the governance API for the market - on the governance API the proposal ID is the same as the market ID of the market that is eventually created so that part is simple.

Example below is from fairground.

https://api.n06.testnet.vega.xyz/api/v2/governance?proposalId=de48ad0adc668a80a074e790d118b6a64fa4909fc60ebbc2c335be3b675fec93

In there you will fine the enactmentTimestamp

Then simply:

If status = opening auction and TODAY > enactmentTimestamp then status = Opening Auction : Not enough liquidity to open else status = Opening Auction : Closing on enactmenttimestamp

Tasks

  • [x] Verify that market open timestamp doesn't exist if a market hasn't gotten past opening auction status
  • [x] Identify what that means to how we present market status?
  • [ ] Ticket the outcome

ckpringle avatar Nov 24 '22 09:11 ckpringle

Re: task 1 ... the answer is currently market open timestamp has a bug... it is defaulting to the date the market is created, when it should be blank until it actually OPENS.

Even if that is fixed though, I dont think it helps us becaue on th market timestamps

proposed = proposed on pending = vote closing date open = SHOULD BE when trading opens

There's nothing in there for the enacted date .... so we'd be able to tell that a vote had closed and therefore a market was in auction ... but we have nothing here that shows us when it should come out of auction.

So there's no option ... we need to use the governance api instead.

JonRay15 avatar Nov 24 '22 10:11 JonRay15

Unassigning this from me since the design spike is complete and I've defined the proposed design.

JonRay15 avatar Dec 06 '22 11:12 JonRay15