> For the complete documentation index, see [llms.txt](https://8bit-1.gitbook.io/solibrary/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://8bit-1.gitbook.io/solibrary/redeemed-amount-guard.md).

# Redeemed Amount Guard

This guard becomes more interesting when used with [Guard Groups](https://developers.metaplex.com/core-candy-machine/guard-groups) since it allows us to add global minting thresholds to our groups.

once that amount of

Assets have been minted

Minting will fail

Core Candy Machine

Owner: Core Candy Machine Core Program

Core Candy Guard

Owner: Core Candy Guard Program

GuardsRedeemedAmount- maximum...

Mint from

*Core Candy Guard Program*

Access Control

Mint from

*Core Candy Machine Program*

Mint Logic

Asset

[React Flow](https://reactflow.dev/)

### Guard Settings <a href="#guard-settings" id="guard-settings"></a>

The Redeemed Amount guard contains the following settings:

* **Maximum**: The maximum amount of NFTs that can be minted.

Set up a Core Candy Machine using the Redeemed Amount Guard

JavaScript

```
create(umi, {
  // ...
  itemsAvailable: 500,
  guards: {
    redeemedAmount: some({ maximum: 300 }),
  },
});
```

Notice that, even if the Candy Machine contains 500 items, only 300 of these items will be mintable because of this guard.

Thus, this guard becomes more useful when using [Guard Groups](https://developers.metaplex.com/core-candy-machine/guard-groups). Here’s another example using two groups such that the first 300 Assets can be minted for 1 SOL but the last 200 will need 2 SOL to mint.

Using the Redeemed Amount Guard with groups example

JavaScript

```
create(umi, {
  // ...
  itemsAvailable: 500,
  groups: [
    {
      label: "early",
      guards: {
        redeemedAmount: some({ maximum: 300 }),
        solPayment: some({ lamports: sol(1), destination: treasury }),
      },
    },
    {
      label: "late",
      guards: {
        solPayment: some({ lamports: sol(2), destination: treasury }),
      },
    },
  ],
});
```

### Mint Settings <a href="#mint-settings" id="mint-settings"></a>

*The Redeemed Amount guard does not need Mint Settings.*

### Route Instruction <a href="#route-instruction" id="route-instruction"></a>

*The Redeemed Amount guard does not support the route instruction.*
