asset_usd_price

Documentation for eth_defi.yield_basis.metrics.asset_usd_price function.

asset_usd_price(raw_price, *, oracle_scale=1000000000000000000)

Convert the Curve pool oracle to assumed USD per native asset.

The reviewed pools quote coin 1, the BTC or ETH asset, in coin 0 crvUSD. The integration treats that stable-side quote as one USD for its generic USD comparison; crvUSD remains protocol plumbing, not the investor-facing denomination token.

Parameters
  • raw_price (int) – Raw Curve price_oracle() value.

  • oracle_scale (int) – Fixed-point scale verified for the deployed pools.

Returns

Assumed USD value of one whole native asset.

Return type

decimal.Decimal