Closed bh2smith closed 5 years ago
Good catch. I think we were lazy here and just reused the same field. We should fix this and add a separate field for the solution on the auction struct.
We should fix this and add a separate field for the solution on the auction struct.
Yes, I agree although this will be slightly more work to refactor (since we are currently using the PendingBatch
struct from the base contract).
Oh yeah, this is definitely a hack and needs to be changed.
Notice that the
orderHash
is overwritten (by the auction solution) upon successful call ofapplyAuction
. This is needed for the purpose of snarks (and maybe for on-chain verification), but will also become problematic when implementing rollbacks. Also, I would imagine, that both the order has and solution information are necessary to be kept in storage until finalization...https://github.com/gnosis/dex-contracts/blob/c012ee98e6034d1eaaf8445b92803429004c719c/contracts/SnappAuction.sol#L217-L218
Just wondering if we might want to take these facts into consideration.