AthanorLabs / atomic-swap

💫 ETH-XMR atomic swap implementation
GNU Lesser General Public License v3.0
345 stars 44 forks source link

Chainlink XMR price feed is gone #492

Closed dimalinux closed 1 year ago

dimalinux commented 1 year ago

The ./bin/swapcli price-feed command is returning an error right now (execution reverted). I looked into it and while the ETH/USD price feed is working, the TestGetXMRUSDPrice_mainnet test which calls pricefeed.GetXMRUSDPrice is broken.

Chainlink appears to have just removed the webpage for the feed without leaving any information on why/when it was taken down: https://data.chain.link/ethereum/mainnet/crypto-usd/xmr-usd

The price feed still exists on Optimism if we want to pull it from there: https://data.chain.link/optimism/mainnet/crypto-usd/xmr-usd

Optimism has a free https://mainnet.optimism.io RPC endpoint that is rate limited, but I imagine that the rate limit is high enough that users would not trigger it doing occasional price feed requests.

Other options would include Kraken's price feeds:

curl -s "https://api.kraken.com/0/public/Ticker?pair=XMRUSD" | jq .

Descriptions of the response field names can be found here: https://docs.kraken.com/rest/#tag/Market-Data/operation/getTickerInformation