Skip to content

Commit 29666b4

Browse files
authored
feat(docs): enhance FAssets redemption process documentation with agent responsibilities and new methods (#709)
1 parent 49f8187 commit 29666b4

File tree

2 files changed

+56
-0
lines changed

2 files changed

+56
-0
lines changed

docs/fassets/developer-guides/3-fassets-redeem.mdx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,16 @@ Once decoding the most important data from the event is:
289289

290290
You can read the full event description [here](/fassets/reference/IAssetManagerEvents#redemptionticketupdated).
291291

292+
### Agent Process
293+
294+
The FAssets agent should perform the redemption, and the user needs to get the redeemed assets from the agent.
295+
296+
If the agent is unable to redeem the assets on the underlying chain in the specified time.
297+
In that case, the user can execute the [`redemptionPaymentDefault`](/fassets/reference/IAssetManager#redemptionpaymentdefault) function to receive compensation from agent's collateral.
298+
299+
If the agent rejects the redemption request and no other agent takes over the redemption, the redeemer or appointed executor calls [`rejectedRedemptionPaymentDefault`](/fassets/reference/IAssetManager#rejectedredemptionpaymentdefault) method and receives payment in collateral.
300+
The agent can also call default if the redeemer is unresponsive to payout the redeemer and free the remaining collateral.
301+
292302
## Next Steps
293303

294304
:::tip

docs/fassets/reference/IAssetManager.mdx

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,38 @@ function redeem(
188188
returns (uint256 _redeemedAmountUBA);
189189
```
190190

191+
### `redemptionPaymentDefault`
192+
193+
If the agent fails to transfer the redeemed underlying assets in a timely manner, the redeemer or appointed executor can invoke this method and receive payment in collateral.
194+
The agent can also call default if the redeemer is unresponsive to payout the redeemer and free the remaining collateral.
195+
196+
Parameters:
197+
198+
- `_proof`: Proof that the agent did not pay with correct payment reference on the underlying chain.
199+
- `_redemptionRequestId`: ID of an existing redemption request.
200+
201+
```solidity
202+
function redemptionPaymentDefault(
203+
IReferencedPaymentNonexistence.Proof calldata _proof,
204+
uint256 _redemptionRequestId
205+
) external;
206+
```
207+
208+
### `rejectedRedemptionPaymentDefault`
209+
210+
If the agent rejected the redemption request and no other agent took over the redemption, the redeemer or appointed executor calls this method and receives payment in collateral.
211+
The agent can also call default if the redeemer is unresponsive, to payout the redeemer and free the remaining collateral.
212+
213+
Parameters:
214+
215+
- `_redemptionRequestId`: ID of an existing redemption request
216+
217+
```solidity
218+
function rejectedRedemptionPaymentDefault(
219+
uint256 _redemptionRequestId
220+
) external;
221+
```
222+
191223
### `redemptionQueue`
192224

193225
Returns the redemption queue in the form of an array of [`RedemptionTicketInfo`](https://github.com/flare-foundation/fassets/blob/main/contracts/userInterfaces/data/RedemptionTicketInfo.sol) structs.
@@ -233,3 +265,17 @@ function agentRedemptionQueue(
233265
) external view
234266
returns (RedemptionTicketInfo.Data[] memory _queue, uint256 _nextRedemptionTicketId);
235267
```
268+
269+
### `fAsset`
270+
271+
Returns the FAsset token contract (ERC-20) that is managed by this asset manager instance.
272+
273+
Returns:
274+
275+
- `IERC20`: The address of the FAsset token contract
276+
277+
```solidity
278+
function fAsset()
279+
external view
280+
returns (IERC20);
281+
```

0 commit comments

Comments
 (0)