# Litepaper

## Introduction​

### What Is the DefiEdge Protocol?​

DefiEdge is an on-chain asset management protocol that connects liquidity providers with fund managers to streamline user investment in UniswapV3 pools. The protocol is permission-less and aims to automate yield generation.

• Permissionless: DefiEdge has permission-less factory smart contracts that allow anyone to be a strategy manager. Users can invest in the strategies of their choice and can add or withdraw funds anytime without restriction.

• Decentralized: Users choose their preferred strategy manager based on parameters like manager profile, performance consistency, generated APYs, and management fees.

• Non-custodial: The funds in strategies are held in smart contracts. A strategy manager is only able to rebalance the position to generate higher yield.

DefiEdge overview

#### Uniswap 3: The Capital Efficient AMM on Ethereum​

The newly launched UniswapV3 DEX has surpassed all other DEXs in the DeFi ecosystem, with an approximate TVL of $1.77b and a daily trading volume of more than$1b at the time of writing.

Uniswap V2$919.39M$5.7B16.12%
Uniswap V3$2.94B$3.89B75.57%
PancakeSwap$1.5B$5.9B25.42%
SushiSwap$229.18M$4.7B4.87%
Balancer$716M$3.7B19.39%

Note: These are not current numbers, the above numbers were calculated only at the time of writing this document.

### UniswapV3 Pros And Cons​

ProsCons
Greater Capital EfficiencyComplexities in strategic liquidity provisioning
Concentrated liquidity provides greater capital depthRequires LPs to ensure their liquidity remains ‘active’ through constant manual supervision.
Multiple fee tiers allow LPs to choose the pools as per their risk appetite.High transaction cost incurred by individual LPs due to price range readjustment
Higher APYs compared to UniV2 owing to active liquidity, variable fees and greater volume.Exposure to a higher risk of reserve loss owing to the concentration of larger capital in relatively narrow price ranges.

### DefiEdge - Asset Management Protocol on UniswapV3​

The high capital efficiency offered by UniswapV3 comes at the cost of complexities in managing the liquidity in the V3 pools. DefiEdge solves this problem by connecting liquidity providers with strategy managers that optimize user investment in the V3 pools.

Uniswap V3 requires LPs to ensure their liquidity always remains ‘active’ to realize the high profits promised by the protocol. The strategy manager on the platform constantly ‘rebalances’ liquidity in the active price ranges to cater to market conditions.

UniswapV3 LPs need to constantly monitor and readjust their liquidity price position, resulting in relatively high transaction costs. The cost of rebalancing user liquidity is borne by the strategy manager who is managing liquidity on behalf of several LPs, reducing the effective proportion of the transaction cost.

To achieve high APYs, liquidity provisioning in Uniswap V3 involves selecting the right price ranges. The strategy manager at DefiEdge protocol allocates capital in complex ratios in selective price ranges to generate the best returns on user-invested funds.

## Architecture​

### Share Distribution​

Protocol shares, also called DEshares, are shares that are allocated by the strategy smart contracts to the investors in the ratio of the funds invested to the total amount managed by the strategy.

#### DE shares are representative of:​

1. Investor liquidity in UniswapV3 pools managed by the DefiEdge Protocol strategy manager.
2. Returns earned from liquidity provisioning to the strategies.

The “DEshare” enables users to track their position and liquidity within a defined V3 strategy. The Share distribution works as follows:

Protocol FeeManagement FeeDE Share Allocated To The User
0%0%100%
0%y%(100-y)%
x%y%(100-(x+y))%
1. If the Protocol fee and the Management fee are initialized to zero per cent, the user is allocated 100% of the DEshares.
2. If the Protocol fee is initialized to zero whereas the Management fee is set to y percent, the user is allocated (100-y)% of the DEshares.
3. If the Protocol fee and the Management fees are set to x and y percent respectively, the user is allocated (100-x*y/100+y) percent of the DEshares.

​​       ${F}$: extant shares of an existing liquidity management pool,

$(x,p)$: the current pool composition and

$(x_0,y_0)$: the capital user wants to deploy

$(p{x},p{y})$: the price of token0/token1 in USD

${f}$ is the number of shares that will be minted, such that :

${f = F*\frac{x_0p_{x} + y_0p_{y}}{xp_{x} + yp_{y}}}$

User will get

${f*(1 - \frac{p+m}{100})}$

