Skip to main content

Margin assets a leveraged open accepts

GET 

/v1/actions/loop/leverage/pay-assets

Which assets can fund the margin (payAsset) of a leveraged open on this pair.

The discovery companion to /v1/actions/loop/leverage: give it the same marketUidIn (debt) and marketUidOut (collateral) and it returns the assets the leverage builder will actually accept — so a client can render a "pay with" choice without hard-coding every lender's margin rule, and without sending a build only to be refused. slippage and account are not needed.

Reads nothing on chain. The answer is a pure function of (lender, collateral, debt, chain) — the very table the leverage endpoint enforces before building — so the two cannot disagree. Rules, per lender family:

  • Composer lenders (Aave, Compound, Venus, Fluid, Silo, Lista, Gearbox, Aave V4, Init, Dolomite, Euler; also Morpho Blue and Midnight, whose bundler3 route falls back to the composer for a native margin): the collateral, the debt, and NATIVE when the wrapped native is one of the two (wrapped in the same transaction). A market keyed to the native asset itself (Fluid ETH vaults) lists the zero address as that side.
  • Chains where the native balance is also an ERC-20 (Arc 0x3600…, Celo's GoldToken, Metis/Mantle 0xdead…, Polygon 0x…1010): when the market holds that ERC-20 VIEW, a native payAsset is served AS it — approval + transferFrom, no msg.value, nothing wrapped — with payAmount taken in native units (rescaled on Arc, 18 → 6). When the market holds a real wrapper (WMETIS) the wrap leg applies as usual. Where a real wrapper sits at a different scale (Hedera's 8-decimal WHBAR) native is not offered. See NATIVE_ASSET_FORMS.md.
  • LlamaLend: collateral or borrowed token, never native.
  • Curvance / Fraxlend / Resupply: the collateral only — the protocol's own leverage entrypoint pulls it verbatim.
  • Twyne: the collateral only; strict: false because any other asset is answered with ZAP_REQUIRED carrying a swap quote (a two-step route) rather than a refusal.
  • Term Finance: the purchase token (debt), the PT collateral, or native when the purchase token is the wrapped native.
  • Exactly: the debt asset only (the fresh capital is deposited into the one market the DebtManager loops).
  • Flying Tulip: the collateral, or native when the collateral is the wrapped native — deposited inside the loop transaction by a signed MetaActions deposit.

Response (data): payAssets[] in preference order, each row currency-list ready — chainId, address (native = the zero address), symbol, name, decimals, logoURI, assetGroup from the token list where curated — plus role (collateral | debt | native) and, for native, wrapsTo / wrapsRole (the wrapped token it lands as and which side that is). Also collateralAsset, debtAsset, strict (whether the leverage endpoint refuses anything outside the list up front) and notes[] (caveats worth showing, e.g. that route=bundler3 pinned on Morpho cannot take native).

Errors mirror the leverage endpoint's own (UNSUPPORTED_LENDER, INVALID_PARAM, the SmartLP / Fluid-smart refusals).

Plain-text reference — GET /v1/actions/loop/leverage/pay-assets

Parameters

ParameterInTypeRequiredDescription
marketUidInquerystringyesDebt market (lender:chainId:address) — as on /loop/leverage.
marketUidOutquerystringyesCollateral market (lender:chainId:address) — as on /loop/leverage.

Response 200

FieldTypeDescription
successTrue
dataobjectInformational payload. null when the endpoint only builds calldata.
actionsnull

Example response

{
"success": true,
"data": {}
}

Request​

Responses​

The accepted margin assets for this pair