Skip to content

Commit 96ebfcd

Browse files
feat(docs): update FAssets guides for v1.3 (#1312)
2 parents 7eb7096 + 817f661 commit 96ebfcd

12 files changed

Lines changed: 201 additions & 27 deletions

docs/fassets/01-overview.mdx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ Agents and a community-provided collateral pool ensure trustlessness through ove
3737
}}
3838
/>
3939

40-
Anyone on the Flare blockchain can mint FAssets, which are wrapped versions of original tokens from other blockchains, known as underlying networks. The original tokens from these chains, such as Ripple (XRPL), Dogecoin (DOGE), Bitcoin (BTC), and Litecoin (LTC), are referred to as underlying assets. For example, the FAsset version of Bitcoin is known as FBTC.
40+
Anyone on the Flare blockchain can mint FAssets, which are wrapped versions of original tokens from other blockchains, known as underlying networks.
41+
The original tokens from these chains, such as Ripple (XRPL), Dogecoin (DOGE), Bitcoin (BTC), and Litecoin (LTC), are referred to as underlying assets.
42+
For example, the FAsset version of Bitcoin is known as FBTC.
4143

4244
### Minting
4345

@@ -99,7 +101,8 @@ Eligibility:
99101

100102
### Challengers
101103

102-
Challengers monitor agents for illegal transactions that reduce collateral below the backing factor. They:
104+
Challengers monitor agents for illegal transactions that reduce collateral below the backing factor.
105+
They:
103106

104107
- Submit proof of illegal actions to the system.
105108
- Earn rewards from the agent's vault upon successful challenges.

