Subscription request
Fund subscriptions are performed just like you would expect from a standard deposit action:
Approve subscription asset spending
The first step is to allow the shares contract to transfer the chosen asset.
It is performed with a standard ERC20
approvecall on the asset's smart contract.
Create the subscription request
The second step is a simple function call on the shares contract:
requestSubscription(uint256 assetsIn, uint256 minSharesOut, address subscriptionAsset, address receiver)To calculate
minSharesOut, make sure to check Calculate share price.Important: The
minSharesOutparameter provides slippage protection. The actual number of shares minted will be calculated by the operator using the current share price at processing time. The operator's price must result in at leastminSharesOutshares, or the request will fail the slippage check.
Events
The creation of a Subscription request results in the emission of a SubscriptionRequest event containing the corresponding request ID and expiry time.

Last updated