Skip to main content

LendingRawSimulationResponse

Direct-mode lending response enriched with post-trade simulation. Returned on POST (with body) or GET with simulate=true. The calldata is NOT in data: send actions.transactions (in order) after mining actions.permissions. data carries only informational fields.

rateImpact object[]nullable

Projected interest-rate impact per market. Single-market actions produce 1 entry; loop actions produce 2. Null if IRM data is unavailable.

  • Array [
  • marketUidstringrequired

    Market identifier (format: lender:chainId:address)

    Example: AAVE_V3:8453:0x4200000000000000000000000000000000000006
    utilization objectrequired

    Utilization ratio (0–1)

    currentnumberrequired

    Current value

    projectednumberrequired

    Projected value after the action

    borrowRate objectrequired

    Borrow APR (%)

    currentnumberrequired

    Current value

    projectednumberrequired

    Projected value after the action

    depositRate objectrequired

    Deposit/supply APR (%) paid by the POOL. On a market whose return is the asset itself (an LST, an RWA share such as nOPAL on Morpho Blue) this is 0 — read effectiveDepositRate.

    currentnumberrequired

    Current value

    projectednumberrequired

    Projected value after the action

    intrinsicYieldnumber

    The asset's own yield in percent (LST staking yield, RWA NAV growth, a Gearbox quota rate as a negative), size-invariant, ADDED to both sides: earned on a deposit, forgone on a borrow. Absent when the lender meta was not readable when the response was built — never defaulted to 0 in that case.

    Example: 10.37
    depositRewardAprnumber

    Sum of reward-stream APRs (%) on the deposit side. Absent with intrinsicYield.

    borrowRewardAprnumber

    Sum of reward-stream APRs (%) rebated on the borrow side. Absent with intrinsicYield.

    effectiveDepositRate object

    depositRate + intrinsicYield (%), rewards EXCLUDED — what a deposit on this market actually earns, and the figure the pair book publishes as the effective supply APR. Absent with intrinsicYield.

    currentnumberrequired

    Current value

    projectednumberrequired

    Projected value after the action

    effectiveBorrowRate object

    borrowRate + intrinsicYield (%), rewards EXCLUDED — what a borrow on this market actually costs. Absent with intrinsicYield.

    currentnumberrequired

    Current value

    projectednumberrequired

    Projected value after the action

    flatboolean

    True when the market has no utilization curve to shift (Morpho Blue collateral, a fixed-rate broker): current === projected, taken from the published rates, and utilization is NaN. Present so the leg is not silently missing from a position preview.

  • ]
  • simulation objectnullable

    Projected post-trade metrics for the operator's account, or null if simulation failed. With a custom receiver this does NOT show the receiver's position.

    oneOf
    pre object

    Portfolio state before the trade.

    healthFactornumber

    Health factor before the trade (null-safe: capped at 1e18 when no debt)

    Example: 1.85
    borrowCapacitynumber

    Borrow capacity (USD) before the trade

    Example: 3000
    post object

    Projected portfolio state after the trade.

    healthFactornumber

    Projected health factor after the trade

    Example: 2.1
    borrowCapacitynumber

    Projected borrow capacity (USD) after the trade

    Example: 3500
    balanceData 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[]nullable

    Pending reward token claims. Each entry represents a single reward program.

  • Array [
  • assetstring

    Reward token contract address

    Example: 0xc00e94Cb662C3520282E6f5717214004A7f26888
    totalRewardsnumber

    Total accumulated rewards (token units)

    Example: 12.5
    claimableRewardsnumber

    Immediately claimable rewards (token units)

    Example: 12.5
  • ]
  • aprData 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

    Per-reward-token APR breakdown. Keys are reward token addresses.

    property name* RewardAprBreakdown

    APR breakdown for a single reward token.

    aprnumber

    Net reward APR (normalized to NAV)

    Example: 0.045
    borrowAprnumber

    Reward APR on borrows

    Example: 0.012
    depositAprnumber

    Reward APR on deposits

    Example: 0.078
    simulationErrorstring

    Error message if simulation failed

    LendingRawSimulationResponse
    {
    "rateImpact": [
    {
    "marketUid": "AAVE_V3:8453:0x4200000000000000000000000000000000000006",
    "utilization": {
    "current": 0.85,
    "projected": 0.83
    },
    "borrowRate": {
    "current": 3.2,
    "projected": 3
    },
    "depositRate": {
    "current": 2.1,
    "projected": 1.9
    },
    "intrinsicYield": 10.37,
    "depositRewardApr": 0,
    "borrowRewardApr": 0,
    "effectiveDepositRate": {
    "current": 10.37,
    "projected": 10.37
    },
    "effectiveBorrowRate": {
    "current": 0,
    "projected": 0
    },
    "flat": true
    }
    ],
    "simulation": {
    "pre": {
    "healthFactor": 1.85,
    "borrowCapacity": 3000
    },
    "post": {
    "healthFactor": 2.1,
    "borrowCapacity": 3500,
    "balanceData": {
    "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": [
    {
    "asset": "0xc00e94Cb662C3520282E6f5717214004A7f26888",
    "totalRewards": 12.5,
    "claimableRewards": 12.5
    }
    ]
    },
    "aprData": {
    "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"
    }