diff --git a/website/docs/intro/_category_.json b/website/docs/intro/_category_.json new file mode 100644 index 0000000..47a62bb --- /dev/null +++ b/website/docs/intro/_category_.json @@ -0,0 +1,4 @@ +{ + "label": "Get Started", + "position": 2 +} diff --git a/website/docs/intro/boarding.md b/website/docs/intro/boarding.md new file mode 100644 index 0000000..51ff128 --- /dev/null +++ b/website/docs/intro/boarding.md @@ -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). \ No newline at end of file diff --git a/website/docs/intro/leaving.md b/website/docs/intro/leaving.md new file mode 100644 index 0000000..a255f6e --- /dev/null +++ b/website/docs/intro/leaving.md @@ -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 her’s [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-) diff --git a/website/docs/specs/nomenclature.md b/website/docs/intro/nomenclature.md similarity index 93% rename from website/docs/specs/nomenclature.md rename to website/docs/intro/nomenclature.md index c4fba62..b566b27 100644 --- a/website/docs/specs/nomenclature.md +++ b/website/docs/intro/nomenclature.md @@ -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 | | ------------------------------------------ | -------------------------------------- | diff --git a/website/docs/intro/payments.md b/website/docs/intro/payments.md new file mode 100644 index 0000000..581bf34 --- /dev/null +++ b/website/docs/intro/payments.md @@ -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 her’s [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-) diff --git a/website/docs/provider/_category_.json b/website/docs/provider/_category_.json index 2f9cfa4..c99d6d2 100644 --- a/website/docs/provider/_category_.json +++ b/website/docs/provider/_category_.json @@ -1,4 +1,4 @@ { "label": "Create an Ark", - "position": 4 + "position": 5 } diff --git a/website/docs/specs/_category_.json b/website/docs/specs/_category_.json index 9f49038..e7f3b6a 100644 --- a/website/docs/specs/_category_.json +++ b/website/docs/specs/_category_.json @@ -1,4 +1,4 @@ { "label": "Protocol", - "position": 2 + "position": 3 } diff --git a/website/docs/specs/timeline.md b/website/docs/specs/timeline.md deleted file mode 100644 index 3b64a7c..0000000 --- a/website/docs/specs/timeline.md +++ /dev/null @@ -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 (must be segwit) - - 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 her’s [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 her’s [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-) diff --git a/website/docs/user/_category_.json b/website/docs/user/_category_.json index e4b5cd3..f5287e8 100644 --- a/website/docs/user/_category_.json +++ b/website/docs/user/_category_.json @@ -1,4 +1,4 @@ { "label": "Join the Ark", - "position": 3 + "position": 4 }