temporary_redemption_discount
Documentation for eth_defi.yield_basis.metrics.temporary_redemption_discount function.
- temporary_redemption_discount(raw_preview_shares, raw_redemption_assets, raw_price_per_share, *, asset_decimals, pps_scale=1000000000000000000, share_scale=1000000000000000000)
Return temporary redemption discount relative to fundamental PPS.
A negative value means the previewed exit is below fundamental value. The preview is required because the primary curve must not substitute fundamental value and mix two accounting bases.
- Parameters
raw_preview_shares (int) – Raw LT units supplied to
preview_withdraw.raw_redemption_assets (int) – Raw underlying units returned by the preview.
raw_price_per_share (int) – Raw fundamental LT PPS from the same block.
asset_decimals (int) – ERC-20 decimals of the underlying asset.
pps_scale (int) – LT PPS fixed-point scale.
share_scale (int) – LT share fixed-point scale.
- Returns
Redemption-to-fundamental relative difference.
- Return type