OpenEndFundClass

Git Source

Inherits: IssuedAsset, IOpenEndFundClass

Author: CapSign Inc.

Inherits from IssuedAsset to represent investment fund interests. Uses a global NAV ratio to adjust the "real" quantity of each lot without updating each lot individually.

State Variables

uint96 public navNumerator = 1;
uint96 public navDenominator = 1;

Functions

updateNAV

Updates the global NAV ratio. Example: If NAV doubles, set (num, den) = (2, 1). If it increases by 10%, set (num, den) = (110, 100).

function updateNAV(uint96 num, uint96 den) external;

getRealQuantity

Returns the "real" quantity for a given lot, factoring in the global NAV ratio. E.g., if raw=100, navNumerator=110, navDenominator=100 => real=110.

function getRealQuantity(bytes32 lotId) public view returns (uint96);

redeemFundInterest

Example redemption function, letting an owner reduce the quantity of a lot by a certain "real" amount. We convert real -> raw and call a partial transfer to a "null" address or do an "adjustLot" approach. This is a demonstration of how you might handle redemptions.

function redeemFundInterest(bytes32 lotId, uint96 realAmount) external;

Last updated

Was this helpful?