From 505ead0e38bf9390311fedfaa6b9bd1390b9465e Mon Sep 17 00:00:00 2001 From: Kevin-OpenSource-Labs Date: Tue, 21 Jul 2020 10:12:52 +0800 Subject: [PATCH 01/12] Create DEXMarketMaker.md --- docs/draft/DEXMarketMaker.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 docs/draft/DEXMarketMaker.md diff --git a/docs/draft/DEXMarketMaker.md b/docs/draft/DEXMarketMaker.md new file mode 100644 index 0000000..d7389bd --- /dev/null +++ b/docs/draft/DEXMarketMaker.md @@ -0,0 +1,31 @@ +# OIP-24: DEX MarketMaker + +| Author | Kevin-OpenSource-Labs | +| :------- | ------------------------ | +| Status | Draft | +| Type | Standard Track | +| Category | Application | +| Created | 2020-7-21 | + +## 1. Introduction + +User can create their own token on OKChain and allow other user to trade it. But sometimes some tokens are lack of liquidity. User need a market maker robot to supply liquidity and make the tokens in fair value. + +DEXMarketMaker can provide a simple market maker robot for user. User also can implment their own market maker with more details based on it. + +## 2. Summary + +This OIP aims to provide a market maker frameworker for okex dex. + +## 3. Proposal + +DEXMarketMaker is going to provide an open source, extendsible, and convenient framework for any user to implmenet their own customized market maker for okex dex with more details. +It contains the following main models: + +a. Fair value module - The module is responsible to getting lasteast information and calculating fair value and market state +b. Quote module - The module is responsible to manage buy and sell pending orders on market based on fair value and quote strategy. If the market state is abnormal, it should cancel all pending orders. +c. Exposure auto hedge module - The module is responsible to hedge exposure if the expose is going beyond of defined threshold + +## 4. Status + +This OIP is under implementation based on okchain-java-sdk. From 13a18291eacd1483800ae8f7391b1c13b3730876 Mon Sep 17 00:00:00 2001 From: Kevin-OpenSource-Labs Date: Tue, 21 Jul 2020 10:16:59 +0800 Subject: [PATCH 02/12] Modify some text format and file name --- docs/draft/{DEXMarketMaker.md => OIP-24 DEXMarketMaker.md} | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename docs/draft/{DEXMarketMaker.md => OIP-24 DEXMarketMaker.md} (69%) diff --git a/docs/draft/DEXMarketMaker.md b/docs/draft/OIP-24 DEXMarketMaker.md similarity index 69% rename from docs/draft/DEXMarketMaker.md rename to docs/draft/OIP-24 DEXMarketMaker.md index d7389bd..978397c 100644 --- a/docs/draft/DEXMarketMaker.md +++ b/docs/draft/OIP-24 DEXMarketMaker.md @@ -22,9 +22,9 @@ This OIP aims to provide a market maker frameworker for okex dex. DEXMarketMaker is going to provide an open source, extendsible, and convenient framework for any user to implmenet their own customized market maker for okex dex with more details. It contains the following main models: -a. Fair value module - The module is responsible to getting lasteast information and calculating fair value and market state -b. Quote module - The module is responsible to manage buy and sell pending orders on market based on fair value and quote strategy. If the market state is abnormal, it should cancel all pending orders. -c. Exposure auto hedge module - The module is responsible to hedge exposure if the expose is going beyond of defined threshold +#a. Fair value module - The module is responsible to getting lasteast information and calculating fair value and market state +#b. Quote module - The module is responsible to manage buy and sell pending orders on market based on fair value and quote strategy. If the market state is abnormal, it should cancel all pending orders. +#c. Exposure auto hedge module - The module is responsible to hedge exposure if the expose is going beyond of defined threshold ## 4. Status From 719cf2f58f0c3273acaa2904c28d3ffdb2cf33d8 Mon Sep 17 00:00:00 2001 From: Kevin-OpenSource-Labs Date: Tue, 21 Jul 2020 10:21:27 +0800 Subject: [PATCH 03/12] exposure hedge modified to risk control --- docs/draft/OIP-24 DEXMarketMaker.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/docs/draft/OIP-24 DEXMarketMaker.md b/docs/draft/OIP-24 DEXMarketMaker.md index 978397c..0c37c84 100644 --- a/docs/draft/OIP-24 DEXMarketMaker.md +++ b/docs/draft/OIP-24 DEXMarketMaker.md @@ -22,9 +22,17 @@ This OIP aims to provide a market maker frameworker for okex dex. DEXMarketMaker is going to provide an open source, extendsible, and convenient framework for any user to implmenet their own customized market maker for okex dex with more details. It contains the following main models: -#a. Fair value module - The module is responsible to getting lasteast information and calculating fair value and market state -#b. Quote module - The module is responsible to manage buy and sell pending orders on market based on fair value and quote strategy. If the market state is abnormal, it should cancel all pending orders. -#c. Exposure auto hedge module - The module is responsible to hedge exposure if the expose is going beyond of defined threshold +# a. Fair value module + +The module is responsible to getting lasteast information and calculating fair value and market state + +# b. Quote module + +The module is responsible to manage buy and sell pending orders on market based on fair value and quote strategy. If the market state is abnormal, it should cancel all pending orders + +# c. Risk control module + +The module is responsible to control risk, include but not limited to hedge exposure, pnl monitoring, etc. ## 4. Status From 038c86d69ec0ea70de2c32998e90559f58a2b2ac Mon Sep 17 00:00:00 2001 From: Kevin-OpenSource-Labs Date: Tue, 21 Jul 2020 10:22:25 +0800 Subject: [PATCH 04/12] Reduce the module highlight level --- docs/draft/OIP-24 DEXMarketMaker.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/draft/OIP-24 DEXMarketMaker.md b/docs/draft/OIP-24 DEXMarketMaker.md index 0c37c84..6e3647a 100644 --- a/docs/draft/OIP-24 DEXMarketMaker.md +++ b/docs/draft/OIP-24 DEXMarketMaker.md @@ -22,15 +22,15 @@ This OIP aims to provide a market maker frameworker for okex dex. DEXMarketMaker is going to provide an open source, extendsible, and convenient framework for any user to implmenet their own customized market maker for okex dex with more details. It contains the following main models: -# a. Fair value module +### a. Fair value module The module is responsible to getting lasteast information and calculating fair value and market state -# b. Quote module +### b. Quote module The module is responsible to manage buy and sell pending orders on market based on fair value and quote strategy. If the market state is abnormal, it should cancel all pending orders -# c. Risk control module +### c. Risk control module The module is responsible to control risk, include but not limited to hedge exposure, pnl monitoring, etc. From 9aa34bf75bdbddadadcb33f7eb5fe1fb60b2de86 Mon Sep 17 00:00:00 2001 From: Kevin-OpenSource-Labs Date: Tue, 21 Jul 2020 10:27:39 +0800 Subject: [PATCH 05/12] trivial modify the text description --- docs/draft/OIP-24 DEXMarketMaker.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/draft/OIP-24 DEXMarketMaker.md b/docs/draft/OIP-24 DEXMarketMaker.md index 6e3647a..1470ef4 100644 --- a/docs/draft/OIP-24 DEXMarketMaker.md +++ b/docs/draft/OIP-24 DEXMarketMaker.md @@ -9,7 +9,7 @@ ## 1. Introduction -User can create their own token on OKChain and allow other user to trade it. But sometimes some tokens are lack of liquidity. User need a market maker robot to supply liquidity and make the tokens in fair value. +User can create their own token on OKChain and allow other user to trade it. But sometimes some tokens are lack of liquidity. User need a market maker robot to supply liquidity and make the token in reasonable price. DEXMarketMaker can provide a simple market maker robot for user. User also can implment their own market maker with more details based on it. From 9fb4d09cf800664de2f0230d3890be3c0bb6d09f Mon Sep 17 00:00:00 2001 From: Kevin-OpenSource-Labs Date: Tue, 21 Jul 2020 10:33:46 +0800 Subject: [PATCH 06/12] Update and rename OIP-24 DEXMarketMaker.md to OIP-24.md --- docs/draft/{OIP-24 DEXMarketMaker.md => OIP-24.md} | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) rename docs/draft/{OIP-24 DEXMarketMaker.md => OIP-24.md} (57%) diff --git a/docs/draft/OIP-24 DEXMarketMaker.md b/docs/draft/OIP-24.md similarity index 57% rename from docs/draft/OIP-24 DEXMarketMaker.md rename to docs/draft/OIP-24.md index 1470ef4..21a219c 100644 --- a/docs/draft/OIP-24 DEXMarketMaker.md +++ b/docs/draft/OIP-24.md @@ -9,7 +9,7 @@ ## 1. Introduction -User can create their own token on OKChain and allow other user to trade it. But sometimes some tokens are lack of liquidity. User need a market maker robot to supply liquidity and make the token in reasonable price. +User can create their own token on OKChain and allow other users to trade it. But sometimes some tokens are lack of liquidity. User need a market maker robot to supply liquidity and make the token in reasonable price. DEXMarketMaker can provide a simple market maker robot for user. User also can implment their own market maker with more details based on it. @@ -24,15 +24,15 @@ It contains the following main models: ### a. Fair value module -The module is responsible to getting lasteast information and calculating fair value and market state +The module is responsible for getting lasteast information and calculating fair value and market state ### b. Quote module -The module is responsible to manage buy and sell pending orders on market based on fair value and quote strategy. If the market state is abnormal, it should cancel all pending orders +The module is responsible for managing buy and sell pending orders on market based on fair value and quote strategy. If the market state is abnormal, it should cancel all pending orders -### c. Risk control module +### c. Risk control module -The module is responsible to control risk, include but not limited to hedge exposure, pnl monitoring, etc. +The module is responsible for risk control, include but not limited to hedge exposure, pnl monitoring, etc. ## 4. Status From e321b08c54647b091e372ecb0804e0df9db4bc25 Mon Sep 17 00:00:00 2001 From: Kevin-OpenSource-Labs Date: Tue, 21 Jul 2020 10:47:09 +0800 Subject: [PATCH 07/12] Modify the text description --- docs/draft/OIP-24.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/draft/OIP-24.md b/docs/draft/OIP-24.md index 21a219c..9248ecb 100644 --- a/docs/draft/OIP-24.md +++ b/docs/draft/OIP-24.md @@ -9,9 +9,9 @@ ## 1. Introduction -User can create their own token on OKChain and allow other users to trade it. But sometimes some tokens are lack of liquidity. User need a market maker robot to supply liquidity and make the token in reasonable price. +User can create their own token on OKChain and allow other users to trade it. But sometimes the tokens are lack of liquidity. -DEXMarketMaker can provide a simple market maker robot for user. User also can implment their own market maker with more details based on it. +DEXMarketMaker can work as a simple market maker bot provide liquidity for specific token. User also can implment their own sophisticated market maker based on it to work as a profitable bot. ## 2. Summary @@ -19,8 +19,7 @@ This OIP aims to provide a market maker frameworker for okex dex. ## 3. Proposal -DEXMarketMaker is going to provide an open source, extendsible, and convenient framework for any user to implmenet their own customized market maker for okex dex with more details. -It contains the following main models: +DEXMarketMaker is going to provide an open source, extendsible, and convenient framework for any user to implmenet their own customized market maker for okex dex with more details. It contains the following main models: ### a. Fair value module From 85db1870a5f8ef39d626c9427cffbeff830254ae Mon Sep 17 00:00:00 2001 From: Kevin-OpenSource-Labs Date: Tue, 21 Jul 2020 11:08:51 +0800 Subject: [PATCH 08/12] Add open source project url to QIP --- docs/draft/OIP-24.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/draft/OIP-24.md b/docs/draft/OIP-24.md index 9248ecb..12a9aa6 100644 --- a/docs/draft/OIP-24.md +++ b/docs/draft/OIP-24.md @@ -36,3 +36,4 @@ The module is responsible for risk control, include but not limited to hedge exp ## 4. Status This OIP is under implementation based on okchain-java-sdk. +The open source project URL is: https://github.com/Kevin-OpenSource-Labs/DEXMarketMaker From 7df045bbc669e31777de26d5ff9edc091a786c1e Mon Sep 17 00:00:00 2001 From: Kevin-OpenSource-Labs Date: Tue, 21 Jul 2020 11:09:46 +0800 Subject: [PATCH 09/12] White the project url in single line --- docs/draft/OIP-24.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/draft/OIP-24.md b/docs/draft/OIP-24.md index 12a9aa6..56f50d4 100644 --- a/docs/draft/OIP-24.md +++ b/docs/draft/OIP-24.md @@ -36,4 +36,5 @@ The module is responsible for risk control, include but not limited to hedge exp ## 4. Status This OIP is under implementation based on okchain-java-sdk. + The open source project URL is: https://github.com/Kevin-OpenSource-Labs/DEXMarketMaker From d8dd17f7401c535caf753e16db13cd94c77dc952 Mon Sep 17 00:00:00 2001 From: Kevin-OpenSource-Labs Date: Tue, 21 Jul 2020 11:23:51 +0800 Subject: [PATCH 10/12] Add account management component --- docs/draft/OIP-24.md | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/docs/draft/OIP-24.md b/docs/draft/OIP-24.md index 56f50d4..f60e13d 100644 --- a/docs/draft/OIP-24.md +++ b/docs/draft/OIP-24.md @@ -19,19 +19,23 @@ This OIP aims to provide a market maker frameworker for okex dex. ## 3. Proposal -DEXMarketMaker is going to provide an open source, extendsible, and convenient framework for any user to implmenet their own customized market maker for okex dex with more details. It contains the following main models: +DEXMarketMaker is going to provide an open source, extendsible, and convenient framework for any user to implmenet their own customized market maker for okex dex with more details. It contains the following main components: -### a. Fair value module +#### a. Account management component -The module is responsible for getting lasteast information and calculating fair value and market state +The component is responsible for creating account and getting account info, etc. -### b. Quote module +#### b. Fair value component -The module is responsible for managing buy and sell pending orders on market based on fair value and quote strategy. If the market state is abnormal, it should cancel all pending orders +The component is responsible for getting lasteast information and calculating fair value and market state -### c. Risk control module +#### c. Quote component -The module is responsible for risk control, include but not limited to hedge exposure, pnl monitoring, etc. +The component is responsible for managing buy and sell pending orders on market based on fair value and quote strategy. If the market state is abnormal, it should cancel all pending orders + +#### d. Risk control component + +The component is responsible for risk control, include but not limited to hedge exposure, pnl monitoring, etc. ## 4. Status From 6e3f0976a903450dcee278811a6e9ef88ad2a4ec Mon Sep 17 00:00:00 2001 From: Kevin-OpenSource-Labs Date: Wed, 22 Jul 2020 16:11:36 +0800 Subject: [PATCH 11/12] Fixed a typo --- docs/draft/OIP-24.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/draft/OIP-24.md b/docs/draft/OIP-24.md index f60e13d..6881fdb 100644 --- a/docs/draft/OIP-24.md +++ b/docs/draft/OIP-24.md @@ -11,11 +11,11 @@ User can create their own token on OKChain and allow other users to trade it. But sometimes the tokens are lack of liquidity. -DEXMarketMaker can work as a simple market maker bot provide liquidity for specific token. User also can implment their own sophisticated market maker based on it to work as a profitable bot. +DEXMarketMaker can work as a simple market maker bot provide liquidity for specific token. User also can implment their own sophisticated market maker strategy based on it to work as a profitable bot ## 2. Summary -This OIP aims to provide a market maker frameworker for okex dex. +This OIP aims to provide a market maker frameworker for okex dex ## 3. Proposal @@ -23,11 +23,11 @@ DEXMarketMaker is going to provide an open source, extendsible, and convenient f #### a. Account management component -The component is responsible for creating account and getting account info, etc. +The component is responsible for creating account and getting account info, etc #### b. Fair value component -The component is responsible for getting lasteast information and calculating fair value and market state +The component is responsible for getting latest information and calculating fair value / market state #### c. Quote component @@ -35,7 +35,7 @@ The component is responsible for managing buy and sell pending orders on market #### d. Risk control component -The component is responsible for risk control, include but not limited to hedge exposure, pnl monitoring, etc. +The component is responsible for risk control, include but not limited to hedge exposure, pnl monitoring, etc ## 4. Status From 5fa34ae8eb8265ed1315ba1499f751932388d953 Mon Sep 17 00:00:00 2001 From: Kevin-OpenSource-Labs Date: Thu, 20 Aug 2020 01:12:52 +0800 Subject: [PATCH 12/12] Update OIP-24.md Change to project MarketMaker --- docs/draft/OIP-24.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/draft/OIP-24.md b/docs/draft/OIP-24.md index 6881fdb..aace63f 100644 --- a/docs/draft/OIP-24.md +++ b/docs/draft/OIP-24.md @@ -41,4 +41,4 @@ The component is responsible for risk control, include but not limited to hedge This OIP is under implementation based on okchain-java-sdk. -The open source project URL is: https://github.com/Kevin-OpenSource-Labs/DEXMarketMaker +The open source project URL is: https://github.com/Kevin-OpenSource-Labs/MarketMaker