|
| 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 | +## Fees |
| 19 | + |
| 20 | +Direct minting charges two fees, both deducted from the underlying payment amount: |
| 21 | + |
| 22 | +- **Minting fee**: A percentage of the received amount (in BIPS), with a minimum floor. |
| 23 | + This fee is paid to a governance-configured fee receiver. |
| 24 | + If the payment is smaller than the minimum minting fee, no FAssets are minted and the entire payment goes to the fee receiver. |
| 25 | +- **Executor fee**: A flat fee in the underlying asset, paid to the executor who finalizes the minting. |
| 26 | + The minting fee takes priority: if the payment only covers the minting fee, the executor receives nothing. |
| 27 | + |
| 28 | +## Identifying Minting Parameters |
| 29 | + |
| 30 | +There are two ways to specify the minting recipient and executor in a direct minting payment. |
| 31 | + |
| 32 | +### Destination Tag |
| 33 | + |
| 34 | +XRPL transactions natively support a **destination tag**, a 32-bit integer. |
| 35 | +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. |
| 36 | + |
| 37 | +The tag on the XRPL side and the tag registered in `MintingTagManager` on Flare are the same tag. |
| 38 | +The Flare contract gives the XRPL tag its meaning in the FAsset system. |
| 39 | +This path is convenient for repeated use, such as an exchange or service that regularly mints. |
| 40 | + |
| 41 | +### Memo Field |
| 42 | + |
| 43 | +Instead of a tag, the minter can encode the minting parameters directly in the memo field on the XRPL payment. |
| 44 | +There are two supported formats: |
| 45 | + |
| 46 | +**32-byte memo** (recipient only): |
| 47 | + |
| 48 | +A standard direct minting payment reference that encodes only the 20-byte recipient address. |
| 49 | +Anyone can execute, as no executor is specified. |
| 50 | + |
| 51 | +**48-byte memo** (recipient and executor): |
| 52 | + |
| 53 | +1. **8-byte prefix**: `0x4642505266410021` (`DIRECT_MINTING_EX`) |
| 54 | +2. **20-byte recipient address** |
| 55 | +3. **20-byte executor address** |
| 56 | + |
| 57 | +If the executor address is the zero address, anyone can execute. |
| 58 | + |
| 59 | +No reservation is needed for either format, but the memo must be constructed for each payment. |
| 60 | + |
| 61 | +## Minting Tag Manager |
| 62 | + |
| 63 | +The `MintingTagManager` contract on Flare manages the reservation and ownership of XRPL destination tags for direct minting. |
| 64 | + |
| 65 | +- Users reserve destination tags by paying a reservation fee in native currency (FLR/SGB). |
| 66 | + 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. |
| 67 | +- Tags are assigned sequentially. |
| 68 | + The user always receives the next available tag. |
| 69 | +- The contract implements the **ERC-721** (NFT) interface, so reserved tags can be transferred or resold. |
| 70 | +- Tag owners can set a minting recipient with `setMintingRecipient` and a preferred executor with `setAllowedExecutor`. |
| 71 | + Executor changes are not immediate: the new executor becomes active after a 10-minute cooldown to protect in-flight FDC proofs. |
| 72 | +- On initial reservation and tag transfer, the recipient resets to the new owner and the executor resets to the zero address. |
| 73 | + |
| 74 | +## Executor Restrictions |
| 75 | + |
| 76 | +Executors can be restricted in three ways depending on the minting method: |
| 77 | + |
| 78 | +1. **Tag-based:** The tag manager's `setAllowedExecutor` method defines the allowed executor. |
| 79 | + If set to the zero address, anyone can execute. |
| 80 | +2. **Memo-based:** The 48-byte memo format encodes the executor address directly. |
| 81 | + The 32-byte memo format does not specify an executor, so anyone can execute. |
| 82 | + If the executor address in the 48-byte format is the zero address, anyone can also execute. |
| 83 | +3. **Smart account:** The smart account manager may restrict the executor. |
| 84 | + The asset manager passes every request through. |
| 85 | + |
| 86 | +If the preferred executor does not act within `othersCanExecuteAfterSeconds`, anyone can execute the minting. |
| 87 | + |
| 88 | +## Rate Limits |
| 89 | + |
| 90 | +Direct minting has multiple rate-limiting safeguards to protect against compromises, such as FDC exploits. |
| 91 | + |
| 92 | +| Limit | Description | |
| 93 | +| :-------------------------------------- | :---------------------------------------------------- | |
| 94 | +| `directMintingHourlyLimitUBA` | Hourly minting cap | |
| 95 | +| `directMintingDailyLimitUBA` | Daily minting cap | |
| 96 | +| `directMintingLargeMintingThresholdUBA` | Threshold above which a minting is considered "large" | |
| 97 | +| `directMintingLargeMintingDelaySeconds` | Automatic delay for large mintings | |
| 98 | + |
| 99 | +Rate limits **throttle** rather than reject. |
| 100 | +When limits are hit, further mintings are delayed proportionally to the accumulated backlog. |
| 101 | +Large mintings above the threshold are delayed independently by a fixed duration. |
| 102 | + |
| 103 | +Delayed mintings emit the `DirectMintingDelayed` event instead of `DirectMintingExecuted`, with an `executionAllowedAt` timestamp. |
| 104 | +Governance can unblock delayed mintings via `unblockDirectMintingsUntil`, but only for past timestamps and after manual review. |
| 105 | + |
| 106 | +If a preferred executor's minting is delayed, their exclusive execution window restarts from `executionAllowedAt`. |
| 107 | + |
| 108 | +:::tip[What's next] |
| 109 | + |
| 110 | +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). |
| 111 | + |
| 112 | +::: |
0 commit comments