|
| 1 | +--- |
| 2 | +title: Direct Minting |
| 3 | +description: Understand how direct minting works in FAssets. |
| 4 | +keywords: [fassets, xrp, flare-network, direct-minting] |
| 5 | +--- |
| 6 | + |
| 7 | +Direct minting allows users to mint FAssets by creating a single transaction on the underlying chain, bypassing the multi-step [collateral reservation process](/fassets/minting#minting-process) of standard minting. |
| 8 | +This feature is currently available only for XRP. |
| 9 | + |
| 10 | +## How It Works |
| 11 | + |
| 12 | +The minter creates a payment transaction on the underlying chain (XRPL) to the [Core Vault](/fassets/core-vault) address, not to an individual agent's address. |
| 13 | +The transaction identifies the minting parameters (recipient and executor) through either a **destination tag** or a **memo field**. |
| 14 | + |
| 15 | +An **executor** then calls `executeDirectMinting` on the Flare side to finalize the mint. |
| 16 | +The executor is paid a fee upon successful completion. |
| 17 | + |
| 18 | +## Identifying Minting Parameters |
| 19 | + |
| 20 | +There are two ways to specify the minting recipient and executor in a direct minting payment. |
| 21 | + |
| 22 | +### Destination Tag |
| 23 | + |
| 24 | +XRPL transactions natively support a **destination tag**, a 32-bit integer. |
| 25 | +The `MintingTagManager` contract on Flare acts as a registry that maps these destination tags to Flare-side parameters: the minting recipient and the preferred executor. |
| 26 | + |
| 27 | +The tag on the XRPL side and the tag registered in `MintingTagManager` on Flare are the same tag. |
| 28 | +The Flare contract gives the XRPL tag its meaning in the FAsset system. |
| 29 | +This path is convenient for repeated use, such as an exchange or service that regularly mints. |
| 30 | + |
| 31 | +### Memo Field |
| 32 | + |
| 33 | +Instead of a tag, the minter can encode the recipient and executor directly in a 48-byte memo field on the XRPL payment: |
| 34 | + |
| 35 | +1. **8-byte prefix**: `0x4642505266410021` (`DIRECT_MINTING_EX`) |
| 36 | +2. **20-byte recipient address** |
| 37 | +3. **20-byte executor address** |
| 38 | + |
| 39 | +No reservation is needed, but the memo must be constructed for each payment. |
| 40 | + |
| 41 | +## Minting Tag Manager |
| 42 | + |
| 43 | +The `MintingTagManager` contract on Flare manages the reservation and ownership of XRPL destination tags for direct minting. |
| 44 | + |
| 45 | +- Users reserve destination tags by paying a reservation fee in native currency (FLR/SGB). |
| 46 | + The fee exists because the XRPL destination tag space is limited to 32-bit integers, and without a cost, someone could squat on all available tags. |
| 47 | +- Tags are assigned sequentially. |
| 48 | + The user always receives the next available tag. |
| 49 | +- The contract implements the **ERC-721** (NFT) interface, so reserved tags can be transferred or resold. |
| 50 | +- Tag owners can set a minting recipient with `setMintingRecipient` and a preferred executor with `setAllowedExecutor`. |
| 51 | +- On initial reservation and tag transfer, the recipient resets to the new owner and the executor resets to the zero address. |
| 52 | + |
| 53 | +## Executor Restrictions |
| 54 | + |
| 55 | +Executors can be restricted in three ways depending on the minting method: |
| 56 | + |
| 57 | +1. **Tag-based:** The tag manager's `setAllowedExecutor` method defines the allowed executor. |
| 58 | + If set to the zero address, anyone can execute. |
| 59 | +2. **Memo-based:** The 48-byte memo format encodes the executor address directly. |
| 60 | + If the executor address is the zero address, anyone can execute. |
| 61 | +3. **Smart account:** The smart account manager may restrict the executor. |
| 62 | + The asset manager passes every request through. |
| 63 | + |
| 64 | +If the preferred executor does not act within `othersCanExecuteAfterSeconds`, anyone can execute the minting. |
| 65 | + |
| 66 | +## Rate Limits |
| 67 | + |
| 68 | +Direct minting has multiple rate-limiting safeguards to protect against compromises, such as FDC exploits. |
| 69 | + |
| 70 | +| Limit | Description | |
| 71 | +| :-------------------------------------- | :---------------------------------------------------- | |
| 72 | +| `directMintingHourlyLimitUBA` | Hourly minting cap | |
| 73 | +| `directMintingDailyLimitUBA` | Daily minting cap | |
| 74 | +| `directMintingLargeMintingThresholdUBA` | Threshold above which a minting is considered "large" | |
| 75 | +| `directMintingLargeMintingDelaySeconds` | Automatic delay for large mintings | |
| 76 | + |
| 77 | +Rate limits **throttle** rather than reject. |
| 78 | +When limits are hit, further mintings are delayed proportionally to the accumulated backlog. |
| 79 | +Large mintings above the threshold are delayed independently by a fixed duration. |
| 80 | + |
| 81 | +Delayed mintings emit the `DirectMintingDelayed` event instead of `DirectMintingExecuted`, with an `executionAllowedAt` timestamp. |
| 82 | +Governance can unblock delayed mintings via `unblockDirectMintingsUntil`, but only for past timestamps and after manual review. |
| 83 | + |
| 84 | +If a preferred executor's minting is delayed, their exclusive execution window restarts from `executionAllowedAt`. |
| 85 | + |
| 86 | +:::tip[What's next] |
| 87 | + |
| 88 | +Learn more about the different components and processes involved in FAssets - [standard minting](/fassets/minting), [redemptions](/fassets/redemption), [collateral](/fassets/collateral), [liquidations](/fassets/liquidation), and [Core Vault](/fassets/core-vault). |
| 89 | + |
| 90 | +::: |
0 commit comments