For the complete documentation index, see llms.txt. This page is also available as Markdown.

wARS

Prices wARS by INVERTING a Chainlink USD/ARS feed — the only feed direction available for the asset.

Prices wARS ("Peso Argentino") by inverting a Chainlink USD / ARS feed:

price = 1e8 × 10^feedDecimals / answer
  • Chain: Ethereum

  • Rate feed: Chainlink USD / ARSdescription() == "USD / ARS", 8 decimals

  • Source: InvertedChainlinkCustomPriceFeed.sol

This is a generic inverter, not a wARS-specific contract: use it for any asset whose only Chainlink coverage is quoted the wrong way round.


Why an inverting contract is necessary

There is more than one ARS feed on mainnet. An earlier revision of this contract's own documentation asserted that the inverted feed was the only one; that was false and was caught in review. A direct ARS / USD feed also exists. The inverted feed is the one KPK uses, and the choice is deliberate rather than forced — recorded here because the stronger claim is the kind that gets repeated.


Safety properties

  • Division last. The inversion computes 1e8 × 10^feedDecimals first and divides by the answer at the end, so precision is not lost to an early truncation.

  • Runtime band. MIN_ANSWER / MAX_ANSWER bound the raw feed answer. An answer outside the band is rejected rather than inverted — without it, an answer near zero would invert to an unbounded price.

  • Feed shape re-checked per read. The feed's unit and decimals are cached at construction and re-asserted on every read, so a feed that changes shape underneath the contract fails closed.

  • BASE_ASSET is address(0). The inversion produces USD directly and composes with nothing, so there is no base-asset leg to get wrong.

Last updated