OpenEndFundManager
Author: CapSign Inc.
Manages an open-ended fund by orchestrating subscriptions and redemptions at NAV, calling updateNAV on the registry, and controlling windows for liquidity.
State Variables
fundRegistry
OpenEndFundClass public fundRegistry;
subscriptionsOpen
bool public subscriptionsOpen = true;
redemptionsOpen
bool public redemptionsOpen = true;
acceptedToken
address public acceptedToken;
Functions
constructor
constructor(address registryAddress, address token);
subscribe
Allows an investor to subscribe by sending in tokens.
function subscribe(uint256 amount, uint96 costBasis) external;
Parameters
Name
Type
Description
amount
uint256
The amount of stablecoins to invest.
costBasis
uint96
The cost basis per share (if relevant).
redeem
Allows an investor to redeem shares for stablecoins, if redemptions are open.
function redeem(bytes32 lotId, uint96 realQuantity) external;
Parameters
Name
Type
Description
lotId
bytes32
The ID of the lot to redeem from.
realQuantity
uint96
The number of shares (in "real" quantity) to redeem.
updateNav
Updates the NAV ratio in the underlying registry, e.g., daily or monthly. In a real scenario, 'num' and 'den' might come from an oracle or off-chain calculation.
function updateNav(uint96 num, uint96 den) external;
toggleSubscriptions
function toggleSubscriptions(bool open) external;
toggleRedemptions
function toggleRedemptions(bool open) external;
Events
Subscribed
event Subscribed(address indexed investor, uint256 amount, uint256 sharesCreated);
Redeemed
event Redeemed(address indexed investor, uint256 sharesRedeemed, uint256 amountOut);
NavUpdated
event NavUpdated(uint96 navNum, uint96 navDen);
Last updated
Was this helpful?