Skip to content

lending:borrow

Borrow a token from a lending market against the connected account's collateral (variable rate). The borrowed tokens go to the connected account.

⚗️ Experimental — available at next.evmcrispr.com.

Supports runtime fields inside smart blocks. Use explicit @helper! expressions or captured outputs; other fields are evaluated at build time.

lending:borrow <amount> <token>
NameTypeEvaluationDescription
amountnumberRuntime in smart blocksAmount to borrow, in base units (wei)
tokenaddressBuild timeToken to borrow (use @token(SYM))
NameTypeEvaluationDescription
--usinglending-adapterBuild timeLending protocol: AaveV3, Spark or CompoundV3 (default: the best available on the chain)
--on-behalf-ofaddressRuntime in smart blocksAccount whose debt grows (requires prior credit delegation; defaults to the connected account)
# Borrow 50 WXDAI at variable rate on Aave v3 (Gnosis)
lending:borrow 50e18 0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d