Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions docs/smart-accounts/1-overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ The workflow for Flare Smart Accounts is comprised of the following steps.
## 1. Instructions on XRPL

The Flare Smart Accounts allow XRPL users to perform actions on the Flare chain through instructions on the XRPL.
This is done through a `Payment` to an XRPL address, designated by the operator - a backend monitoring incoming transactions and interacting with the Flare chain.
This is done through a `Payment` to an XRPL address, designated by the operator, a backend monitoring incoming transactions and interacting with the Flare chain.
The payment must transfer sufficient funds, as specified by the operator, and must include the proper payment receipt in the memo field.

The payment receipt is a `bytes32` value.
Expand All @@ -50,7 +50,7 @@ In practice, the payment receipt should be prepared by a backend, through a web

The first, instruction code, byte is further subdivided into two half-bytes.
The first nibble is the instruction type;
this is either `FXRP`, `Firelight` or `Upshift` (with corresponding type IDS `0`, `1` and `2`).
this is either `FXRP`, `Firelight`, or `Upshift` (with corresponding type IDS `0`, `1`, and `2`).
The second nibble is the instruction command; the available commands are different for each instruction type.

<details>
Expand All @@ -76,7 +76,7 @@ Instructions for interacting with the `FXRP` token.
<td>&nbsp;collateralReservation</td>
<td>
&nbsp;Reserve a `value` of lots of collateral in the agent vault,
registered under the `agentVaultId` with the `MasterAccountController`
registered with the `agentVaultId` with the `MasterAccountController`
contract.
</td>
</tr>
Expand All @@ -98,7 +98,7 @@ Instructions for interacting with the `FXRP` token.

### Firelight

Instructions for interacting with a Firelight type vault.
Instructions for interacting with a Firelight-type vault.

**Type ID:** `01`.

Expand All @@ -115,9 +115,9 @@ Instructions for interacting with a Firelight type vault.
<td>&nbsp;collateralReservationAndDeposit</td>
<td>
&nbsp;Reserve a `value` of lots of collateral in the agent vault,
registered under the `agentVaultId` with the `MasterAccountController`
registered with the `agentVaultId` with the `MasterAccountController`
contract. After successful minting, deposit the FXRP into the Firelight
type vault, registered under the `vaultId` with the
type vault, registered with the `vaultId` with the
`MasterAccountController` contract. Equivalent to sending a
`collateralReservation` instruction and a Firelight `deposit` instruction.
</td>
Expand All @@ -128,7 +128,7 @@ Instructions for interacting with a Firelight type vault.
<td>&nbsp;deposit</td>
<td>
&nbsp;Deposit a `value` of FXRP into the Firelight type vault,
registered under the `vaultId` with the `MasterAccountController`
registered with the `vaultId` with the `MasterAccountController`
contract.
</td>
</tr>
Expand All @@ -137,7 +137,7 @@ Instructions for interacting with a Firelight type vault.
<td>&nbsp;redeem</td>
<td>
&nbsp;Start the withdrawal process for a `value` of FXRP from the
Firelight type vault, registered under the `vaultId` with the
Firelight type vault, registered with the `vaultId`, with the
`MasterAccountController` contract.
</td>
</tr>
Expand All @@ -146,7 +146,7 @@ Instructions for interacting with a Firelight type vault.
<td>&nbsp;claimWithdraw</td>
<td>
&nbsp;Withdraw the `FXRP`, requested in the `value` period, from
Firelight type vault, registered under the `vaultId` with the
Firelight type vault, registered with the `vaultId`, with the
`MasterAccountController` contract.
</td>
</tr>
Expand All @@ -156,7 +156,7 @@ Instructions for interacting with a Firelight type vault.

### Upshift

Instructions for interacting with an upshift type vault.
Instructions for interacting with an Upshift-type vault.

**Type ID:** `02`.

