Skip to content

@lending:maxBorrow

How much of a token an account can still borrow against its current collateral, in base units of the token.

Returns: number

@lending:maxBorrow(account token adapter?)
NameTypeDescription
accountaddressAccount to inspect
tokenaddressToken to borrow (use @token(SYM))
[adapter]lending-adapterLending protocol: AaveV3, Spark or CompoundV3 (default: the best available on the chain)
# Print how much WXDAI the connected account can still borrow
print "Can still borrow:" @lending:maxBorrow(@me 0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d)