docs/fassets/02-minting.mdx

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ This is the summary of the minting process:
3131
The minter chooses an agent from the publicly available [agent list](/fassets/overview#agents).
3232
The choice is based on the minting fee or the amount of free collateral, which must be enough to back the amount to be minted.
3333

34-
The minter sends to the Asset Manager contract a collateral reservation transaction (CRT). The CRT includes:
34+
The minter sends to the Asset Manager contract a collateral reservation transaction (CRT).
35+
The CRT includes:
3536

3637
- The address of the chosen agent.
3738
- The amount to mint, which must be a positive integer of [lots](/fassets/minting#lots).
@@ -120,11 +121,13 @@ The minting fee is further divided in two shares:
120121

121122
#### Agent share
122123

123-
This share remains in the agent's underlying account but is not marked as being in use. The agent can use this balance freely.
124+
This share remains in the agent's underlying account but is not marked as being in use.
125+
The agent can use this balance freely.
124126

125127
#### Pool share
126128

127-
This share is minted as FAssets and sent to the [collateral pool](/fassets/collateral#pool-collateral). The percentage of this share is defined by the agent and can be changed by the agent after a delay that provides time for minters to notice the change.
129+
This share is minted as FAssets and sent to the [collateral pool](/fassets/collateral#pool-collateral).
130+
The percentage of this share is defined by the agent and can be changed by the agent after a delay that provides time for minters to notice the change.
128131

129132
### Executor Fee
130133

@@ -140,13 +143,21 @@ This design ensures timely and reliable minting finalization without relying on
140143

141144
### Minting
142145

143-
The FAssets agent verifies the minter after the user completes the collateral reservation and pays the collateral reservation fee. The agent is responsible for confirming or rejecting the minter's status. If the agent does not respond within a certain timeframe, the minter has the option to cancel the reservation and receive a full refund of the collateral reservation fee.
146+
The FAssets agent verifies the minter after the user completes the collateral reservation and pays the collateral reservation fee.
147+
The agent is responsible for confirming or rejecting the minter's status.
148+
If the agent does not respond within a certain timeframe, the minter has the option to cancel the reservation and receive a full refund of the collateral reservation fee.
144149

145-
To enable the agent to verify the minter, the collateral reservation must include the address (or multiple addresses, in the case of UTXO chains) from which the payment will be made. If multiple addresses are provided, all of them must be used for the payment.
150+
To enable the agent to verify the minter, the collateral reservation must include the address (or multiple addresses, in the case of UTXO chains) from which the payment will be made.
151+
If multiple addresses are provided, all of them must be used for the payment.
146152

147-
Users must wait up to 60 seconds before they can cancel their request. If the agent accepts within this time, the user can proceed to mint by depositing the underlying assets. Therefore, it is important for the agent to respond quickly. If the agent does not respond in time, it will depend on whether the user is willing to wait; otherwise, the agent will simply miss the opportunity to mint, but there will be no loss of tokens.
153+
Users must wait up to 60 seconds before they can cancel their request.
154+
If the agent accepts within this time, the user can proceed to mint by depositing the underlying assets.
155+
Therefore, it is important for the agent to respond quickly.
156+
If the agent does not respond in time, it will depend on whether the user is willing to wait; otherwise, the agent will simply miss the opportunity to mint, but there will be no loss of tokens.
148157

149-
When the agent rejects the minter's request or the minter decides to cancel, the minter will receive a refund of the collateral reservation fee, minus a small percentage (e.g., 5%) that is burned. This burned amount is designed to prevent abuse of the agent by stopping someone from repeatedly reserving collateral from a sanctioned address. If the burned percentage were zero, an attacker could exploit the system without any cost.
158+
When the agent rejects the minter's request or the minter decides to cancel, the minter will receive a refund of the collateral reservation fee, minus a small percentage (e.g., 5%) that is burned.
159+
This burned amount is designed to prevent abuse of the agent by stopping someone from repeatedly reserving collateral from a sanctioned address.
160+
If the burned percentage were zero, an attacker could exploit the system without any cost.
150161

151162
## Payment Failure
152163

@@ -200,7 +211,8 @@ FAssets are still transferred to the minter's account, and the agent's collatera
200211
### Expired proof
201212

202213
Proofs provided by the [Flare Data Connector](/fdc/overview) can be created for 14 days and remain valid indefinitely once created.
203-
Suppose neither the minter nor the agent presents the proof of payment or nonpayment within the 14-day window. In that case, the regular minting process cannot continue, and the agent's collateral could be locked indefinitely.
214+
Suppose neither the minter nor the agent presents the proof of payment or nonpayment within the 14-day window.
215+
In that case, the regular minting process cannot continue, and the agent's collateral could be locked indefinitely.
204216

205217
In this case, the agent can still recover the collateral by buying it back with native tokens.
206218
The recovery is accomplished with the following procedure:

docs/fassets/03-direct-minting.mdx

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
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+
:::
Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ To do so, these holders, known as redeemers, send FAssets to the Asset Manager s
1111

1212
This is the summary of the redemption process:
1313

14-
1. The redeemer starts the redemption for a positive integer of lots by issuing a request to the Asset Manager smart contract.
14+
1. The redeemer starts the redemption by issuing a request to the Asset Manager smart contract.
15+
The standard `redeem` method requires a whole number of lots, while `redeemAmount` and `redeemWithTag` allow redeeming any amount.
1516

1617
The FAssets system chooses one or more redemption tickets from the front of the [FIFO redemption queue](/fassets/minting#redemption-tickets-and-the-redemption-queue).
1718
The number of chosen redemption tickets is capped to avoid high gas consumption.
@@ -51,6 +52,25 @@ This is the summary of the redemption process:
5152

5253
After the collateral is released, it can either back the minting of more FAssets or be withdrawn.
5354

55+
## Redeem Any Amount
56+
57+
The standard `redeem` method requires whole lots.
58+
The `redeemAmount` method allows redeeming **any amount** of FAssets, which is useful for redeeming yields or partial amounts that don not align with lot boundaries.
59+
60+
No redemption through `redeemAmount` or `redeemWithTag` can be smaller than `minimumRedeemAmountUBA` to prevent uneconomical micro-redemptions.
61+
If the requested amount requires too many redemption tickets, only a partial redemption is performed and the remaining amount is returned in a `RedemptionAmountIncomplete` event.
62+
63+
## Redeem with Tag
64+
65+
The `redeemWithTag` method allows the redeemer to request an **XRP destination tag** on the redemption payment.
66+
This is useful when redeeming directly to an exchange address that requires a destination tag.
67+
Like `redeemAmount`, it also supports redeeming any amount, not just whole lots.
68+
69+
The destination tag must fit in a 32-bit integer.
70+
This is an XRP-only feature, gated by the `redeemWithTagSupported` flag.
71+
Confirming a redemption with a tag requires the `confirmXRPRedemptionPayment` method, which uses a dedicated FDC proof type that supports destination tags.
72+
If the agent fails to pay, the redeemer calls `xrpRedemptionPaymentDefault` to trigger the default process.
73+
5474
## Fees
5575

5676
These fees are charged when a user redeems FAssets for the underlying asset:
@@ -116,6 +136,12 @@ During step 4 above, if any agent does not pay on the underlying chain, the rede
116136
This remainder is derived from the [system-wide collateral ratio settings](/fassets/collateral#system-wide-thresholds) specified by governance.
117137
5. The underlying assets backing the redeemed FAssets are marked as free and can be withdrawn by the agent later.
118138

139+
## Redemption Time Extension
140+
141+
When many redemption requests target the same agent in rapid succession, the system automatically extends the agent's payment deadline.
142+
Each new redemption request adds time to the deadline, which then gradually decays back to the baseline as the volume of requests decreases.
143+
This mechanism prevents agents from being overwhelmed by a burst of redemptions and failing to pay in time through no fault of their own.
144+
119145
## Edge Cases
120146

121147
### Unresponsive redeemer

0 commit comments

Comments
 (0)