|
October 23, 2016, 07:07:20 PM |
|
I took advantage of my time off to write a bunch of new code.
iguana notary dapp now generates a pricefeed and the miner puts the pricefeed into the mined tx as an opreturn, about 150 bytes per block.
komodod then uses this data to generate consensus prices for any combination of 32 fiats as of any height: { "USD", "EUR", "JPY", "GBP", "AUD", "CAD", "CHF", "NZD", "CNY", "RUB", "MXN", "BRL", "INR", "HKD", "TRY", "ZAR", "PLN", "NOK", "SEK", "DKK", "CZK", "HUF", "ILS", "KRW", "MYR", "PHP", "RON", "SGD", "THB", "BGN", "IDR", "HRK" };
./komodo-cli paxprice eur gbp 37750 { "base" : "eur", "rel" : "gbp", "height" : 37750, "price" : 0.88864077 }
./komodo-cli paxprice eur gbp 38000 { "base" : "eur", "rel" : "gbp", "height" : 38000, "price" : 0.88837559 }
There are almost 1000 combinations of 32 currencies, if you count both directions. base is the starting currency, rel is the ending. So with the eur/gbp above, each EUR gets 0.888... GBP
paxprice is the first RPC I added to komodod, but it wont be the last. I will writeup another whitepaper draft about PAX tech as it does get quite involved.
|