reformulate the boarding and refactor the structure (#21)

This commit is contained in:
Marco Argentieri
2023-11-29 00:45:26 +01:00
committed by GitHub
parent 8371e9f1c2
commit 09caa1f800
9 changed files with 84 additions and 58 deletions

View File

@@ -0,0 +1,4 @@
{
"label": "Get Started",
"position": 2
}

View File

@@ -0,0 +1,27 @@
---
sidebar_position: 3
title: 'Boarding the Ark'
---
### Overview
Alice wants to board the Ark of a well-known Ark service provider (ASP). It requires an on-chain transaction.
- Alice must be online **at least once every 4 weeks** to keep her funds safe.
- If ASP denies Alice's boarding request, Alice can claim her funds back in 24 hours.
### The timeline of events
1. Alice creates a [Funding transaction](#funding-transaction)
2. Alice adds any inputs she wants to cover the values the [VTXO](#vtxo) she will receive, plus on-chain fees.
3. Alice adds an output with **two spending conditions**:
- `(ASP in 1 month)`
- A covenant output that forces coins to be spent by a [Redeem transaction](#redeem-transaction-) with an output with **two** spending conditions:
- `(Alice + ASP)`
- `(Alice in 24 hours)`
4. Alice notifies ASP about the [Funding transaction](#funding-transaction)
5. Alice has now a [VTXO](#vtxo).

View File

@@ -0,0 +1,21 @@
---
sidebar_position: 5
title: 'Leaving the Ark'
---
### Overview
Alice wants to leave the Ark and get her funds back on-chain. It requires an on-chain transaction.
### Timeline of events
1. Alice tells ASP she wants to trade [VTXO](#vtxo) for UTXO
2. ASP (with Alice) prepares next [Pool transaction](#pool-transaction-aka-ark-transaction):
- an additional output is added, locked by `Alice`
3. Alice creates a [Forfeit transaction](#forfeit-transaction-):
- spends from VTXO (1) with `Alice + ASP`
- adds connector output from Pool transaction (2) as input
- signs it and send it to the ASP
4. ASP broadcasts [Pool transaction](#pool-transaction-aka-ark-transaction)
5. Alice has now a new UTXO
6. For at most 4 weeks, Alice will be able to double spend hers [VTXO](#vtxo), but if she does it, the ASP will have time (24 hours) to grab the funds from the [VTXO](#vtxo) to itself using the [Forfeit transaction](#forfeit-transaction-)

View File

@@ -19,13 +19,13 @@ Ark has a UTXO set that lives off the chain. These utxos are referred to as virt
## Moments
### Onboarding the Ark
### Boarding the Ark
When a User sends funds to the Ark and gets VTXOs in return.
### Unilateral exit
When a user decides to withdraw his funds from the Ark to mainchain, without asking the ASP.
When a user decides to withdraw his funds from the Ark to mainchain, without asking the ASP for permission.
### Round
@@ -45,8 +45,8 @@ Periodic transaction crafted by the ASP that hits mainchain and creates new VTXO
### Redeem transaction \*
- Insurance for Alice, in case the ASP stops responding
- Allows Alice to receive funds back from the Ark
- Insurance for Alice, in case the ASP denies boarding on the Ark
- Allows Alice to receive funds back from the Ark after a grace period ie. 24 hours
| Inputs | Outputs |
| ------------------------------------------ | -------------------------------------- |

View File

@@ -0,0 +1,25 @@
---
sidebar_position: 4
title: 'Payments'
---
### Overview
Alice wants to send funds to Bob inside the Ark.
- All Ark payments and ransactions are off-chain.
- Bob doesn't need to have funds inside the Ark to receive funds. (ie. inbound liquidity problem)
- Bob doesn't need to be online to receive funds
- Bob wil be required to be online **at least once every 4 weeks** to keep her funds safe.
### Timeline of events
1. Alice tells ASP to send [VTXO](#vtxo) to Bob
2. ASP (with Alice) prepares next [Pool transaction](#pool-transaction-aka-ark-transaction)
3. Alice creates a [Forfeit transaction](#forfeit-transaction-):
- spends from VTXO (1) via `Alice + ASP`
- adds connector output from Pool transaction (2) as input
- signs (SIGHASH_ALL) and sends it to the ASP
4. ASP broadcasts [Pool transaction](#pool-transaction-aka-ark-transaction)
5. Bob has now a new [VTXO](#vtxo)
6. For at most 4 weeks, Alice will be able to double spend hers [VTXO](#vtxo), but if she does it, the ASP will have time to grab the funds from the [VTXO](#vtxo) to itself using the [Forfeit transaction](#forfeit-transaction-)

View File

@@ -1,4 +1,4 @@
{
"label": "Create an Ark",
"position": 4
"position": 5
}

View File

@@ -1,4 +1,4 @@
{
"label": "Protocol",
"position": 2
"position": 3
}

View File

@@ -1,51 +0,0 @@
---
sidebar_position: 3
title: 'Timeline'
---
### Onboarding the Ark
1. Alice creates a [Funding transaction](#funding-transaction):
- adds any segwit output as an input (<u>must be segwit</u>)
- adds output locked by `(Alice + ASP) or (ASP in 1 month)`
- sends it to ASP, not signed
2. Alice receives a [Redeem transaction](#redeem-transaction-) from the ASP:
- signed by the ASP, spends Funding transaction (1) via `Alice + ASP`
- has one output locked by `(Alice + ASP) or (Alice in 24 hours)`
3. Alice signs and broadcasts Funding transaction (1)
- Is now safe for Alice to broadcast this funding transaction because now she can leave anytime with
[Redeem transaction](#redeem-transaction-) (2) spending `Alice in 24h`, i.e. Alice will be able to get
her funds back in 24 hours.
4. ASP (with Alice) prepares next [Pool transaction](#pool-transaction-aka-ark-transaction)
5. Alice creates a [Forfeit transaction](#forfeit-transaction-):
- spends from Redeem transaction (2) via `Alice + ASP`
- adds connector output from Pool transaction (4) as input
- signs (SIGHASH_ALL) and sends it to the ASP
6. ASP broadcasts [Pool transaction](#pool-transaction-aka-ark-transaction) (4)
7. Alice has now a [VTXO](#vtxo)
8. After 1 month ASP spends Funding transaction (1) via `ASP in 1 month`
### Payment to Bob
1. Alice tells ASP to send [VTXO](#vtxo) to Bob
2. ASP (with Alice) prepares next [Pool transaction](#pool-transaction-aka-ark-transaction)
3. Alice creates a [Forfeit transaction](#forfeit-transaction-):
- spends from VTXO (1) via `Alice + ASP`
- adds connector output from Pool transaction (2) as input
- signs (SIGHASH_ALL) and sends it to the ASP
4. ASP broadcasts [Pool transaction](#pool-transaction-aka-ark-transaction)
5. Bob has now a new [VTXO](#vtxo)
6. For at most 4 weeks, Alice will be able to double spend hers [VTXO](#vtxo), but if she does it, the ASP will have time to grab the funds from the [VTXO](#vtxo) to itself using the [Forfeit transaction](#forfeit-transaction-)
### Exiting the Ark
1. Alice tells ASP she wants to trade [VTXO](#vtxo) for UTXO
2. ASP (with Alice) prepares next [Pool transaction](#pool-transaction-aka-ark-transaction):
- an additional output is added, locked by `Alice`
3. Alice creates a [Forfeit transaction](#forfeit-transaction-):
- spends from VTXO (1) with `Alice + ASP`
- adds connector output from Pool transaction (2) as input
- signs it and send it to the ASP
4. ASP broadcasts [Pool transaction](#pool-transaction-aka-ark-transaction)
5. Alice has now a new UTXO
6. For at most 4 weeks, Alice will be able to double spend hers [VTXO](#vtxo), but if she does it, the ASP will have time (24 hours) to grab the funds from the [VTXO](#vtxo) to itself using the [Forfeit transaction](#forfeit-transaction-)

View File

@@ -1,4 +1,4 @@
{
"label": "Join the Ark",
"position": 3
"position": 4
}