Agoric / agoric-sdk

monorepo for the Agoric Javascript smart contract platform
Apache License 2.0
326 stars 205 forks source link

When replacing Auctioneer contract, existing bids survive on old auctioneer and not new one rendering them useless/ignored by system #9952

Open otoole-brendan opened 1 month ago

otoole-brendan commented 1 month ago

Describe the bug

As part of the Vaults and Auctions core eval release planning, we learnt that when we replace the auctioneer contract - the existing bids are not carried forward/propagate to new auctioneer contract. They survive on old auctioneer contract but apparently will be ignored/will not be seen by the new auctioneer contract.

The impact of this is - users would have to cancel their bids and replace them once core eval runs and new auctioneer contract is running in order for them to be picked up. This is a major user impact and not ideal expected behavior. Those bids should persist to new contract and shouldn't require the user to cancel and resubmit.

The reality is that a few number of users are likely affected in that we know of only a handful of active bidders on Inter Protocol and they are almost exclusively friendlies/internal.

To Reproduce

***I haven't actually reproduced this behavior - this is reported behavior based on @Chris-Hibbert understanding of what will happen. If I had a bid pre-Emerynet ugprade I might have been able to test it but this bug was only discovered after the fact

Expected behavior

Existing bids should persist to new auctioneer contract when auctioneer contract is replaced (and not be ignored/not visible to it)

Chris-Hibbert commented 1 month ago

When we replace an auction contract, we start up a new one with no connection to the old. If ensuring that old bids are still useable after an upgrade is important, we should prioritize the ability to upgrade auctions instead of replacing them.

Zoe would make it quite difficult to transfer bids from one auction to another. The bidder has a seat that represents the existing bid, and Zoe has no mechanism for transferring seats between contracts.

We could do a better job of supporting bidders when control is transferred to a new auction by adding a signal to the old auction telling it to shut down and refund all existing bids, but that doesn't currently exist.

dckc commented 3 weeks ago

... and Zoe has no mechanism for transferring seats between contracts ...

Not yet, but see