Nest Leverage Precheck logo

Catalog action EVM Onchain wallet Gas

Validate and prepare a pUSD leverage loop on Plume Network (chain 98866). Checks balances, approvals, oracle price, Morpho liquidity, and simulates the loop. Ideal for: leverage strategies, yield optimization, DeFi automation on Plume.

This action can require a wallet connector, gas, token movement, or an external side effect. Test with simulation or a controlled amount before using it in a live workflow.

At a Glance

FieldValue
Action IDnest-leverage-precheck
CategoryEVM Onchain
Connectorwallet
Requires gasYes
Funds movementNone declared
Tagsdefi, plume, leverage, lending, vault, morpho, onchain, yield

Payload Schema

FieldTypeRequiredDescription
initialCapitalstringYesInitial pUSD capital in human-readable units (e.g., "100" for 100 pUSD).
maxLoopsnumberNoMaximum number of leverage iterations (default: 15).
safetyBufferBpsnumberNoSafety buffer in basis points below LLTV (default: 200 = 2%).
minAmountstringNoMinimum pUSD amount per iteration in human-readable units (default: "0.01").

Result Schema

FieldTypeRequiredDescription
canProceedbooleanYesWhether the leverage loop can proceed.
reasonstringNoReason if canProceed is false.
walletAddressstringNoThe wallet address used.
pusdBalancestringNoCurrent pUSD balance in wei.
morphoLiquiditystringNoAvailable Morpho lending pool liquidity in wei.
oraclePricestringNoMorpho oracle price at ORACLE_PRICE_SCALE (10^36).
exchangeRatestringNoNest vault pUSD/nTBILL exchange rate at WAD scale.
targetLtvWadstringNoTarget LTV in WAD scale (LLTV * (1 - safetyBuffer)).
initialCapitalWeistringNoInitial capital converted to wei.
minAmountWeistringNoMinimum amount converted to wei.
currentPositionobjectNoCurrent Morpho position.
simulationobject | nullNoLoop simulation results. Null when canProceed is false due to insufficient gas.
iterationArrayarrayNoArray of iteration indices for for-each node.
approvalsobject | nullNoToken approval transaction hashes. Null when canProceed is false due to insufficient gas.

Examples

json
{ "type": "nest-leverage-precheck", "payload": { "initialCapital": "example-initialCapital" }, "children": [], "connector": { "type": "wallet", "id": "conn_wallet" }}

Payload fields can use workflow expressions such as {{$trigger.body.amount}}, {{$nodes.fetch.result.price}}, and {{$props.asset}} when the value should come from a trigger, prior node, or reusable workflow prop.

Ask a question... ⌘I