Skip to main content

LendingProxySimulationResponse

Proxy-mode lending response enriched with post-trade simulation (POST only).

transaction objectrequired
tostringrequired

Target contract address

Example: 0x1234...abcd
datastringrequired

Encoded calldata

Example: 0xabcdef...
valuestringrequired

ETH value to send with the transaction

Example: 0
permissionTxns object[]required
  • Array [
  • tostringrequired

    Target contract address

    datastringrequired

    Encoded calldata

    valuestringrequired

    ETH value

    infostring

    Human-readable description of the approval

  • ]
  • simulation objectnullable

    Projected post-trade metrics, or null if simulation failed

    oneOf
    healthFactornumber

    Health factor before the trade

    Example: 1.85
    healthFactorPostnumber

    Health factor after the trade

    Example: 2.1
    borrowCapacitynumber

    Borrow capacity (USD) before the trade

    Example: 3000
    borrowCapacityPostnumber

    Borrow capacity (USD) after the trade

    Example: 3500
    balanceDataPost object

    Aggregated balance data for a sub-account.

    depositsnumber

    Total deposits in USD

    Example: 10000.5
    debtnumber

    Total debt in USD

    Example: 5000.25
    adjustedDebtnumber

    Debt adjusted for borrow factors

    Example: 5500
    collateralnumber

    Collateral value in USD

    Example: 9000
    collateralAllActivenumber

    Collateral if all assets were enabled

    Example: 10000.5
    borrowDiscountedCollateralnumber

    Collateral discounted by borrow factors

    Example: 8000
    borrowDiscountedCollateralAllActivenumber

    Discounted collateral if all enabled

    Example: 9000
    navnumber

    Net asset value (deposits - debt)

    Example: 5000.25
    deposits24hnumber

    Deposits 24h ago (for change calculation)

    Example: 9800
    debt24hnumber

    Debt 24h ago

    Example: 4900
    nav24hnumber

    NAV 24h ago

    Example: 4900
    rewards object

    Pending rewards by token

    property name*any

    Pending rewards by token

    aprDataPost object

    APR breakdown for a sub-account.

    aprnumber

    Net APR (deposit - borrow)

    Example: 2.5
    depositAprnumber

    Weighted deposit APR

    Example: 3.5
    borrowAprnumber

    Weighted borrow APR

    Example: 5.2
    rewardAprnumber

    Total reward APR

    Example: 1.2
    rewardDepositAprnumber

    Reward APR on deposits

    Example: 0.8
    rewardBorrowAprnumber

    Reward APR on borrows

    Example: 0.4
    intrinsicAprnumber

    Intrinsic yield APR (e.g., stETH staking)

    Example: 0
    intrinsicDepositAprnumber

    Intrinsic yield APR portion from deposits

    Example: 0
    intrinsicBorrowAprnumber

    Intrinsic yield APR portion from borrows

    Example: 0
    rewards object

    Reward token details

    property name*any

    Reward token details

    simulationErrorstring

    Error message if simulation failed

    LendingProxySimulationResponse
    {
    "transaction": {
    "to": "0x1234...abcd",
    "data": "0xabcdef...",
    "value": "0"
    },
    "permissionTxns": [
    {
    "to": "string",
    "data": "string",
    "value": "string",
    "info": "string"
    }
    ],
    "simulation": {
    "healthFactor": 1.85,
    "healthFactorPost": 2.1,
    "borrowCapacity": 3000,
    "borrowCapacityPost": 3500,
    "balanceDataPost": {
    "deposits": 10000.5,
    "debt": 5000.25,
    "adjustedDebt": 5500,
    "collateral": 9000,
    "collateralAllActive": 10000.5,
    "borrowDiscountedCollateral": 8000,
    "borrowDiscountedCollateralAllActive": 9000,
    "nav": 5000.25,
    "deposits24h": 9800,
    "debt24h": 4900,
    "nav24h": 4900,
    "rewards": {}
    },
    "aprDataPost": {
    "apr": 2.5,
    "depositApr": 3.5,
    "borrowApr": 5.2,
    "rewardApr": 1.2,
    "rewardDepositApr": 0.8,
    "rewardBorrowApr": 0.4,
    "intrinsicApr": 0,
    "intrinsicDepositApr": 0,
    "intrinsicBorrowApr": 0,
    "rewards": {}
    }
    },
    "simulationError": "string"
    }