BTB Finance for agents

Protocols / Lending

Benqi Lending

Compound style lending market on Avalanche. An agent can supply AVAX, USDC and other assets to earn interest, enter markets to use them as collateral, borrow against that collateral, and claim BENQI and AVAX rewards.

On-chainEVM5 contractsWebsite · Docs

get_protocol({ "protocol": "benqi-lending" })

Risks an agent should know

What an agent can do

supplySupply an asset to earn interest
for AVAX call qiAVAX.mint() with AVAX as value; for other assets approve the underlying to the qToken, then qToken.mint(amount)
withdrawRedeem a supplied asset
qToken.redeem(qTokenAmount); redeem the full balance by reading balanceOf(user) on the qToken
use-as-collateralTurn a supplied market on as collateral
Comptroller.enterMarkets([qToken]); Comptroller.exitMarket(qToken) to turn it off
borrowBorrow against collateral
enter the collateral market, check Comptroller.getAccountLiquidity(user) shows positive liquidity, then qToken.borrow(amount)
repayRepay a borrow
USDC or sAVAX: approve the underlying to the qToken, then qToken.repayBorrow(amount). AVAX: qiAVAX.repayBorrow() with AVAX value, or Maximillion.repayBehalf(user) to repay the full debt
claim-rewardsClaim BENQI (QI) and AVAX rewards
Comptroller.claimReward(0, user) for QI and Comptroller.claimReward(1, user) for AVAX
check-positionRead liquidity and shortfall for an account
Comptroller.getAccountLiquidity(user); a shortfall above 0 means the account can be liquidated

Contracts

avalanche · chain id 43114

ContractAddressKey functionsTry
Comptroller (Unitroller proxy)
other · proxy
0x486Af39519B4Dc9a7fCcd318217352830E8AD9b4
source
writeenterMarkets(address[])
writeexitMarket(address)
readgetAssetsIn(address)
readgetAccountLiquidity(address)
writeclaimReward(uint8,address)
readgetAllMarkets()
Full ABI
qiAVAX (AVAX market)
pool
0x5C0401e81Bc07Ca70fAD469b451682c0d747Ef1c
source
writemint()
writeredeem(uint256)
writeborrow(uint256)
writerepayBorrow()
writeborrowBalanceCurrent(address)
writeexchangeRateCurrent()
writebalanceOfUnderlying(address)
readgetAccountSnapshot(address)
+2 more via get_protocol
Full ABI
qiUSDC (USDC market)
pool · proxy
0xBEb5d47A3f720Ec0a390d04b4d41ED7d9688bC7F
source
writemint(uint256)
writeredeem(uint256)
writeborrow(uint256)
writerepayBorrow(uint256)
writeborrowBalanceCurrent(address)
writeexchangeRateCurrent()
readunderlying()
Full ABI
qisAVAX (sAVAX market)
pool · proxy
0xF362feA9659cf036792c9cb02f8ff8198E21B4cB
source
writemint(uint256)
writeredeem(uint256)
writeborrow(uint256)
writerepayBorrow(uint256)
Full ABI
Maximillion (AVAX repay helper)
other
0xd78DEd803b28A5A9C860c2cc7A4d84F611aA4Ef8
source
writerepayBehalf(address)
writerepayBehalfExplicit(address,address)
Full ABI

Notes

Addresses come from BENQI's official docs page (docs.benqi.fi/resources/contracts/core-markets). The Comptroller and the qTokens have code on Avalanche, and the Comptroller implementation at 0xd8E426C61b0FBBda06e9F603263ABea09d717dBD and the qiAVAX implementation have verified ABIs on Sourcify. The function signatures above come from those ABIs. qiUSDC and qisAVAX are delegators, and their ABI (73 items) is verified on Sourcify. Maximillion (0xd78DEd...) has a verified ABI. The isolated Avalanche ecosystem markets listed on BENQI's docs (https://docs.benqi.fi/resources/contracts/isolated-markets-avalanche-ecosystem-markets) are not covered here. The qToken and Comptroller functions in this file are from the core market ABIs, and the qiAVAX and qisAVAX entries were checked for the signatures listed.

Sources

Researched 2026-11-28. Addresses are copied from the official sources above; check them before moving large amounts.