Swivel-Finance / swuniswap-v3

A Uniswap v3 Equivalent for Swivel's Orderbook
3 stars 3 forks source link

SwuniSwap Product Development #1

Open futurethang opened 2 years ago

futurethang commented 2 years ago

This is following a conversation with @JTraversa and Clark about what Swuniswap is, how it is used, and who will be using it.

This will kick off to the Dev milestones, spearheaded by Janko when defined more thoroughly.

In my admittedly plebeian understanding, Swuniswap allows advanced liquidity providers to align their orders to the continually moving rates of underlying protocols. This is done via position automation, placing orders with short expiration periods and replacing expired orders with new orders at the latest rates until filled, allowing high capital efficiency and reducing impermanent loss.

Swivel is the primary user, but the tool is open to all who can make use of it.

Dev Deeds:

To be groomed with Janko, but here's a short brain dump of items that need to be considered:

I could go on but this is a bit too deep in the stack for my blood.

Product Needs:

This tool is free to use, but at a glance the Readme could do better at helping folks determine if they fit the profile of a Swuniswap user. Without getting too far down the page, the reader should understand 1) What it does 2) How to use it and 3) What pre-requisite knowledge they will need to wield its magic

This would be a good primer at minimum so that anyone can determine whether they should proceed, or at least what they will need to do before proceeding (e.g. read the relevant Substack article, have baseline Python skills, have enough capital to play with in the first place)

JTraversa commented 2 years ago

Thats relatively comprehensive so not adding a ton but id clarify that the primary ask here is to create a basic cloud provider pipeline for our internal perpetual scripting. Past that the questions really relate more to how @Janko might want to do things.

If we want to make it easy and create a docker to set up an instance w/ a sole script thats one direction we could go. Set up the constants and env variables beforehand and deploy.

This would be ideal because it could be shared a bit more with others looking to do similar things, but most likely I'll be the one managing most of this anyways, so a super flexible/deployable pipeline isnt particularly necessary.

Alternatively, I can run a handful of scripts all in one instance.

As far as how many will be running, If i want to be most capital efficient I will run 2 per market (one buying/selling nTokens, one buying/selling zcTokens). So off the bat at least 4.

Oh one thing worth clarifying is that each market needs its own directory or else they will overlap their order recovery storage.

clarkahthompson commented 2 years ago

This covers what we talked about in detail. The one add I’d have is we also talked about the market selector, and whether the market ID needed to differentiate the L2 network. Consensus was no, but I’m still not sure we’ve got that completely figured out.

futurethang commented 2 years ago

This covers what we talked about in detail. The one add I’d have is we also talked about the market selector, and whether the market ID needed to differentiate the L2 network. Consensus was no, but I’m still not sure we’ve got that completely figured out.

@clarkahthompson we got that one going on over here: Swivel-Finance/frontend#354

futurethang commented 2 years ago

README updates added as of https://github.com/Swivel-Finance/swuniswap-v3/commit/e565cdbb8da08ba7291cf8efdb4a16ad847f8a9e