yieldaggregator

Mint

Converts deposited assets into yield-bearing tokens (or share tokens) within a yield aggregator protocol. The response includes transaction details (chain ID, addresses, gas, reference ID) for secure tracking.

💡 Compute Unit Value: 30 (Fixed)

post/defi/v1/yieldaggregator/mint

Request

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

Request body

yieldAggregatorId'5200' | '5201' | '5202' | '5203' | '5204'

The unique identifier used to route queries or transactions to the correct yield aggregator.

tokenInstring required

Specifies the underlying asset (token) that is being deposited for minting yield-bearing tokens. This parameter should be provided as the token's contract address or an accepted identifier according to the protocol specifications.

amountInstring required

Amount of the input token to provide, specified in the token's smallest denomination (base units). Do not send human-readable decimal values. Examples: to swap 1 WETH (18 decimals), use "1000000000000000000"; to swap 1 USDC (6 decimals), use "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.

gasPrioritystring

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

slippagestring

Optional slippage tolerance for the transaction. Valid range: 0 to 100 (e.g., 1 = up to 1% slippage).

ytAddressstring required

The blockchain address of the yield token. You can provide this parameter using either 'ytAddress' (yield token address) or 'syAddress' (standard yield address). Both names are accepted and refer to the same value.

syAddressstring required

The blockchain address of the yield token. You can provide this parameter using either 'ytAddress' (yield token address) or 'syAddress' (standard yield address). Both names are accepted and refer to the same value.

enableFeeboolean

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

Example request

{
  "yieldAggregatorId": "5200",
  "tokenIn": "0x4db99b79361f98865230f5702de024c69f629fec",
  "amountIn": "1000000000000000000",
  "from": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
  "gas": "100000",
  "gasPriority": "low",
  "slippage": "10",
  "ytAddress": "0x4a8036efa1307f1ca82d932c0895faa18db0c9ee",
  "syAddress": "0x4a8036efa1307f1ca82d932c0895faa18db0c9ee",
  "enableFee": false
}

Response

Successful response

statusinteger
msgstring
dataobject

Example response

{
  "status": 200,
  "msg": "success",
  "data": {
    "chainId": "1",
    "from": "0xdae2f6eddda6fb4fb60cc02633de27e2b431b402",
    "to": "0x888888888889758F76e7103c6CbF23ABbF58F946",
    "value": "0",
    "gas": "1000000",
    "data": "0x1a8631b2000000000000000000000000dae2f6eddda6fb4fb60cc02633de27e2b431b4020000000000000000000000004a8036efa1307f1ca82d932c0895faa18db0c9ee0000000000000000000000000000000000000000000000008ac7230489e8000000000000000000000000000000000000000000000000000083d6c7aab6360000",
    "estimationCheck": "Returned error: execution reverted: ERC20: insufficient allowance",
    "referenceId": "3173e53c1af44cda8f70d4990858d2c6"
  }
}

Changes

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