# Capital Raise Limit

Source: https://docs.settlemint.com/docs/compliance-security/security/compliance/capital-raise-limit
CapitalRaiseLimit module for fiat-denominated gross capital raise caps, fixed or rolling accounting windows, and PriceResolver-backed mint valuation.



The CapitalRaiseLimit module caps the gross fiat value raised through minting during a configured accounting window. DALP uses the installed PriceResolver addon to value each mint before the compliance check runs, so the cap works in fiat terms instead of token units. Configure the resolver, holder eligibility, and accounting window before operating a capped mint.

Related compliance references:

* [Compliance overview](/docs/compliance-security/security/compliance)
* [Supply and investor limits](/docs/compliance-security/security/compliance/supply-investor-limits)
* [Issuance volume limit](/docs/compliance-security/security/compliance/issuance-volume-limit)

## Where this module applies [#where-this-module-applies]

| Concern   | CapitalRaiseLimit                                              |
| --------- | -------------------------------------------------------------- |
| Minting   | Enforces gross raised fiat cap in the active window            |
| Transfers | Pass through; transfers do not change the tracker              |
| Burns     | Pass through; burns do not release capacity                    |
| Pricing   | Converts mint amount through the installed PriceResolver addon |

## When to use this module [#when-to-use-this-module]

Use `capital-raise-limit` when a token needs a periodic fundraising cap expressed in fiat value instead of token units. The module measures gross capital raised through issuance in a fixed or rolling window.

It is not:

* A token-unit issuance quota. Use [Issuance volume limit](/docs/compliance-security/security/compliance/issuance-volume-limit).
* An absolute outstanding-supply cap. Use [Supply cap](/docs/compliance-security/security/compliance/supply-cap-collateral).
* A net-outstanding-value control; burns do not release capacity.

## Prerequisites [#prerequisites]

Before you enable `capital-raise-limit`, the asset program needs three pieces in place:

* A PriceResolver addon on the same system as the token. The compliance install flow resolves this server side; operators do not paste the resolver address into the form.
* A usable base price for the token. Prefer a token-specific PriceResolver feed before minting. Deployments that intentionally use identity claim fallback must give the token an identity and a base-price claim for the configured price topic.
* A mint recipient that can pass the token compliance policy. Issuer, treasury, fund, vessel, or SPC wallets still need holder registration, OnchainID, and the required claims when they receive minted units.

## Configuration [#configuration]

```solidity
struct RaiseLimitConfig {
    uint256 maxSupply;      // Maximum gross raised fiat in the window, normalized to 18 decimals.
    uint256 periodLength;   // Window length in days. Must be 1..730.
    bool    rolling;        // true = rolling window, false = fixed window.
    address priceResolver;  // Injected by dapi from the installed PriceResolver addon.
    uint256 priceTopicId;   // Injected by dapi; defaults to keccak256("basePrice").
}
```

| Field           | Client supplied? | Mutable after install? | Notes                                                                       |
| --------------- | ---------------- | ---------------------- | --------------------------------------------------------------------------- |
| `maxSupply`     | Yes              | No                     | Maximum gross raised fiat in the window, stored as 18-decimal fiat.         |
| `periodLength`  | Yes              | No                     | Window length in days. The module rejects `0` and values above `730`.       |
| `rolling`       | Yes              | No                     | Chooses rolling-window or fixed-window accounting.                          |
| `priceResolver` | No               | No                     | Resolved and injected by the DALP API from the indexed PriceResolver addon. |
| `priceTopicId`  | No               | No                     | Resolved and injected by the DALP API, defaulting to the `basePrice` topic. |

Installed configuration is immutable. The dapp disables the form once the module is enabled and shows a notice that a different configuration requires deploying a new module instance.

## Operator flow [#operator-flow]

1. Install or verify the PriceResolver addon for the system.
2. Add a token-specific base-price feed, or prepare the token identity and base-price claim when claim fallback is part of the deployment model.
3. Enable `capital-raise-limit` with `maxSupply`, `periodLength`, and `rolling`. DALP injects the resolver address and price topic during the install request.
4. Register the mint recipient and issue the compliance claims required by the token policy. Supply Management permission only authorizes the mint operation; it does not make the receiving wallet eligible.
5. Mint only after token price resolution and holder eligibility both pass.

## PriceResolver prerequisite [#priceresolver-prerequisite]

`capital-raise-limit` requires a `PriceResolver` addon on the same system. The dapp checks the addon factory list for `typeId: "price-resolver"` and shows a warning only when the lookup succeeds and confirms the addon is missing.

