Skip to main content

Integration with DefiEdge

DefiEdge is a leading asset management platform, with its cutting edge features and ease of use. Well, integrating DefiEdge is even easier. Just follow the following steps to seamlessly integrate your protocol with DefiEdge:

  1. Choose the strategy you want to integrate with from our App Dashboard:

    a. Example Strategy:

                i. Strategy Link

Strategy Preview
  1. Import the Strategy API Collection details via Postman. The collection consists of three APIs:

    a. Strategy details:

                i. Takes input parameters as “network” and “address”

                ii. Returns

                          1. Fees

                          2. Share Price

                          3. Strategy Limit

                          4. AUM

                          5. Management Fees

                          6. Performance Fees

    b. Liquidity Breakdown

                i. Takes input parameters as “network” and “address”

                ii. This returns the parameters for unused liquidity and are not necessary for the integration step

                iii. Here is a sample JSON response for reference:

 {
"amounto":0,
"amountl":79.41096945872027,
"unusedAmounto":3.5177766249795157,
"unusedAmount1": 4.332350100103125,
"amountoTotal":3.5177766249795157,
"amountlTotal":83.7433195588234,
"unusedAmount0BigNumber":{
"type": "BigNumber",
"hex": "0x30dla733d3139933"
},
"unusedAmount0BigNumber":{
"type": "BigNumber",
"hex": "0x3c1f9976574655d3"
},

}

    c. [GraphQL] Strategy

                i. Provides the APR numbers for the strategy

                i. GRAPH Variables are:

 {"network": "polygon",
"address": "0x943cc8452c9af2f4ed440d2c1af2025421b52ae7"}

                iii. Sample Response for APYs:

{
"data": {
"strategy": {
"id": "b695e8d6-af49-4cf0-9706-67d9618ba0c2",
"title": "sUSD-DAI#17",
"subTitle": "sUSD-DAI",
"description": "Stable pair follower",
"updatedAt": "2022-09-17T13:02:16.926Z",
"network": "optimism",
"sharePrice": 102.64055014,
"address": "0x943cc8452c9af2f4ed440d2c1af2025421b52ae7",
"aum": 87.06511051725543,
"createdAt": "2022-06-03T12:47:18.437Z",
"fees_apr": {
"USD": 9.834878948730138,
"BTC": 12.05761674191363,
"MATIC": 5.574383987663109,
"ETH": 9.142785147948224
},
"seven_day_apy": {
"USD": 0.005482412633756134,
"BTC": 9.674341106766581,
"MATIC": 12.50616771421296,
"ETH": 24.14963778637148
},
"since_inception": {
"USD": 2.640550140000002,
"BTC": 53.58134964751846,
"MATIC": -25.49411848399765,
"ETH": 26.25456158745292
},
"one_day_apy": {
"USD": 0.01734670944347318,
"BTC": 0.01734670944347318,
"MATIC": 0.01734670944347318,
"ETH": 0.01734670944347318
}
}
}
  1. Contract Calls for Deposit (“mint”) and Remove (“burn”) functionality

    a. Strategy Preview

    b. Here is the overall documentation for the contracts:

  1. The strategy related functions are in “DefiEdge Strategy”
  2. Mint (Deposit):
mint nonpayable (uint256,uint256,uint256,uint256,uint256)
Adds liquidity to the primary range

Parameters
uint256 _amount0: Amount of token0
uint256 _amount1: Amount of token1
uint256 _amount0Min: Minimum amount of token0 to be minted
uint256 _amount1Min: Minimum amount of token1 to be minted
uint256 _minShare: Minimum amount of shares to be received to the user
Return Values
uint256 amount0
uint256 amount1
uint256 share
  1. Burn (Remove):
burn nonpayable (uint256,uint256,uint256)
Burn liquidity and transfer tokens back to the user

Parameters
uint256 _shares: Shares to be burned
uint256 _amount0Min: Mimimum amount of token0 to be received
uint256 _amount1Min: Minimum amount of token1 to be received
Return Values
uint256 collect0
uint256 collect1

1, 2 and 3, it’s that simple to integrate DefiEdge with your platform. It’s our mission to help empower the DeFi Ecosystem. If you have any queries or would like to know more about this integration.

We will be more than happy to collaborate with you in building the next generation of Asset Management for the Defi Community.