project screenshot 1
project screenshot 2
project screenshot 3
project screenshot 4
project screenshot 5
project screenshot 6

Saave Swap

Saave Swap (pronounced 'Savvy Swap') is a product that offers portfolio managers an asset-efficient method of hedging crypto exposures. Users can short assets without having to fully collateralize the position, within Aave’s collateral requirements.

Saave Swap

Created At

ETHGlobal New York

Project Description

The problem: In traditional finance, institutional investors often find themselves needing to mitigate risks associated with various asset classes while aiming to maximize returns within an acceptable risk threshold. Traditional financial systems offer several efficient methods for hedging these exposures, including futures, options, and securities lending. These avenues enable investors to manage their portfolio risks with differing levels of efficiency. Notably, they are also designed to be tax-efficient, ensuring that portfolio managers do not incur capital gains or losses on their underlying portfolio positions, allowing them to instead accumulate short-term profits or losses on the hedging side of their portfolios.

The crypto solution: With the emergence and widespread acceptance of crypto assets and smart contract protocols like AAVE and Uniswap v3, portfolio managers now have the means to efficiently and swiftly hedge their exposures. They can achieve this by supplying a portion of their portfolio assets to Aave, borrowing assets for hedging on the same platform, and subsequently selling the borrowed assets on Uniswap. While this functionality is currently available through both Contract Accounts and Externally Owned Accounts (EOAs) on the Ethereum network, it's observed that there is no user-friendly product that simplifies exposure hedging without the need for complex transactions. This can be a barrier to entry for many portfolio managers and adds complexity to their transition into the world of crypto. We firmly believe that portfolio managers should be able to concentrate on their core competency—managing portfolios—without having to delve into intricate transaction processes, such as flash loans. One need not understand the intricacies of a computer's inner workings to use it effectively, which reflects the brilliance of modern computing. We anticipate Ethereum will eventually reach a similar level of user-friendliness.

The product: Enter Saave Swap (pronounced 'Savvy Swap'). Saave Swap offers portfolio managers an asset-efficient method of hedging exposures without requiring them to become acquainted with flash loans or the underlying protocols. The final product provides a familiar front end for shorting and covering positions, without the need to understand how it all works behind the scenes. Additionally, users can short assets without having to fully collateralize the position, within the bounds of Aave’s collateral requirements. Asset efficiency enables portfolio managers to construct portfolios that maximize returns while minimizing risk. Additionally, hedging strategies empower portfolio managers to structure their portfolios in a tax-efficient manner by avoiding the need to liquidate their underlying investments to realize long-term gains while still allowing them to adjust their portfolio's risk profile. The user-friendly interface of Saave Swap ensures that users do not need to comprehend the underlying technology to effectively manage their portfolios.

The proof of concept: For ETH Global NYC, we developed a simplified version of Saave Swap, allowing portfolio managers to efficiently short 1ETH and cover the position when the time is right using Aave, Uniswap, and our Saave Swap front-end. To initiate a short position, a user requires 800 USDC (ETH is at $1590 at the time of writing). This makes Saave Swap competitive with other asset-efficient centralized trading platforms and perpetual markets. A key advantage of Saave Swap over perpetual markets is that it always shorts the actual underlying asset rather than a synthetic version, addressing concerns about delivery and operational risks for investors.

The Saave Swap Proof of Concept involves two actions: "Short 1 ETH" and "Cover Short."

User presses “Short 1 ETH” button and Saave Swap initiates the following transaction: uses 800 USDC from the user’s wallet, initiates a flash loan equivalent to 1 ETH in USDC, deposits all USDC into Aave, borrows 1 ETH on Aave, sells 1 ETH for USDC on Uniswap, and repays the USDC flash loan. User presses “Cover Short” button and Saave Swap initiates the following transaction: initiates a flash loan for 1 ETH, repays the 1 ETH loan on Aave (originating from the short position), withdraws all USDC from Aave, purchases 1 ETH on Uniswap, and repays the 1 ETH flash loan.

The future and conclusion: While the above represents a proof of concept, it offers a simplified version of a more comprehensive trading protocol that could be developed on top of Aave and Uniswap. As a team, our aim was to demonstrate how a straightforward product, leveraging existing functionalities, can enhance the user experience. We are enthusiastic about the future, where users may have the flexibility to determine the collateral they wish to post for hedging, opt for automatic collateral top-ups, and potentially even go long using mechanisms similar to those described above, should the protocol gain widespread acceptance.

How it's Made

The front end was built with RainbowKit, wagmi, and Next.js. The backend was constructed using Hardhat. Our contract employs aave core-v3 and Uniswap v3 periphery.

The high-level design was to enable a single-click initiation of a flash loan on AAVE using executeOperation (https://docs.aave.com/developers/guides/flash-loans). This deposits both the flash loan assets and user funds to borrow an asset. Following this, a single swap on Uniswap is executed (https://docs.uniswap.org/contracts/v3/guides/swaps/single-swaps) using the borrowed AAVE asset, and then the flash loan, along with the fee, is repaid.

To cover the borrowed asset, we offer a one-click option to unwind the position. This process borrows a flash loan equivalent to the initial borrowed asset, repays what was initially borrowed, and then withdraws all funds from the vault. With the withdrawn funds, a swap on Uniswap is conducted equivalent to the flash loan amount to pay it back, inclusive of any fees.

Furthermore, if the user is successful in their short position, they will have more assets than they originally deposited, in addition to any yield accrued from the vault.

background image mobile

Join the mailing list

Get the latest news and updates