Clients do not provide a resolver address. During current compliance install flows, the DALP API resolves the PriceResolver addon address for the token's system. It then merges the address into the compliance parameters and injects the default price topic ID `keccak256("basePrice")` before ABI encoding.

If the DALP API cannot find a PriceResolver addon for the system, the install request fails with `TOKEN_COMPLIANCE_PRICE_RESOLVER_ADDON_NOT_INSTALLED` (`DALP-0474`). The error maps to HTTP 409 (`CONFLICT`) and gives SDK and frontend clients a stable typed error to branch on. This prevents deployment with an absent resolver. The contract also rejects zero `priceResolver` and zero `priceTopicId` during config validation.

## Accounting [#accounting]

The module enforces only on mints (`from == address(0)`). For each mint, it calls `PriceResolver.getBasePrice(token, priceTopicId)` and converts the raw token amount into 18-decimal fiat using the token decimals. The mint is allowed only when the active-window gross total plus the new fiat amount stays within `maxSupply`.

| Mode    | Tracker                                                                         | Rollover behavior                                                                                   |
| ------- | ------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| Fixed   | Single current-period total with `periodStart`.                                 | When the period elapses, the current raised fiat reads as `0`; the next mint starts a fresh period. |
| Rolling | 730-slot circular daily buffer keyed by day, summed over the configured window. | Daily slots age out as time advances.                                                               |

Burns and regular transfers do not change the raised-fiat tracker. A burn therefore cannot make room for additional issuance in the same window.

## Failure behavior [#failure-behavior]

The module fails closed when pricing is not usable. A mint check fails if the resolver address is zero, if the resolver returns a zero or negative price, or if the resolver call itself reverts. A mint that would exceed the configured raise cap reverts with the module's raise-limit compliance reason.

| Failure                                                             | What it means                                                                                  | What to check                                                                                                                   |
| ------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| `TOKEN_COMPLIANCE_PRICE_RESOLVER_ADDON_NOT_INSTALLED` (`DALP-0474`) | The system has no indexed PriceResolver addon for the token system during module installation. | Install or index the PriceResolver addon before enabling the module.                                                            |
| `DALP-3027` (`NoClaimFallback`)                                     | PriceResolver could not resolve a usable base price for the token.                             | Check the token-specific base-price feed first. If claim fallback is intended, check token identity and base-price claim setup. |
| Raise-limit compliance revert                                       | The mint would push the active window above `maxSupply`.                                       | Review the active fixed or rolling window total before retrying with a smaller amount or after the window advances.             |
| Recipient compliance failure                                        | The mint recipient does not satisfy the token compliance policy.                               | Check holder registration, OnchainID, trusted issuers, and required claims for the recipient wallet.                            |

For an issuer or treasurer wallet to receive a capital-raise-limited mint, three checks must be true before retrying:

1. The operator submitting the mint has the asset's **Supply Management** role.
2. The recipient wallet has a registered OnchainID identity and the identity claims required by the token's compliance policy.
3. The trusted issuer for each required claim topic is configured before the claim is issued.

For vessel, fund, or SPC tokenization, model the issuer and treasurer as separate participants when their responsibilities differ. Give the mint operator Supply Management permission on the token. Register the issuer or treasury wallet as a holder only when it must receive the initial supply, then issue the same recipient eligibility claims that apply to other holders. See [mint assets in the console](/docs/operators/user-guides/asset-servicing/mint-assets), [onboard a user](/docs/operators/user-guides/runbooks/onboard-user-im), and [configure trusted issuers](/docs/operators/user-guides/compliance/configure-trusted-issuers) for the operator, identity, and claim-policy setup.

If a mint fails with `DALP-3027` (`NoClaimFallback`), the PriceResolver could not resolve a usable base price for the token. Do not treat this as proof that the issuer, treasurer, or recipient permissions are wrong. Check the permission and claim-policy prerequisites first, then treat `DALP-3027` as token pricing setup work before retrying the mint:

1. Prefer an active token-specific base-price feed in the PriceResolver feeds directory.
2. If your deployment intentionally uses claim fallback, make sure the token address has an identity in the identity registry.
3. Add a base-price claim for the configured price topic on the token identity.
4. Retry the mint only after the token price can be resolved.

The indexed token price API is feed-based. Use [token price resolution](/docs/developers/developer-guides/api-integration/token-price-resolution) to check feed-backed price availability and conversion paths before operating a capital-raise-limited mint.
