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
- Positions can be liquidated when the shortfall is above 0. Keep a margin and check it after each borrow or price move.
- Interest accrues on each market, so read borrowBalanceCurrent rather than stored values when repaying the full amount.
- The Comptroller is a Unitroller proxy and the BENQI admin can change the implementation and market parameters, including collateral factors and pause flags.
- Assets that BENQI removed from core markets (for example qiBTC.e, qiBUSD and qiQI) are kept as historical records. Do not supply to them.
- Liquidity can be low in a market. A borrow or redeem can revert when the pool has no free cash.
What an agent can do
| supply | Supply 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) |
| withdraw | Redeem a supplied asset qToken.redeem(qTokenAmount); redeem the full balance by reading balanceOf(user) on the qToken |
| use-as-collateral | Turn a supplied market on as collateral Comptroller.enterMarkets([qToken]); Comptroller.exitMarket(qToken) to turn it off |
| borrow | Borrow against collateral enter the collateral market, check Comptroller.getAccountLiquidity(user) shows positive liquidity, then qToken.borrow(amount) |
| repay | Repay 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-rewards | Claim BENQI (QI) and AVAX rewards Comptroller.claimReward(0, user) for QI and Comptroller.claimReward(1, user) for AVAX |
| check-position | Read liquidity and shortfall for an account Comptroller.getAccountLiquidity(user); a shortfall above 0 means the account can be liquidated |
Contracts
avalanche · chain id 43114
| Contract | Address | Key functions | Try |
|---|---|---|---|
| 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
- https://docs.benqi.fi/resources/contracts/core-markets
- https://docs.benqi.fi/resources/contracts
- https://github.com/Benqi-fi/BENQI-Smart-Contracts
- https://raw.githubusercontent.com/Benqi-fi/BENQI-Smart-Contracts/master/lending/Comptroller.sol
- https://raw.githubusercontent.com/Benqi-fi/BENQI-Smart-Contracts/master/lending/Maximillion.sol
- https://sourcify.dev/server/v2/contract/43114/0xd8E426C61b0FBBda06e9F603263ABea09d717dBD?fields=abi
- https://sourcify.dev/server/v2/contract/43114/0x5C0401e81Bc07Ca70fAD469b451682c0d747Ef1c?fields=abi
- https://sourcify.dev/server/v2/contract/43114/0xF362feA9659cf036792c9cb02f8ff8198E21B4cB?fields=abi
- https://app.benqi.fi
- https://api.llama.fi/protocol/benqi-lending
Researched 2026-11-28. Addresses are copied from the official sources above; check them before moving large amounts.