user3953: I'm sort of running into an issue with the oracle described in the PPP.
It looks like there is race between the oracle to update the exchange rate and the users to use the exchange rate in a swap.
We could upgrade the current model so that when the oracle updates the exchange rate, a bunch of utxos with "exchange rate tokens" and the new exchange rate in their datum are created, and now, people can swap with those utxos. However, we would need a mechanism for invalidating previous exchange rate utxos when a new value is published and new "exchange rate tokens" are minted.
Is there any way to facilitate such a mechanism where old utxos are invalidated when new tokens are minted? Or any other means of invalidating those transactions?

user2285: Maybe you could add a timestamp in the utxo's datum, to set how long this utxo is valid. And after this time has passed the utxo cannot be used in a transaction except that the smart-contract can delete it.

3953: <p>I'm sort of running into an issue with the oracle described in the PPP.</p>
<p>It looks like there is race between the oracle to update the exchange rate and the users to use the exchange rate in a swap.</p>
<p>We could upgrade the current model so that when the oracle updates the exchange rate, a bunch of utxos with &quot;exchange rate tokens&quot; and the new exchange rate in their datum are created, and now, people can swap with those utxos. However, we would need a mechanism for invalidating previous exchange rate utxos when a new value is published and new &quot;exchange rate tokens&quot; are minted.</p>
<p>Is there any way to facilitate such a mechanism where old utxos are invalidated when new tokens are minted? Or any other means of invalidating those transactions?</p>
 2285: <p>Maybe you could add a timestamp in the utxo's datum, to set how long this utxo is valid. And after this time has passed the utxo cannot be used in a transaction except that the smart-contract can delete it.</p>
