SwapPool Interface Design #89
Replies: 11 comments
-
Can you explain exactly how does it differ from standard AMM? lets say uniswap v3. |
Beta Was this translation helpful? Give feedback.
-
The idea is to offer a simple static rate between vouchers as well as an option for an oracle so you can have dynamic rates if needed. Also to be able to have more than 2 assets in the pool (all are swapable) We also want to do away with the pool token if possible. Uniswap vs is nice - but I've yet to get our demurrage contracts working on there @kamikazechaser can say more |
Beta Was this translation helpful? Give feedback.
-
rebased tokens should work with v3, but the liquidity provider will incur the lose. |
Beta Was this translation helpful? Give feedback.
-
@sirpy please feel free to get the voucher contracts working with uniswap or help put us in touch with someone that can help. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
@sirpy You can create your own voucher here https://sarafu.network/publish let me know if you need some CELO |
Beta Was this translation helpful? Give feedback.
-
I recently got involved with GrassrootsEconomics and @WillRuddick just introduced me to this discussion. So here are my thoughts: After looking into the SwapPool contract I understand why some are more convinced by that. No matter how you tweak the concentrated liquidity parameters of Uniswap v3 as proposed by @sirpy, the price is still determined based on a constant product bonding curve. Which makes total sense if the objective is to generate market equilibrium between openly accessible assets. But my question would be: Is this even a desirable mechanism for a voucher marketplace? As a final thought I want to mention Balancer and Symmetric (a fork on Celo). This protocol enables multi-token pools with weights assigned to each asset (max. 8 token though). This gives more flexibility and control in pricing mechanisms compared to other standard DeFi protocols. Would be interested in what you think about them. |
Beta Was this translation helpful? Give feedback.
-
The idea of having static rate pools (exchanges) seems to be missing with these (like most DEXs). |
Beta Was this translation helpful? Give feedback.
-
I support this result |
Beta Was this translation helpful? Give feedback.
-
Pool Publishing (like Create Voucher) Defining a pool (publishing the contract) - like the stepper for Voucher Creation. Create Pool ... Sign Deposit Tokens into the Pool Exchange Vouchers in the Pool Auto Routing |
Beta Was this translation helpful? Give feedback.
-
Develop a SwapPool interface on Sarafu.Network/swap
that allows someone to
Define a Pool, Deposit into a pool and Exchange
Create
Deposit: Add their assets to the pool (given the rules above)
Exchange assets (given the rules above): Add a voucher and specify which other voucher you want in exchange.
Consider a get quote function for checking prices before executing any transfers. (control for potential slippage)
Note that the Price and be pushed to an oracle (like Uniswap can handle bonding curves if needed) (by default static rate)
MVP
Basic functions and visibility to reach the swap-pool on sarafu.network/swap
Notes:
Keep a registry of these contracts up to date (sync) (on chain- and off chain)
and a basic way to lookup existing pools (similar to exploring vouchers)
Consider a graph that holds the nodes (vouchers) and edges (pools) in order to perform offline operations - like shortest paths.
Consider a market place view where all other vouchers (products) are shown that can be reached by this graph of vouchers and pools. The avalaible products to look for would be all those paths from the users holdings to all other vouchers.
Consider a visualization of this graph (similar to that of transfers on (viz.sarafu.network)
use cases
upgrading contracts
someone makes a new voucher, puts it in the pool and specifices that the old one can be swapped
old contracts (with replacements) can be flagged
Specifying that someone wants to exchange their vouchers (products) for an amount of another asset (like cUSD). // vending machine
https://github.com/nolash/erc20-pool here is the pool contract we've been working on.
https://github.com/nolash/erc20-limiter this is the limiter as well (for capping indexed vouchers)
Beta Was this translation helpful? Give feedback.
All reactions