VaultProxy, which are stored in its state as
VaultProxy, e.g., via a trade or DeFi action in an
IntegrationManageradapter or when withdrawing assets from an external position into the
IntegrationManageractions (each with its own policy hook), though the denomination asset of a fund is always a tracked asset.
ExternalPositionProxyinstances, which are not ERC20-compliant and are not divisible. These positions can hold valued assets themselves (e.g., Compound cTokens that serve as collateral for a CDP) or simply represent ownership of a position where value is held outside of the protocol, e.g., Uniswap v3 LP positions or staked assets.
VaultProxythat are not included in "tracked assets" state.
COMPaccrued for lending and borrowing on Compound.
ComptrollerProxy.buyShares()with an amount of the denomination asset to deposit, and the
ComptrollerProxytransfers the denomination asset amount into the
VaultProxy, where it is absorbed into the holdings. Shares are then minted to the depositor relative to the current share price.
ComptrollerProxy.buySharesOnBehalf()used by peripheral contracts (i.e., the
DepositWrapper) that wrap end-user actions during a deposit, such as trading from AssetA into the denomination asset and then depositing. It is important to carefully gate access to depositing on behalf of others, so as to not expose a griefing attack due to the
sharesActionTimelock(see "Transfers" below).
PolicyHook.PostBuyShares) and two fee hooks (
FeeHook.PostBuyShares) that run during the common
__buyShares()logic shared by these two functions, allowing policies to validate the buyer and investment amount and fees to be charged prior to and immediately after changes to the fund holdings and shares supply.
_recipientreceives a proportionate slice of the ERC20 assets in the
VaultProxy, relative to the amount of shares being redeemed.
VaultProxy, but the redeemer can specify tracked assets to ignore (i.e., forfeit) or untracked assets to include (i.e., ERC20 tokens that belong to the
VaultProxybut are not "tracked assets").
VaultProxy, and forfeit the claim to value held in external positions.
VaultProxy's ERC20 holdings along with the relative values of each to receive (for a total of 100%).
PolicyHook.RedeemSharesForSpecificAssetsto define, for example, limits on assets that can be redeemed for.
redeemSharesInKind(), this option pays the redemption
_recipienttheir owed proportion of value inclusive of value stored in external positions. This function should thus be used as the canonical method of redemption for any fund that uses external positions.
sharesActionTimelock, which defines the number of seconds that must pass after UserA's last receipt of shares via deposit, before being allowed to either redeem or transfer any shares.
PolicyHook.PreTransferSharesenables policies to validate the conditions of a transfer (e.g., a whitelist of allowed recipients)
freelyTransferableSharesconfig option on the
VaultProxy. This configuration option will not run
PolicyHook.PreTransferSharesupon shares transfer, and will persist between migrations and reconfigurations. Once set, it cannot be unset.