Shares

## Rebalance​

As a part of the strategic liquidity provisioning in the V3 pools, the strategy manager can provide liquidity to multiple narrow ranges, thereby creating a unique liquidity position for the user. Further, the strategy manager can create strategies based on specific fee tiers offered by UniswapV3.

The manager, through the adoption of varying strategies, can predict the ranges where they expect to see the most trading volume and consequently earn high swap fees. As such, DefiEdge allows the manager to decide the percentage of funds to be allocated to each price range so as to maximize returns.

The manager ensures that the user funds always remain within the active liquidity range by constantly rebalancing them in case of deviation from the current trading price.

The liquidity porviders at the time of depositing liquidity have two options: single-sided liquidity provisioning or dual liquidity provisioning.

#### Dual Liquidity Provisioning:​

• DefiEdge allows the strategy manager to set multiple ranges and the first range is the one where any new liquidity is deployed. Now if the liquidity provider chooses to deposit both assets forming the liquidity pool the ratio of the tokens is determined from the active range of the startegy.

#### Single-sided Liquidity Provisioning​

• UniswapV3 requires users to provide liquidity in multiple assets to maintain proportional reserves. DefiEdge protocol enables single-sided liquidity provisioning. Liquidity providers can add single-sided liquidity in either of the two tokens from the corresponding UniswapV3 pool. These token are held in the contract and can later be swapped and deployed by the strategy manager according to their judgement.

The strategy manager is empowered to manage user assets by limit-orders, swap tokens, or even hold the investor assets thereby creating better opportunities for yield.

• Users can optimize asset management by investing alongside the best fund managers on the platform while still holding complete custody of their investment.
• Investors retain control of the exposure levels of risk by selecting the preferred asset pool type for their investment.
• The platform maintains complete transparency about how strategies are performing by letting investors keep track of their funds.
• Investors can add single-sided liquidity or dual liquidity depending on the asset pool and strategy selected by the user.

As discussed in section 2.2 above, in the case of a dual liquidity provisioning strategy, the user is required to deposit two assets. For single-sided liquidity, the user has to deposit the asset predefined by the strategy manager at the time of strategy creation. In such cases, the strategy manager holds the responsibility of swapping the token for a different asset and thereafter investing the funds in the pools preferred by the investors. ​

### Remove Liquidity​

The DefiEdge protocol offers a permissionless and non-custodial asset management platform wherein users can add or remove their assets anytime without any restriction. When a user decides to exit a strategy and remove liquidity therefrom, the protocol burns the corresponding DE shares allocated to the user. In return, the user withdraws the liquidity along with the liquidity provisioning fees earned to date by the strategy on the investor's capital. ​

## Strategy Creation​

The strategy managers at DefiEdge are responsible for optimizing the user liquidity in Uniswap V3 pools. To achieve this, the managers at the platform adopt various strategies to continually adapt to dynamic conditions and actively pursue market opportunities, delivering high-quality returns.

#### Pool​

The strategies are restricted to the asset pair that the manager selects during the deployment of the strategy contract. In the next version, we plan to launch multiple assets to be managed by the same smart contract, with the manager being able to deploy a percentage of AUM (Assets Under Management) to different pools. In the current version though, the manager determines a liquidity pool from amongst a list of available pool options at Uniswap V3 and defines a strategy around it. The type of pool is based on multiple factors including the volatility associated with the pairs, fee-tier to which it belongs and the estimated returns. Each strategy is unique to its owner.

#### Accept Token​

The strategy owner at the time of its creation specifies whether the strategy is a single-sided liquidity provisioning strategy or dual liquidity provisioning strategy and thereby accepts tokens based on parameters discussed in section 2.2.

#### Fee Structure​

When investing with DeFiEdge, investors pay three types of fees; a protocol fee, a strategy management fee and a performance fee.

1. The strategy management fee is defined and charged by the strategy manager to the investor in lieu of the services provided by them
2. The protocol fee is the fee charged by the DeFiEdge protocol. It is initially set to 0. It is charged as a fraction of the management fee
3. The performance fee is decided and charged by the strategy manager. It is determined as a fraction of the fees earned from the UniswapV3 pool

## Price Oracle​

For all operations on the protocol, price feeds are obtained from Chainlink. To safeguard the protocol against attacks by price manipulation, the price feeds from Chainlink are also compared to the Uniswap TWAP.