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 (Euler)

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

Endpoint

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

Request

FieldTypeDescription
chain_id[uint64]Chain ID(s) where the targeted Euler vault is deployed.
vault_address[string]List of targeted Euler vault contract addresses.
action[uint64]Filter by campaign action type: borrow: 2001, lend: 2002.
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[EulerCampaignInfo]List of Euler campaign details.

EulerCampaignInfo Fields

FieldTypeDescription
chain_iduint64Chain ID where the targeted Euler vault is deployed.
vault_addressstringEuler vault address.
actionuint64Campaign action type: borrow: 2001, lend: 2002.
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
    ],
    "vault_address": [
        "0xF037eeEBA7729c39114B9711c75FbccCa4A343C8"
    ],
    "campaign_id": [

    ],
    "status": [
        4
    ],
    "user_address": [],
    "action": [
        2001,
        2002
    ]
}

post with data.json:

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