rate records every RatePosted event from the KeeperFxOracle: one row per code per post. The latest row per code is also copied onto currency.lastRate, so query this table when you need history rather than the current value.
Fields
Index:
(code, publishTime). Filter on code and order by publishTime.
code is the hex form, so encode the ASCII code first (see currency codes). INR is 0x494e520000000000000000000000000000000000000000000000000000000000. USD is never posted; its rate is fixed at 1e18.
Examples
Rate history for one currency, newest first:post):
curl:
Reading rates
rate / 1e18is the number of currency units per US dollar. A JPY value of149800000000000000000is 149.8 JPY per USD.- Freshness is judged against
publishTime, not the block time. The keeper oracle treats a rate as fresh for two hours and usable at the higher stale fee for five days; after that mint, redeem andvault.status()revert until a new post arrives. The oracles page has the windows and the rules. - The keeper re-posts an unchanged rate hourly as a heartbeat, so consecutive rows with the same
rateare expected. - A single post cannot move a rate by more than the oracle’s
maxMoveBps(15% on the current deployments); a larger move takes several posts. currency.lastRateis only updated for codes the registry lists. A code that appears here but not incurrencyswas posted by the keeper without being registered.