From d1c2708a133846b2cf57165e1657a33d260ef5f8 Mon Sep 17 00:00:00 2001 From: sporejack Date: Wed, 15 Dec 2021 10:32:45 +1000 Subject: [PATCH 1/4] Create documentation directory --- docs/.gitkeep | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 docs/.gitkeep diff --git a/docs/.gitkeep b/docs/.gitkeep new file mode 100644 index 00000000..e69de29b From 9f963b5014e5532c476abf5fe01e56d9ff85335c Mon Sep 17 00:00:00 2001 From: sporejack Date: Wed, 15 Dec 2021 11:03:16 +1000 Subject: [PATCH 2/4] Add configuration docs --- docs/config.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 docs/config.md diff --git a/docs/config.md b/docs/config.md new file mode 100644 index 00000000..e69de29b From ac5e4f5c8e901d9fe649ab0da9c30fe5631a52f4 Mon Sep 17 00:00:00 2001 From: sporejack Date: Wed, 15 Dec 2021 14:49:41 +1000 Subject: [PATCH 3/4] Add roles and parameters --- docs/config.md | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/docs/config.md b/docs/config.md index e69de29b..b7744e91 100644 --- a/docs/config.md +++ b/docs/config.md @@ -0,0 +1,56 @@ +# Configuring Perpetual Pools # + +Any given instance of a Perpetual Pools deployment consists of various +parameters that govern various aspects of the system's behaviour. Broadly, these +are divisible into two categories: factory parameters and pool parameters. The +latter category consists of the parameters responsible for a given pool and thus +do not affect the values of the former category. + +## Roles ## + +These are the *externally-facing* roles in an instance of a Perpetual Pools +system: + +| Name | Description | +| --- | --- | +| Fee receiver | TODO | +| Secondary fee receiver | TODO | +| Factory owner | TODO | +| Pool owner | TODO | + +## Parameters ## + +### Pools ### + +These are the configurable parameters of an individual pool: + +| Name | Type | Deployment Only? | Who? | Description | +| --- | --- | --- | --- | --- | +| Pool Governor | `address` | False | Pool Governor | Essentially the owner of the pool | +| Secondary Fee Receiver | `address` | False | Secondary fee receiver | Receipient of secondary fee revenue | +| Fee Receiver | `address` | False | Pool Governor | Receipient of primary fee revenue | +| Oracle Wrapper | `address` | True | Deployer | TODO | +| Settlement ETH Oracle | `address` | True | Deployer | TODO | +| Long Token | `address` | True | Deployer | TODO | +| Short Token | `address` | True | Deployer | TODO | +| Pool Committer | `address` | True | Deployer | TODO | +| Invariant Checker | `address` | True | Deployer | TODO | +| Pool Name | `string` | True | Deployer | TODO | +| Frontrunning Interval | `uint32` | True | Deployer | TODO | +| Update Interval | `uint32` | True | Deployer | TODO | +| Leverage | `uint16` | True | Deployer | TODO | +| Fee | `uint256` | True | Deployer | TODO | +| Quote Token | `address` | True | Depoyer | TODO | + +### Factory ### + +| Name | Type | Deployment Only? | Who? | Description | +| --- | --- | --- | --- | --- | +| Factory Owner | `address` | False | Factory Owner | TODO | +| Mint/Burn Fee | `uint256` | False | Factory Owner | TODO | +| Primary Fee | `uint256` | False | Factory Owner | TODO | +| Secondary Fee | `uint256` | False | Factory Owner | TODO | +| Maximum Leverage | `uint256` | False | Factory Owner | TODO | +| Autoclaimer | `address` | False | Factory Owner | TODO | +| Pool Keeper | `address` | False | Factory Owner | TODO | + From bb8a341639539ef75a700bdca9a200cbe30590e0 Mon Sep 17 00:00:00 2001 From: sporejack Date: Thu, 16 Dec 2021 13:21:04 +1000 Subject: [PATCH 4/4] Add oracle parameters --- docs/config.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/config.md b/docs/config.md index b7744e91..0bca97f4 100644 --- a/docs/config.md +++ b/docs/config.md @@ -54,3 +54,21 @@ These are the configurable parameters of an individual pool: | Autoclaimer | `address` | False | Factory Owner | TODO | | Pool Keeper | `address` | False | Factory Owner | TODO | +### Oracle Wrappers ### + +#### SMA #### + +| Name | Type | Deployment Only? | Who? | Description | +| --- | --- | --- | --- | --- | +| Sampling Periods | `uint256` | True | Deployer | Number of previous periods to be used for calculating the SMA | +| Price Observer | `address` | True | Deployer | Address of the `PriceObserver` contract which will provide historical **spot** price data | +| Spot Price Oracle | `address` | True | Deployer | Address of **spot** price oracle to average over | +| Update Interval | `uint256` | True | Deployer | Minimum number of seconds between price updates | +| Spot Oracle Precision | `uint256` | True | Deployer | Number of decimal places supported by the underlying spot oracle | + +#### Chainlink #### + +| Name | Type | Deployment Only? | Who? | Description | +| --- | --- | --- | --- | --- | +| Oracle | `address` | True | Deployer | Address of the associated Chainlink oracle to wrap | +