Expand All @@ -173,9 +173,9 @@ Instructions for interacting with an upshift type vault.
<td>&nbsp;collateralReservationAndDeposit</td>
<td>
&nbsp;Reserve a `value` of lots of collateral in the agent vault,
registered under the `agentVaultId` with the `MasterAccountController`
registered with the `agentVaultId` with the `MasterAccountController`
contract. After successful minting, deposit the FXRP into the Upshift
type vault, registered under the `vaultId` with the
type vault, registered with the `vaultId`, with the
`MasterAccountController` contract. Equivalent to sending a
`collateralReservation` instruction and a Upshift `deposit` instruction.
</td>
Expand All @@ -186,7 +186,7 @@ Instructions for interacting with an upshift type vault.
<td>&nbsp;deposit</td>
<td>
&nbsp;Deposit a `value` of FXRP into the Upshift type vault,
registered under the `vaultId` with the `MasterAccountController`
registered with the `vaultId` with the `MasterAccountController`
contract.
</td>
</tr>
Expand All @@ -195,7 +195,7 @@ Instructions for interacting with an upshift type vault.
<td>&nbsp;requestRedeem</td>
<td>
&nbsp;Start the withdrawal process for a `value` of FXRP from the
Upshift type vault, registered under the `vaultId` with the
Upshift type vault, registered with the `vaultId` with the
`MasterAccountController` contract.
</td>
</tr>
Expand All @@ -204,7 +204,7 @@ Instructions for interacting with an upshift type vault.
<td>&nbsp;claim</td>
<td>
&nbsp;Withdraw the `FXRP`, requested in the `value` period, from
Upshift type vault, registered under the `vaultId` with the
Upshift type vault, registered with the `vaultId` with the
`MasterAccountController` contract.
</td>
</tr>
Expand Down
76 changes: 38 additions & 38 deletions docs/smart-accounts/2-fasset-instructions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ Thus, they eradicate completely the need for XRPL users to hold any non-XRPL ass

You can learn more about the FAssets in the [dedicated section](/fassets/overview/).

The instructions fall under three types: `FXRP`, `Firelight` and `Upshift`.
The instructions fall under three types: `FXRP`, `Firelight`, and `Upshift`.
Each type supports different instruction commands.
The `FXRP` commands allow the interaction with the base FAssets system, whereas `Firelight` and `Upshift` give access to actions pertaining to the corresponding vault architectures.
The `FXRP` commands allow interaction with the base FAssets system, whereas `Firelight` and `Upshift` give access to actions pertaining to the corresponding vault architectures.

{/* TODO:(Nik) explain walletId */}

