Skip to main content

JBCashOuts

Git Source

Cash out calculations.

Functions​

cashOutFrom​

Returns the amount of surplus terminal tokens which can be reclaimed based on the total surplus, the number of tokens being cashed out, the total token supply, and the ruleset's cash out tax rate.

function cashOutFrom(
uint256 surplus,
uint256 cashOutCount,
uint256 totalSupply,
uint256 cashOutTaxRate
)
internal
pure
returns (uint256);

Parameters

NameTypeDescription
surplusuint256The total amount of surplus terminal tokens.
cashOutCountuint256The number of tokens being cashed out, as a fixed point number with 18 decimals.
totalSupplyuint256The total token supply, as a fixed point number with 18 decimals.
cashOutTaxRateuint256The current ruleset's cash out tax rate.

Returns

NameTypeDescription
<none>uint256reclaimableSurplus The amount of surplus tokens that can be reclaimed.