Skip to content

Commit 343bec3

Browse files
committed
feat(docs): enhance FAssets redemption guide with operational parameters and payment verification details
1 parent 86375e2 commit 343bec3

File tree

1 file changed

+23
-7
lines changed

1 file changed

+23
-7
lines changed

docs/fassets/developer-guides/10-fassets-redemption-default.mdx

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ This guide explains:
2424

2525
## Key Operational Parameters
2626

27+
The FAssets system has specific operational parameters that control the timing of redemption payments.
28+
These parameters define both the minimum time window and block range during which an agent must complete the underlying payment.
29+
2730
| Parameter | Unit | Purpose |
2831
| ----------------------------- | ------- | ------------------------------------------------------------------------------------ |
2932
| `underlyingSecondsForPayment` | seconds | The minimum time allowed for an agent to pay for a redemption. |
@@ -46,12 +49,21 @@ From this event, you can obtain the following:
4649
- `lastUnderlyingBlock` - the last underlying block to submit payment.
4750
- `lastUnderlyingTimestamp` — the **deadline** on the underlying chain for submitting the redemption payment.
4851

49-
You should wait until this deadline is passed and then check whether the agent has paid the redemption payment in the underlying chain.
52+
You should wait until the deadline is passed and then check whether the agent has paid the redemption payment in the underlying chain.
53+
The two values work together as a dual safety mechanism: `lastUnderlyingBlock` ensures payment happens within a reasonable number of blocks, while `lastUnderlyingTimestamp` ensures payment occurs within a reasonable amount of time.
54+
Both constraints must be satisfied for the payment to be considered valid, providing robust protection against timing-based attacks.
55+
5056
The [`RedemptionPerformed`](/fassets/reference/IAssetManagerEvents#redemptionperformed) event is emitted by the Asset Manager contract when the redemption payment is completed.
5157

58+
:::info
59+
The simplest way to observe if a redemption payment has been made is to use the [xrpl](https://www.npmjs.com/package/xrpl) Node.js package to monitor the redeemer's account balance.
60+
Wait until the `underlyingSecondsForPayment` and `underlyingBlocksForPayment` deadlines pass, then check if the account balance has increased by the expected redemption amount.
61+
To verify the payment is for the correct redemption, compare the memo data in the XRP transaction to the `paymentReference` from the `RedemptionRequested` event.
62+
:::
63+
5264
## Handling Non-Payment
5365

54-
If the agent fails to pay the redemption payment in the underlying chain, the redeemer or the executor can start the redemption default process.
66+
If the agent fails to pay the redemption payment in the XRP Ledger, the redeemer or the executor can start the redemption default process.
5567

5668
### Generate the Proof of Payment Non-Existence
5769

@@ -68,7 +80,11 @@ Use the following parameters:
6880
- `checkSourceAddresses`: Not used in case of XRP Ledger, always set to false.
6981
- `sourceAddressesRoot`: Not used in case of XRP Ledger, always set to zero address.
7082

71-
With this information, create the attestation request with the Flare Data Connector and wait for the attestation request to be confirmed.
83+
Create the attestation request with the Flare Data Connector and wait for the attestation request to be confirmed.
84+
85+
:::info
86+
Check the [ReferencedPaymentNonexistence](/fdc/attestation-types/referenced-payment-nonexistence) attestation type for more details, and the [FDC by hand](/fdc/guides/fdc-by-hand) guide for more information on how to create the attestation request.
87+
:::
7288

7389
### Execute the Redemption Default
7490

@@ -78,13 +94,13 @@ The redeemer or executor can execute the redemption default process by calling t
7894

7995
This function requires two parameters:
8096

81-
- `_proof`: The proof of payment non-existence of the redemption payment on the XRP Ledger.
82-
- `_redemptionRequestId`: The request ID of the redemption request.
97+
- `_proof`: The proof of payment non-existence from the FDC of the redemption payment on the XRP Ledger.
98+
- `_redemptionRequestId`: The request ID of the redemption request from the `RedemptionRequested` event.
8399

84100
It does the following:
85101

86102
- Checks if the proof of payment non-existence is valid.
87-
- Enough time has passed since the redemption request was created.
103+
- Verifies that both the `underlyingSecondsForPayment` and `underlyingBlocksForPayment` deadlines have passed.
88104
- Executes the compensation payment to the redeemer or the executor from the agent's collateral.
89105
- Releases the agent's locked collateral.
90106
- Emits [`RedemptionDefaulted`](/fassets/reference/IAssetManagerEvents#redemptiondefault) event.
@@ -102,7 +118,7 @@ This process ensures redeemers can recover their funds when agents fail to fulfi
102118
:::tip Next Steps
103119
To continue your FAssets development journey, you can:
104120

105-
- Understand how to [redeem FXRP](/fassets/developer-guides/fassets-redeem)
106121
- Learn how to [mint FXRP](/fassets/developer-guides/fassets-mint)
122+
- Understand how to [redeem FXRP](/fassets/developer-guides/fassets-redeem)
107123
- Explore [FAssets system settings](/fassets/operational-parameters)
108124
:::

0 commit comments

Comments
 (0)