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 approve call 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 minSharesOut parameter 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 least minSharesOut shares, or the request will fail the slippage check.

circle-info

Events

The creation of a Subscription request results in the emission of a SubscriptionRequest event containing the corresponding request ID and expiry time.

Subscription flow example, with USDC as subscription token.

Last updated