Expand Down Expand Up @@ -72,7 +72,7 @@ A collateral reservation payment reference is a 32-byte value:
}}
>
<ThemedImage
alt="Breakdown of bytes in payment reference for the collateral reservation action"
alt="Breakdown of bytes in payment reference for the collateral reservation action."
style={{ width: "100%" }}
sources={{
light: useBaseUrl(
Expand All @@ -90,7 +90,7 @@ A collateral reservation payment reference is a 32-byte value:
Transfer `value` of drops of FXRP to the `recipientAddress`.
The FXRP is sent from the personal account that belongs to the XRPL address that sent the instruction, if the FXRP balance is sufficient.

A transfer payment reference is 32-byte value:
A transfer payment reference is a 32-byte value:

- byte representation of the instruction ID in the first byte:
- type ID `00` in the first nibble,
Expand All @@ -108,7 +108,7 @@ A transfer payment reference is 32-byte value:
}}
>
<ThemedImage
alt="Breakdown of bytes in payment reference for the transfer action"
alt="Breakdown of bytes in payment reference for the transfer action."
style={{ width: "100%" }}
sources={{
light: useBaseUrl(
Expand Down Expand Up @@ -146,7 +146,7 @@ A redeem payment reference is the 32-byte value:
}}
>
<ThemedImage
alt="Breakdown of bytes in payment reference for the redeem action"
alt="Breakdown of bytes in payment reference for the redeem action."
style={{ width: "100%" }}
sources={{
light: useBaseUrl("/img/docs/smart-accounts/bytes-fxrp-redeem-light.png"),
Expand All @@ -157,13 +157,15 @@ A redeem payment reference is the 32-byte value:

## `01` Firelight

The commands of the `Firelight` type allow interaction with Firelight-type vaults.

### `01` Collateral reservation and deposit

Reserve the collateral for `value` lots of FXRP with the agent's vault, registered under the `agentVaultId` with the `MasterAccountController` contract.
When minting is completed, deposit `value` lots of FXRP into a Firelight type vault at the address, registered with the `MasterAccountController` contract under the `vaultId`.
Reserve the collateral for `value` lots of FXRP with the agent's vault, registered with the `agentVaultId` with the `MasterAccountController` contract.
When minting is completed, deposit `value` lots of FXRP into a Firelight-type vault at the address registered with the `MasterAccountController` contract with the `vaultId`.
Essentially, this allows an XRPL user to signal intent for two actions at once;
it is equivalent to sending a collateral reservation instruction first, and afterwards a deposit instruction.
This cuts the total waiting time in half, and reduces the total number of transactions by one.
This cuts the total waiting time in half and reduces the total number of transactions by one.

A collateral reservation and deposit instruction payment reference is the 32-byte value:

Expand All @@ -185,7 +187,7 @@ A collateral reservation and deposit instruction payment reference is the 32-byt
}}
>
<ThemedImage
alt="Breakdown of bytes in payment reference for the collateral reservation and deposit action"
alt="Breakdown of bytes in payment reference for the collateral reservation and deposit action."
style={{ width: "100%" }}
sources={{
light: useBaseUrl(
Expand All @@ -200,7 +202,7 @@ A collateral reservation and deposit instruction payment reference is the 32-byt

### `02` Deposit

Deposit `value` lots of FXRP into a Firelight type vault at the address, registered with the `MasterAccountController` contract under the `vaultId`.
Deposit `value` lots of FXRP into a Firelight-type vault at the address registered with the `MasterAccountController` contract with the `vaultId`.

A deposit instruction payment reference is the 32-byte value:

Expand All @@ -222,7 +224,7 @@ A deposit instruction payment reference is the 32-byte value:
}}
>
<ThemedImage
alt="Breakdown of bytes in payment reference for the deposit action"
alt="Breakdown of bytes in payment reference for the deposit action."
style={{ width: "100%" }}
sources={{
light: useBaseUrl(
Expand All @@ -239,7 +241,7 @@ A deposit instruction payment reference is the 32-byte value:

The first part of the withdrawal process from a Firelight vault.

Initiate a withdrawal request of `value` of FXRP from the Firelight vault at the address, registered with the `MasterAccountController` contract under the `vaultId`.
Initiate a withdrawal request of `value` of FXRP from the Firelight vault at the address registered with the `MasterAccountController` contract with the `vaultId`.

A redeem instruction payment reference is the 32-byte value:

Expand All @@ -261,7 +263,7 @@ A redeem instruction payment reference is the 32-byte value:
}}
>
<ThemedImage
alt="Breakdown of bytes in payment reference for the redeem action"
alt="Breakdown of bytes in payment reference for the redeem action."
style={{ width: "100%" }}
sources={{
light: useBaseUrl(
Expand All @@ -277,7 +279,7 @@ A redeem instruction payment reference is the 32-byte value:
### `04` Claim withdraw

The second part of the withdrawal process from a Firelight vault.
Claim the pending withdrawal from the `value` period, from the Firelight vault at the address, registered with the `MasterAccountController` contract under the `vaultId`.
Claim the pending withdrawal from the `value` period, from the Firelight vault at the address registered with the `MasterAccountController` contract with the `vaultId`.
The assets are transferred to the user's smart account.
The action can only be performed after one full period has passed.

Expand All @@ -303,7 +305,7 @@ A claim withdrawal payment reference is a 32-byte value:
}}
>
<ThemedImage
alt="Breakdown of bytes in payment reference for the claim withdraw action"
alt="Breakdown of bytes in payment reference for the claim withdraw action."
style={{ width: "100%" }}
sources={{
light: useBaseUrl(
Expand All @@ -318,13 +320,15 @@ A claim withdrawal payment reference is a 32-byte value:

## `02` Upshift

The commands of the `Upshift` type allow interaction with Upshift-type vaults.

### `01` Collateral reservation and deposit

Reserve the collateral for `value` lots of FXRP with the agent's vault, registered under the `agentVaultId` with the `MasterAccountController` contract.
When minting is completed, deposit `value` lots of FXRP into an Upshift type vault at the address, registered with the `MasterAccountController` contract under the `vaultId`.
Reserve the collateral for `value` lots of FXRP with the agent's vault, registered with the `agentVaultId` with the `MasterAccountController` contract.
When minting is completed, deposit `value` lots of FXRP into an Upshift-type vault at the address registered with the `MasterAccountController` contract with the `vaultId`.
Essentially, this allows an XRPL user to signal intent for two actions at once;
it is equivalent to sending a collateral reservation instruction first, and afterwards a deposit instruction.
This cuts the total waiting time in half, and reduces the total number of transactions by one.
This cuts the total waiting time in half and reduces the total number of transactions by one.

A collateral reservation and deposit instruction payment reference is the 32-byte value:

Expand All @@ -346,22 +350,22 @@ A collateral reservation and deposit instruction payment reference is the 32-byt
}}
>
<ThemedImage
alt="Breakdown of bytes in payment reference for the collateral reservation and deposit action"
alt="Breakdown of bytes in payment reference for the collateral reservation and deposit action."
style={{ width: "100%" }}
sources={{
light: useBaseUrl(
"/img/docs/smart-accounts/bytes-firelight-collateral-reservation-and-deposit-light.png",
"img/smart-accounts/bytes-upshift-collateral-reservation-and-deposit-light.png",
),
dark: useBaseUrl(
"/img/docs/smart-accounts/bytes-firelight-collateral-reservation-and-deposit-dark.png",
"img/smart-accounts/bytes-upshift-collateral-reservation-and-deposit-dark.png",
),
}}
/>
</div>

### `02` Deposit

Deposit `value` lots of FXRP into an Upshift type vault at the address, registered with the `MasterAccountController` contract under the `vaultId`.
Deposit `value` lots of FXRP into an Upshift type vault at the address registered with the `MasterAccountController` contract with the `vaultId`.

A deposit instruction payment reference is the 32-byte value:

Expand All @@ -383,15 +387,11 @@ A deposit instruction payment reference is the 32-byte value:
}}
>
<ThemedImage
alt="Breakdown of bytes in payment reference for the deposit action"
alt="Breakdown of bytes in payment reference for the deposit action."
style={{ width: "100%" }}
sources={{
light: useBaseUrl(
"/img/docs/smart-accounts/bytes-firelight-deposit-light.png",
),
dark: useBaseUrl(
"/img/docs/smart-accounts/bytes-firelight-deposit-dark.png",
),
light: useBaseUrl("img/smart-accounts/bytes-upshift-deposit-light.png"),
dark: useBaseUrl("img/smart-accounts/bytes-upshift-deposit-dark.png"),
}}
/>
</div>
Expand All @@ -400,7 +400,7 @@ A deposit instruction payment reference is the 32-byte value:

The first part of the withdrawal process from an Upshift vault.

Initiate a withdrawal request of `value` of FXRP from the Upshift vault at the address, registered with the `MasterAccountController` contract under the `vaultId`.
Initiate a withdrawal request of `value` of FXRP from the Upshift vault at the address registered with the `MasterAccountController` contract with the `vaultId`.

A request redeem instruction payment reference is the 32-byte value:

Expand All @@ -422,14 +422,14 @@ A request redeem instruction payment reference is the 32-byte value:
}}
>
<ThemedImage
alt="Breakdown of bytes in payment reference for the request redeem action"
alt="Breakdown of bytes in payment reference for the request redeem action."
style={{ width: "100%" }}
sources={{
light: useBaseUrl(
"/img/docs/smart-accounts/bytes-firelight-request-redeem-light.png",
"img/smart-accounts/bytes-upshift-request-redeem-light.png",
),
dark: useBaseUrl(
"/img/docs/smart-accounts/bytes-firelight-request-redeem-dark.png",
"img/smart-accounts/bytes-upshift-request-redeem-dark.png",
),
}}
/>
Expand All @@ -438,12 +438,12 @@ A request redeem instruction payment reference is the 32-byte value:
### `04` Claim

The second part of the withdrawal process from an Upshift vault.
Claim the pending withdrawal from the `value` period, from the Upshift vault at the address, registered with the `MasterAccountController` contract under the `vaultId`.
Claim the pending withdrawal from the `value` period, from the Upshift vault at the address registered with the `MasterAccountController` contract with the `vaultId`.
The assets are transferred to the user's smart account.
The action can only be performed after one full period has passed.

The `value` represents the date, when the redemption was requested.
It is is an 8-digit number `YYYYMMDD`, where `YYYY` is the year, `MM` the month (from `01` to `12`) and `DD` the day (from `01` to `31`, with additional monthly constraints) of the request.
The `value` represents the date when the redemption was requested.
It is an 8-digit number `YYYYMMDD`, where `YYYY` is the year, `MM` the month (from `01` to `12`), and `DD` the day (from `01` to `31`, with additional monthly constraints) of the request.

A claim payment reference is a 32-byte value:

Expand All @@ -465,7 +465,7 @@ A claim payment reference is a 32-byte value:
}}
>
<ThemedImage
alt="Breakdown of bytes in payment reference for the claim action"
alt="Breakdown of bytes in payment reference for the claim action."
style={{ width: "100%" }}
sources={{
light: useBaseUrl(
Expand Down
2 changes: 1 addition & 1 deletion docs/smart-accounts/3-custom-instruction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ keywords:
flare-network,
account-abstraction,
]
unlisted: false
unlisted: true
---

import ThemedImage from "@theme/ThemedImage";
Expand Down
Loading
Loading