> For the complete documentation index, see [llms.txt](https://docs.kpk.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kpk.io/funds/infrastructure/core-concepts/subscriptions.md).

# Subscriptions

A subscription is a **user's request to enter the fund** by depositing an approved asset (for example USDC) in exchange for **newly minted shares** priced against the current NAV.

<figure><img src="/files/q1vN9uk4xvwiVsrGVKLX" alt="Subscription flow: an investor requests a subscription, assets are escrowed, the operator settles at a price, and shares are minted while assets move to the Portfolio Safe."><figcaption><p>The subscription lifecycle.</p></figcaption></figure>

## Lifecycle

{% stepper %}
{% step %}
**Request.** After approving the asset, the investor calls `requestSubscription(assetsIn, minSharesOut, subscriptionAsset, receiver)`. The deposited assets are pulled into **escrow** inside the `kpkShares` contract, a `PENDING` request is recorded, and a `SubscriptionRequest` event is emitted with the request id. `minSharesOut` is **slippage protection** — the actual shares are computed at settlement time. `receiver` may differ from the investor.
{% endstep %}

{% step %}
**Settlement.** An operator calls `processRequests(approveIds, rejectIds, asset, sharesPrice)`. For each approved subscription it computes `shares = assetsToShares(assetAmount, sharesPrice, asset)`, checks `shares ≥ minSharesOut`, **mints** the shares to the `receiver`, and transfers the escrowed assets to the **Portfolio Safe** (portfolio). The request becomes `PROCESSED` and `SubscriptionApproval` is emitted.
{% endstep %}

{% step %}
**Or rejection / expiry.** An operator can reject a request (`SubscriptionDenial`), returning the escrowed assets to the investor. Any request older than its 7-day lifetime is skipped during processing and auto-rejected (`SubscriptionRequestExpired`), also returning the assets.
{% endstep %}

{% step %}
**Or cancellation.** While still `PENDING`, the investor or receiver can cancel after the request's TTL has elapsed (`cancelSubscription(id)`), recovering the escrowed assets. See [Cancel a request](/funds/integration/cancel-a-request.md).
{% endstep %}
{% endstepper %}

A request moves through exactly one terminal state: `PROCESSED`, `REJECTED`, or `CANCELLED`.

## The request event

```solidity
event SubscriptionRequest(
    address indexed investor,
    uint256 requestId,
    address indexed receiver,
    address indexed subscriptionAsset,
    uint256 assetsAmount,
    uint256 sharesAmount,   // the minSharesOut at request time
    uint64  timestamp,
    uint64  cancelableFrom, // timestamp + subscriptionRequestTtl
    uint64  expiryAt        // timestamp + 7 days
);
```

`cancelableFrom` is when the investor may cancel; `expiryAt` is when the request can no longer be approved. See [Subscription request](/funds/integration/subscription-request.md) for integration code, and [Fees](/funds/infrastructure/core-concepts/fees.md) for the management/performance fees charged during settlement.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.kpk.io/funds/infrastructure/core-concepts/subscriptions.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
