diff --git a/token-swap/proposals/DynamicMarketMaking.md b/token-swap/proposals/DynamicMarketMaking.md new file mode 100644 index 00000000..20901def --- /dev/null +++ b/token-swap/proposals/DynamicMarketMaking.md @@ -0,0 +1,13 @@ +# Serum DEX Dynamic market making curve for token-swap + +Implement a curve for token-swap that accepts serum CLOB dex for the same pair. Implementation should 'split'/'route' portion of order using predefined curve for the pool and the rest to the dex as IOC order. Dynamic curve should find ideal size of the order based on the curve parameters and market depth for a given DEX. + +Ideas: +* CLOB fee discounts + - If pool contains SRM use tressure account to receive `taker` discounts from dex + - Curve can provide additional stake pool for LPs to store SRM to receive `taker` discounts +* Fees + - AMM should charge same fee structure with 30bps difference from fees in CLOB + +## Links +1. CLOB implementation: https://github.com/project-serum/serum-dex/tree/master/dex \ No newline at end of file diff --git a/token-swap/proposals/ProactiveMarketMaking.md b/token-swap/proposals/ProactiveMarketMaking.md new file mode 100644 index 00000000..0d2ed791 --- /dev/null +++ b/token-swap/proposals/ProactiveMarketMaking.md @@ -0,0 +1,29 @@ +# Proactive market making curve for token-swap + +Add additional curve to token-swap program that support proactive market making. + +The core of PMM is essentially calculating one integral and solving two quadratic equations. It is implemented in Dodo protocol described [here](https://dodoex.github.io/docs/docs/pmm). + +As a part of PR please implement as described in [[1](https://dodoex.github.io/docs/docs/pmmDetails)] and [[2](https://dodoex.github.io/docs/docs/math)]. + + +For reference pricing formula is: + + + +Where is defined to be the piecewise function below: + + +
+ +
+ + + is the market price provided by an oracle, and is a parameter in the range (0, 1). + +The funding pool of PMM is described by four parameters: + +: base token regression target - total number of base tokens deposited by liquidity providers +: quote token regression target - total number of quote tokens deposited by liquidity providers +: base token balance - number of base tokens currently in the pool +: quote token balance - number of quote tokens currently in the pool \ No newline at end of file