Skip to content

Commit 3060a01

Browse files
committed
feat(docs): enhance user bot documentation with redemption status and collateral pool management details
1 parent 2a4d22b commit 3060a01

File tree

1 file changed

+87
-1
lines changed

1 file changed

+87
-1
lines changed

docs/fassets/reference/user-bot.mdx

Lines changed: 87 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ keywords: [fassets, xrp, bitcoin, dogecoin, flare-network]
66

77
Command line reference for managing and interacting with FAssets user bot. It allows users to mint and redeem FAssets, manage collateral pools, and query system information.
88

9-
Sourced from `agent-bot.ts` on [GitHub](https://github.com/flare-labs-ltd/fasset-bots/blob/songbird-release/packages/fasset-bots-cli/src/cli/user-bot.ts).
9+
Sourced from `user-bot.ts` on [GitHub](https://github.com/flare-labs-ltd/fasset-bots/blob/main/packages/fasset-bots-cli/src/cli/user-bot.ts).
1010

1111
## Setup
1212

@@ -152,3 +152,89 @@ Additionally the custom flag can be specified:
152152

153153
- **`--noWait`\***
154154
Does not wait for non-payment proof. don't wait for non-payment proof, but immediately exit with exitcode 10 if the proof isn't available
155+
156+
### Redemption Status
157+
158+
The `redemptionStatus` function provides information about the current state of a redemption request in the FAsset system.
159+
160+
```bash
161+
yarn user-bot redemptionStatus
162+
```
163+
164+
### Update Redemptions
165+
166+
The `updateRedemptions` function updates the status of one or more open redemption requests. It ensures that these requests are processed efficiently and appropriately addresses any unresolved or overdue requests. This function is essential for automating the entire redemption lifecycle.
167+
168+
```bash
169+
yarn user-bot updateRedemptions
170+
```
171+
172+
## Collateral Pool Management
173+
174+
### List Collateral Pools
175+
176+
Lists all available collateral pools, including:
177+
178+
- Pool address
179+
- Token symbol
180+
- Token price (CFLR)
181+
- Collateral (CFLR)
182+
- Fees (FXRP)
183+
- Collateral Ratio
184+
185+
```bash
186+
yarn user-bot pools
187+
```
188+
189+
### Pool Holdings
190+
191+
The 'poolHoldings' function provides detailed information about the pools that user has holdings, listing:
192+
193+
- Pool address
194+
- Token symbol
195+
- Pool tokens
196+
197+
```bash
198+
yarn user-bot poolHoldings
199+
```
200+
201+
### Enter Pool
202+
203+
The `enterPool` function allows users to deposit collateral into a specific collateral pool and become a participant by specifying the collateral pool ID and collateral amount.
204+
205+
```bash
206+
yarn user-bot enterPool <poolId> <collateralAmount>
207+
```
208+
209+
### Exit Pool
210+
211+
The `exitPool` function allows participants to withdraw their share of collateral from a collateral pool by burning their Collateral Pool Tokens (CPTs) and receiving collateral. Specify the pool ID and the amount of collateral to withdraw.
212+
213+
```bash
214+
yarn user-bot exitPool <poolId> <amount|all>
215+
```
216+
217+
## Balance Management
218+
219+
## Balance
220+
221+
Displays balance for relevant tokens like FAssets, underlying, native, wrapped native, and vault collateral.
222+
223+
```bash
224+
yarn user-bot balance
225+
```
226+
227+
## Secrets Management
228+
229+
### Generate Secrets
230+
231+
The function `generateSecrets' generates a secret JSON file for user addresses and private keys.
232+
233+
```bash
234+
yarn user-bot generateSecrets --user
235+
```
236+
237+
When executing the `generateSecrets` command, the following custom flag can be specified:
238+
239+
- **`-o <filename>`** (Optional)
240+
Saves the secrets to a specified file; otherwise, they are printed to the console.

0 commit comments

Comments
 (0)