Skip to content

Commit f4be20b

Browse files
fasskonikerzetic-aflabs
authored andcommitted
feat(docs): add operational flow diagrams for Firelight and Upshift vaults
1 parent 080fed9 commit f4be20b

3 files changed

Lines changed: 80 additions & 0 deletions

File tree

docs/fxrp/firelight/_firelight.mdx

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,40 @@ It provides [ERC-4626](https://eips.ethereum.org/EIPS/eip-4626) compliant vault
66
Firelight vaults operate on a [period-based logic](https://docs.firelight.finance/technical-documents#period-based-logic), where deposits and withdrawals are processed at specific intervals.
77
Users receive vault shares representing their proportional ownership of the vault's assets.
88

9+
## How Firelight Vaults Work
10+
11+
This diagram shows the flow of operations for a user interacting with a Firelight vault.
12+
13+
```mermaid
14+
flowchart TB
15+
UserFXRP[("User's FXRP")]
16+
Deposit[deposit]
17+
Mint[mint]
18+
Shares[("Vault shares")]
19+
UserFXRP --> Deposit --> Shares
20+
UserFXRP --> Mint --> Shares
21+
22+
Shares --> Withdraw[withdraw]
23+
Shares --> Redeem[redeem]
24+
Withdraw --> Request["Withdrawal request(current period)"]
25+
Redeem --> Request
26+
Request --> Wait["Wait for period end"]
27+
Wait --> Claim[claimWithdraw]
28+
Claim --> FXRP[("FXRP to user")]
29+
```
30+
31+
The flow of operations for a user interacting with a Firelight vault is as follows:
32+
33+
- **Deposit / Mint:** Two ways to get vault shares.
34+
Call `deposit(assets)` to deposit FXRP and receive the corresponding shares, or `mint(shares)` to specify the shares you want and pay the required FXRP.
35+
36+
- **Withdraw / Redeem:** Both create a withdrawal request for the current period.
37+
Call `withdraw(assets)` to request a given amount of assets, or `redeem(shares)` to burn shares and request the equivalent assets.
38+
Shares are burned when you redeem.
39+
40+
- **Claim:** After the period ends, call `claimWithdraw()` to receive your FXRP.
41+
Use the [Get Vault Status](/fxrp/firelight/status) and [Claim Withdrawals](/fxrp/firelight/claim) guides to find and claim completed periods.
42+
943
<DocCardList
1044
items={[
1145
{

docs/fxrp/upshift/_upshift.mdx

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,41 @@ It inherits the transparency model of the [FAssets](/fassets/overview) system: m
1515
- **Instruction flow is auditable:** XRPL-triggered actions are executed on Flare via [Smart Accounts](/smart-accounts/overview) with [Flare Data Connector](/fdc/overview) backed verification and onchain execution.
1616
You can verify all smart account activity on the [Flare Systems Explorer](https://flare-systems-explorer.flare.network/smart-accounts).
1717

18+
## How Upshift Vaults Work
19+
20+
This diagram shows the flow of operations for a user interacting with an Upshift vault.
21+
22+
```mermaid
23+
flowchart TB
24+
UserFXRP[("User's FXRP")]
25+
Deposit[deposit]
26+
LP[("LP Tokens (vault shares)")]
27+
UserFXRP --> Deposit --> LP
28+
29+
LP --> InstantRedeem[instantRedeem]
30+
InstantRedeem -->|"instant redemption fee applies"| InstantFXRP[("FXRP to user")]
31+
32+
LP --> RequestRedeem[requestRedeem]
33+
RequestRedeem --> Epoch["Withdrawal request(epoch: year, month, day)"]
34+
Epoch --> Wait["Wait lag duration"]
35+
Wait --> Claim[claim]
36+
Claim -->|"withdrawal fee applies"| RequestedFXRP[("FXRP to user")]
37+
```
38+
39+
The flow of operations for a user interacting with an Upshift vault is as follows:
40+
41+
- **Deposit:** Transfer FXRP to the vault and receive the corresponding LP tokens (shares).
42+
Yield accrues as share value increases.
43+
44+
- **Instant redeem:** Burn the corresponding LP tokens and receive FXRP immediately via the `instantRedeem()` function.
45+
In this case you need to pay the instant redemption fee.
46+
Use this option when you need liquidity right away.
47+
48+
- **Requested redeem:** Lock the LP tokens with `requestRedeem()` and create a withdrawal request for the current epoch.
49+
After the lag duration, call `claim(year, month, day, receiver)` to receive FXRP.
50+
Lower fee than instant redeem.
51+
Use this option when you can wait.
52+
1853
<DocCardList
1954
items={[
2055
{

src/css/custom.css

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -578,3 +578,14 @@ div[class^="searchBar_"] div[class*="hitFooter"] a:hover {
578578
background: var(--ifm-color-emphasis-300);
579579
border-color: var(--ifm-color-emphasis-400);
580580
}
581+
582+
/* ============================================================
583+
Mermaid diagrams
584+
============================================================ */
585+
.markdown .mermaid,
586+
.theme-doc-markdown .mermaid,
587+
.markdown .docusaurus-mermaid-container,
588+
.theme-doc-markdown .docusaurus-mermaid-container {
589+
margin-bottom: 2rem;
590+
margin-top: 2rem;
591+
}

0 commit comments

Comments
 (0)