With the introduction of concentrated liquidity pools, Uniswap V3 created a major advancement in potential capital efficiency, but currently these gains are most accessible only to those with enough access to capital to make gas fees negligible and active liquidity management a profitable service. We provide an alternative model, accessible to all users, and focused on maximising the capital efficiency of Uniswap’s liquidity pools overall. Our project introduces zero viscosity position management using what we call superfluidity pools. Using real-time cash flows built on top of Superfluid protocol we stream capital in and out of positions based on incoming price data using Uniswap’s own oracle. By increasing our flow rate based on the price velocity of an asset, we’re able to follow price movements and transfer capital to positions with the highest earning potential. This means a major increase in capital efficiency, reaping the benefits of a narrow concentrated liquidity range while eliminating the risk of lost profits following a price movement. Uniswap’s documentation refers to the potential 4000x gains in capital efficiency by using concentrated liquidity pools, but without active management it is difficult for the user to realise the full potential of this powerful tool. Superfluidity pools provide a convenient and effective liquidity management strategy for all Uniswap users. The largest barrier to the average user is the gas cost of setting new liquidity positions to take advantage of the ideal price range, but our approach circumvents this issue by managing positions through a central smart contract which maintains a wide array of positions around the price at all times. Users deposit assets to a superfluidity pool which then streams and transfers liquidity between an internal set of liquidity pools surrounding the current price.

Superfluidity showcase

How it's made

This project uses Svelte as our front end. We found Svelte easier to work with than a traditional web framework like React. Svelte loads as a single page application and actually is a compiler. This means that it creates static assets which are easier to render than dynamic assets. When combined with Webpack, this makes Svelte particularly good to use for deploying decentralized frontends which can render statically. We also made use of Uniswap and Superfluid javascrip SDKs. We found these difficult to use because of a lack of API reference documentation. Instead, there were some code snippets (which were useful) and a link to the github repository. Further, we struggled with testing our code because we did not want to spend money on mainnet but we wanted to have real price data. It was not clear to us how to do this but a very helpful mentor pointed us to Ganache which we used to create a local devchain from a forked Infura endpoint.