Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Lend and Borrow Campaign (Aave)

This page specifies the API for retrieving details about Lend/Borrow campaigns for the Aave protocol.

Endpoint

POST https://incentra-prd.brevis.network/sdk/v1/aaveCampaigns

Request

FieldTypeDescription
chain_id[uint64]Chain ID(s) where the targeted Aave vault is deployed.
atoken_address[string]List of targeted Aave atoken contract addresses.
action[uint64]Filter by campaign action type: lend: 5001, borrow: 5002 , lend_net: 5003.
campaign_id[string]List of specific campaign IDs to retrieve.
status[CampaignStatus]Filter by campaign status (enum will be specified later)
user_address[string]Retrieve campaigns where the specified user address(es) has participated.

If any filter is not specified, it means there is no constraint for this filter.

CampaignStatus Enum

The CampaignStatus enum has the following values:

  • DEPLOYING
  • CREATING_FAILED
  • INACTIVE
  • ACTIVE
  • ENDED
  • DEACTIVATED

Response

FieldTypeDescription
errErrMsgError message if request fails.
campaigns[AaveCampaignInfo]List of Aave campaign details.

AaveCampaignInfo Fields

FieldTypeDescription
chain_iduint64Chain ID where the targeted Aave atoken is deployed.
vault_addressstringAave atoken address.
actionuint64Campaign action type: lend: 5001, borrow: 5002 , lend_net: 5003.
campaign_idstringUnique identifier for the campaign.
campaign_namestringCampaign display name
start_timeuint64Campaign start timestamp.
end_timeuint64Campaign end timestamp.
reward_infoRewardInfoDetails about the reward token and amount. See RewardInfo below.
last_reward_attestation_timeuint64Last campaign reward attestation timestamp.
statusCampaignStatusCurrent status of the campaign. See CampaignStatus enum.

RewardInfo Fields

FieldTypeDescription
submission_chain_iduint64Campaign reward submission chain ID (see on-chain reward claim for details).
submission_contractstringCampaign reward submission contract address (see on-chain reward claim for details)
claim_chain_iduint64Chain ID where rewards can be claimed.
claim_contractstringReward claim contract address.
token_addressstringReward token address.
token_symbolstringReward token symbol.
reward_amtstringReward amount.
reward_usd_pricestringUSD price for the reward token.
reward_per_hourstringReward amount distributed per hour.
aprfloatThe APR of the campaign (for example, 0.03 means 3% APR)
tvlfloatThe supply/borrow USD value of the vault

Post Example (curl)

{
    "chain_id": [
        1,
        42161
    ],
    "atoken_address": [
        "0x4d5F47FA6A74757f35C14fD3a6Ef8E3C9BC514E8"
    ],
    "campaign_id": [

    ],
    "status": [
        4
    ],
    "user_address": [],
    "action": [
        5001,
        5002,
        5003
    ]
}

post with data.json:

curl -X POST -H "Content-Type: application/json" -d @data.json POST https://incentra-prd.brevis.network/sdk/v1/aaveCampaigns