yieldaggregator

Deposit Pool

Enables users to deposit tokens into yield-generating pools on supported blockchains, specifying the target pool either via a direct poolAddress or by providing the tokenAddress with additional parameters. Upon success, the endpoint returns key details (chainId, addresses, transaction data, referenceId) that streamline investment management in decentralized finance protocols.

💡 Compute Unit Value: 30 (Fixed)

post/defi/v1/yieldaggregator/depositpool

Request

  • Base URL
    https://svc.blockdaemon.com
  • URL
    https://svc.blockdaemon.com/defi/v1/yieldaggregator/depositpool
  • Auth
    API key in header X-API-Key

Request body

yieldAggregatorId'5100'

The unique ID to specify the yield aggregator for queries or transactions.

amountstring required

Number of tokens, specified in the token's smallest denomination (base units). Do not send human-readable decimal values. Examples: 1 WETH (18 decimals) = "1000000000000000000"; 1 USDC (6 decimals) = "1000000".

fromstring required

Blockchain address of the sender. For EVM chains, use a checksummed hex address (e.g., 0xABCDEF...). This address must hold sufficient balance and will sign the transaction.

gasstring

Maximum number of gas units to allocate for the transaction, as an integer string (e.g., '200000'). If omitted, gas is estimated automatically. Note: this is gas units, not wei or gwei.

tokenAddressstring

The smart contract address of the token being deposited. Use this parameter when you do not have the direct yield pool address available.

poolAddressstring

The direct blockchain address of the yield pool where the deposit will be credited. Provide this if available; otherwise, you may use tokenAddress to identify the target pool.

gasPrioritystring

Specifies the priority level for gas fees (e.g., 'low', 'medium', or 'high'), which influences the transaction speed and cost.

enableFeeboolean

Flag to include a basis points fee transaction alongside the main transaction when set to true.

Example request

{
  "yieldAggregatorId": "5100",
  "amount": "1000000000000000000",
  "from": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
  "gas": "100000",
  "tokenAddress": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
  "poolAddress": "0xfad57d2039c21811c8f2b5d5b65308aa99d31559",
  "gasPriority": "low",
  "enableFee": false
}

Response

Successful response

statusinteger
msgstring
dataobject

Example response

{
  "status": 200,
  "msg": "success",
  "data": {
    "chainId": "1",
    "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "to": "0x3DA9D911301f8144bdF5c3c67886e5373DCdff8e",
    "value": "0",
    "gas": "2307200",
    "data": "0xa694fc3a00000000000000000000000000000000000000000000000000000000004b4a52",
    "referenceId": "9fdce4b6184e442cbe52d0c3249c7657"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.