forked from DeFiOptions/DeFiOptions-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dod-whitepaper-draft.txt
165 lines (152 loc) · 10.1 KB
/
dod-whitepaper-draft.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
****** Before — After — Bridge ******
Before — This will be the first section of your white paper. In it, you describe the reader’s world as it is right now. Provide as much detail as you can to create a gap where your solution will fit or foreground a lack that will need to be fixed for that world to be perfect.
[
Where we are now, crypto options are a nasent market defined by a variety of on-chain amm, off-chain order books, request for quote systems and OTC systems targeting primarily to traders. These leverage oracles of all sorts, stablecoins (usually centrlized ones or ones dependant on off chain credit origination) and a variety of underlying tokens/nfts on particular chains.
]
After –In this section, you will paint a world where the problem you foregrounded and highlighted in the first section is solved. Bring the readers to imagine that world and how better it is than what they know.
[
In the future, dex crypto options represents on the deeps markets for on chain liquity, where un collateralized lending markets are heavily active buyers of option to hedge their loan books on the long tail of tokens/nfts collateral, traders pricing and hedging those options for them while leverating a credit system that is no longer overly reliant upon stablecoins built on off chain originated credit.
]
Bridge — This is the last section, and it is where you describe your solution as what makes the new, better world possible. Describe the solution’s design, protocol, and implementation process concerning the reader’s ability to comprehend the technical aspects. In essence, in this section, you are presenting your solution as the bridge between the current world and the possible better world.
[
DeFI Options DAO is defined as a Decentralized Options Exchange where the parameters can be governed by token holders.
This includes:
- exchange contract
- options books
- options registered
- pools registered
- erc20 token that represents an address exchange balance
- trades facilitation
- settlement facilitation
- underlying vault
- inteface
- storage of underlying tokens collateral used for covered calls not marked for rehypothecation
- vault shares
- what oracles traders can use
- dex twap aggregators
- inteface
- underlying feeds abtraction
- chainlink, pyth, etc
- interface
- the differet collateral models (including support for portfolio margin) that can be used for the assets
- default model
- portfolio margin
- how stable/udl token shortages/surplus are factored
- credit systems (on for stablecoins and another for each individual) underlying assets
- stablecoin credit system
- creation/destruction
- creation
- deposits of stables
- when hedging manager enabled on pool approved for borrowing collateral
- destruction
- withdrawals of stables
- when hedges closed enabled on pool approved for borrowing collateral
- internal debt creation/destruction
- destruction
- gains from providing liquidty for traders hedging
- creation
- losses from address exceeding their collateral deposited
- losses from providing liquidty for traders hedging
- losses from rehypothecated collateral
- underlying asset credit system
- creation/destruction
- creation
- deposits of underlying token
- when hedging manager enabled on pool approved for borrowing collateral
- destruction
- withdrawals of underliying token
- when hedges closed enabled on pool approved for borrowing collateral
- internal debt creation/destruction
- destruction
- gains from providing liquidty for traders hedging
- gains from rehypothecated collateral
- creation
- losses from address exceeding their collateral deposited
- losses from providing liquidty for traders hedging
- losses from rehypothecated collateral
- hedging contracts that interface with other protocols that can help offest a traders options exposure (as well as originate credit for those hedges that is destroyed upon expiration of the options/closing of the hedges)
- ideal exposure calc
- current esposure calc
- rebalancing
- interface
- credit tokens that can be redeemed over time for stables coins/underlying assets at an interest rate from the protocol when there is a shortage of the underlying assets
- stablecoins
- define redemption conditions
- can redeem when stables >= credit
- can redeem % debt outstanding owned * (% stables / credit) * stables available, when stables < credit
- once every dao defined withdrawal period
- erc20
- underlying asset
- define redemption conditions
- can redeem when udl token >= udl credit
- can redeem % debt outstanding owned * (% udl token / udl credit) * udl token available, when udl token < udl credit
- once every dao defined withdrawal period
- erc20
- rehypothication contracts that traders+DAO have to approve where they want their collateral they provide to sell options against, can be deposited/withrawn from external protocols for additional yield.
- interface
- liquidity pools that price options based on uploaded pricing surfaces that update automatically with oracle pries or can be static (this can be abstracted in frontends to look like typical limit orders).
- pricing:
- surface (https://thomasvilhena.com/2021/03/a-linear-interpolation-based-liquidity-pool)
- pulled from external amm
- lp tokens
- anyone
- to any one who deposits
- permissioned
- only to owner defined on pool creation
- conditional hedging
- hedging manager defined
- min dollar threshold in oi to hedge
- governace
- uses lp tokens as the governance token, not DAO governance token
- adding what options to buy/sell
- setting updating option price surfaces
- setting underlying price range when to allow for buying/selling options
- interface
- incentivization functions users can call that manages the exchange
- underlying feed stats updates
- liquidations
- before
- first try(only if more than 24h until expiration, else will just liquidate): collateral call
- second try : liquidation
- liquidation fee and penalty payed to DAO
- after maturity (settlement)
- settlement fee payed to DAO
- protocol goverance and settings
- function setCirculatingSupply(uint supply) external;
Allows token holders to set the circulating suply of dod, can not be set smaller than the previously set setting, cannot exeed that max supply for the token
- function setTokenRate(address token, uint v, uint b) external;
Sets the decimal normalization used to adjust the tokens decimals to the decimals DOD uses internally
- function setAllowedToken(address token, uint v, uint b) external;
Sets the allow stable coin
- function RemoveAllowedToken(address token, uint v, uint b) external;
Removes a previously the allow stable coin
- function updateCreditWithdrawlTimeLock(uint duration) external;
Sets the rate at which and address holding credit tokens can redeem them for stables/underlying tokens, defaults to 24 hours, min 2 hours max 48 hours
- function applyCreditInterestRate(uint value, uint date) external view returns (uint);
Applies the interest rate the DAO is willing to pay on credit tokens
- function setUnderlyingCreditInterestRate(uint i, uint b, address udlAsset) external;
Applies the interest rate the DAO is willing to pay on underlying credit tokens on a particlar asset
- function setDebtInterestRate(uint i, uint b, address udlAsset) external;
Applies the interest rate the DAO wants to charge on DAO issued credit
- function setUnderlyingDebtInterestRate(uint i, uint b, address udlAsset) external;
Applies the interest rate the DAO wants to charge on a particlar asset
- function setUdlCollateralManager(address udlFeed, address ctlMngr) external;
Approved the allowed collateral manager for a paricualr underlying feed
- function setDexOracleTwapPeriod(address dexOracleAddress, uint256 _twapPeriod) external;
Sets the dex twap oracle period, min 2 hours, max 1 day
- function setBaseIncentivisation(uint amount) external;
Sets the amount of credit the DAO wants to issue to an address for calling the incentivized functions on the exchange
- function setProcessingFee(uint f, uint b) external;
Sets rate the DAO wants to have when processing liquidations and settling ITM options, does not included hard coded rate for liquidations
- function transferTokenBalance(address to, address tokenAddr, uint256 value) external;
Tokens stored in protocol settings address and be transfered by DAO
- function transferBalance(address to, uint amount) external;
Credit balance of protocol settings (from fees and liquidations) address and be transfered by DAO
- function transferGovTokens(address to, uint amount) external;
Governance tokens held by DAO in protocol settings can be transfered by DAO
]
****** Features — Advantages — Benefits (FAB) ******
This is another white paper template you can use. It focuses more on the solution you are presenting to the reader or the target customer. This is best suited when the solution you are presenting is meant for a problem that is almost obvious to the reader.
Features — In the first section of the white paper will break down and describe the features of your solution. For example, if you are introducing a new blockchain, you will describe the mining or consensus process, the network architecture, and the wallet design.
Advantages — In this section, you will describe what things give the solution a better chance at succeeding. Still, on your new blockchain, you can describe the capacity of the team behind it as well as the resilience of the technology you are using.
Benefits — This is the most critical part because it is what will sell your solution. People are always interested in how something makes their lives better. Describing benefits is about showing people how the solution will improve the quality of their life or that of their business.