This UMIP introduces a new price identifier called PUNKETH-1221 for a token referred to as uPUNKS. The token is a synthetic index based on the recent trading prices of CryptoPunks. The previous price identifiers PUNKETH and PUNKETH_TWAP found in UMIP 84 are not being re-used due to the fact that the EMP contract cannot use ancilliary data and without that we cannot create multiple overlapping uPUNK contracts. The logic of the previous price identifiers is being mostly re-used with variable timestamps instead of seperate price identifiers.
The structure of this price identifier mimics (in some ways) the ones created for uGAS (UMIP 16, UMIP 20, UMIP 22)
The DVM should support requests for a price that resolves to either the median most recent purchase price (in ETH) of each unique CryptoPunk traded in the last 30 days, or a 2-hour Time-Weighted Average Price (TWAP) of the highest volume Uniswap or sushiswap ETH/uPUNK pool (for a specified iteration of uPUNK, i.e. uPUNK-1221). The price resolution method to use will depend on the the timestamp the price request was made at.
For a price request made at or after the Unix timestamp 1640995200 (January 1, 2022 00:00:00 UTC), the price will be resolved with the median most recent purchase price (in ETH) of each unique CryptoPunk traded in the last 30 days. Full logic for this change is embedded in the Implementation section below.