BLens

BLens is the read-only Mercury lens on Ethereum, covering active price, BLV, circulating supply, pool state, staking state, credit accounts, quote state, and full JSON ABI for UIs and bots.

Overview

BLens exposes the read-only state that UIs, bots, and indexers need from the Mercury relay. It covers prices, pool balances, fees, staking, credit accounts, hook metadata, and router quote state.

Most calls take a BToken _bToken. The live relay address is the call target; BLens itself is installed as a component behind that relay.

Price functions

activePrice

Current market price in WAD precision (1e18 = 1.0).

function activePrice(BToken _bToken) external view returns (uint256)

blvPrice

Current Baseline Value floor price in WAD precision.

function blvPrice(BToken _bToken) external view returns (uint256)

getBookPrice

Book-style price, computed as total reserves over circulating supply.

function getBookPrice(BToken _bToken) external view returns (uint256)

swapFee

Current swap fee from the maker curve params.

function swapFee(BToken _bToken) external view returns (uint256)

Derived metrics such as premium are off-chain calculations. For example: activePrice(bToken) - blvPrice(bToken).

Pool state

function reserve(BToken _bToken) external view returns (ERC20)
function totalReserves(BToken _bToken) external view returns (uint256)
function settledReserves(BToken _bToken) external view returns (uint256)
function pendingSurplus(BToken _bToken) external view returns (uint256)
function totalBTokens(BToken _bToken) external view returns (uint256)
function totalSupply(BToken _bToken) external view returns (uint256)
function getCirculatingSupply(BToken _bToken) external view returns (uint256)
function creator(BToken _bToken) external view returns (address)
function isPoolPaused(BToken _bToken) external view returns (bool)

Use these calls to read pool inventory, circulating supply, reserve accounting, creator ownership, and pause state.

Fee state

function creatorClaimable(BToken _bToken) external view returns (uint256)
function protocolClaimable(BToken _bToken) external view returns (uint256)
function pendingYield(BToken _bToken) external view returns (uint256)
function poolFeeRecipient(BToken _bToken) external view returns (address)
function creatorFeePct(BToken _bToken) external view returns (uint256)
function liquidityFeePct(BToken _bToken) external view returns (uint256)
function protocolFeePct(BToken _bToken) external view returns (uint256)
function poolFeeShare(BToken _bToken) external view returns (uint256 creator_, uint256 staking_)
function totalFeeShare(BToken _bToken) external view returns (uint256 creator_, uint256 staking_, uint256 protocol_)

poolFeeShare returns the creator and staking split after protocol fees. totalFeeShare returns the absolute creator, staking, and protocol shares.

Staking state

function claimableYield(BToken _bToken) external view returns (uint256)
function accumulator(BToken _bToken) external view returns (uint256)
function tokensPerSecond(BToken _bToken) external view returns (uint256)
function lastUpdatedTimestamp(BToken _bToken) external view returns (uint256)
function totalStaked(BToken _bToken) external view returns (uint256)
function withdrawable(BToken _bToken, address _user) external view returns (uint256)
function stakedPosition(BToken _bToken, address _user)
  external view returns (uint256 amount, uint256 locked, uint256 earned, uint256 userAccumulator)

stakedPosition returns raw tuple fields for the user's staking account.

Credit state

function totalCollateral(BToken _bToken) external view returns (uint256)
function totalDebt(BToken _bToken) external view returns (uint256)
function creditAccount(BToken _bToken, address _user)
  external view returns (uint256 collateral, uint256 debt)

creditAccount is the canonical read for a user's BCredit position.

Quote and maker state

function getMaker(BToken _bToken) external view returns (State.Maker memory)
function getQuoteState(BToken _bToken) external view returns (QuoteState memory state_)
function quoteLeverage(BToken _bToken, uint256 _collateralIn, uint256 _leverageFactor)
  external view returns (uint256 targetCollateral_, uint256 maxSwapReservesIn_, uint256 expectedDebt_, uint256 slippage_)

getQuoteState exposes the state off-chain routers need to reproduce BSwap quotes locally. quoteLeverage previews the target collateral, max swap reserves, expected debt, and slippage for a leverage action.

Protocol and hook state

function protocolFeeRecipient() external view returns (address)
function defaultProtocolFeePct() external view returns (uint256)
function defaultLiquidityFeePct() external view returns (uint256)
function originationFee() external view returns (uint256)
function timeToDistribute() external view returns (uint256)
function timeToAdapt() external view returns (uint256)
function poolIdToBToken(PoolId _poolId) external view returns (BToken)
function isProtocolPaused() external view returns (bool)
function isLocked() external view returns (bool)
function isApprovedCreditDeployer(address _user) external view returns (bool)
function reserveHoldings(ERC20 _reserve) external view returns (uint256)
function hasHook(BToken _bToken) external view returns (bool)
function poolKey(BToken _bToken) external view returns (PoolKey memory)
function getComponents() external view returns (Component[] memory components_)

Usage example

// Get current prices
uint256 marketPrice = blens.activePrice(bToken);
uint256 blv = blens.blvPrice(bToken);
uint256 premium = marketPrice - blv;

// Check pool state
uint256 reserves = blens.totalReserves(bToken);
uint256 circulating = blens.getCirculatingSupply(bToken);

// Preview leverage
(uint256 targetCollateral, uint256 maxIn, uint256 expectedDebt, uint256 slippage) =
  blens.quoteLeverage(bToken, 1000e18, 1e18);

// Check user positions
(uint256 staked, uint256 locked, uint256 earned,) = blens.stakedPosition(bToken, user);
(uint256 collateral, uint256 debt) = blens.creditAccount(bToken, user);

ABI

[
  {
    "type": "function",
    "name": "LABEL",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "ROUTES",
    "inputs": [],
    "outputs": [
      {
        "name": "routes_",
        "type": "bytes4[]",
        "internalType": "bytes4[]"
      }
    ],
    "stateMutability": "pure"
  },
  {
    "type": "function",
    "name": "VERSION",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "accumulator",
    "inputs": [
      {
        "name": "_bToken",
        "type": "address",
        "internalType": "contract BToken"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "activePrice",
    "inputs": [
      {
        "name": "_bToken",
        "type": "address",
        "internalType": "contract BToken"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "blvPrice",
    "inputs": [
      {
        "name": "_bToken",
        "type": "address",
        "internalType": "contract BToken"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "claimableYield",
    "inputs": [
      {
        "name": "_bToken",
        "type": "address",
        "internalType": "contract BToken"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "convexityExp",
    "inputs": [
      {
        "name": "_bToken",
        "type": "address",
        "internalType": "contract BToken"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "creator",
    "inputs": [
      {
        "name": "_bToken",
        "type": "address",
        "internalType": "contract BToken"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "address",
        "internalType": "address"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "creatorClaimable",
    "inputs": [
      {
        "name": "_bToken",
        "type": "address",
        "internalType": "contract BToken"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "creatorFeePct",
    "inputs": [
      {
        "name": "_bToken",
        "type": "address",
        "internalType": "contract BToken"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "creditAccount",
    "inputs": [
      {
        "name": "_bToken",
        "type": "address",
        "internalType": "contract BToken"
      },
      {
        "name": "_user",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "defaultLiquidityFeePct",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "defaultProtocolFeePct",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "deployerProfile",
    "inputs": [
      {
        "name": "_user",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "tuple",
        "internalType": "struct State.DeployerProfile",
        "components": [
          {
            "name": "active",
            "type": "bool",
            "internalType": "bool"
          },
          {
            "name": "approvedCreditDeployer",
            "type": "bool",
            "internalType": "bool"
          },
          {
            "name": "pauser",
            "type": "bool",
            "internalType": "bool"
          },
          {
            "name": "protocolFeePct",
            "type": "uint64",
            "internalType": "uint64"
          },
          {
            "name": "liquidityFeePct",
            "type": "uint64",
            "internalType": "uint64"
          },
          {
            "name": "approvedTokenRegistrar",
            "type": "bool",
            "internalType": "bool"
          }
        ]
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "getBookPrice",
    "inputs": [
      {
        "name": "_bToken",
        "type": "address",
        "internalType": "contract BToken"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "getCirculatingSupply",
    "inputs": [
      {
        "name": "_bToken",
        "type": "address",
        "internalType": "contract BToken"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "getComponents",
    "inputs": [],
    "outputs": [
      {
        "name": "components_",
        "type": "address[]",
        "internalType": "contract Component[]"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "getMaker",
    "inputs": [
      {
        "name": "_bToken",
        "type": "address",
        "internalType": "contract BToken"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "tuple",
        "internalType": "struct State.Maker",
        "components": [
          {
            "name": "initialized",
            "type": "bool",
            "internalType": "bool"
          },
          {
            "name": "blvPrice",
            "type": "uint128",
            "internalType": "uint128"
          },
          {
            "name": "swapFee",
            "type": "uint128",
            "internalType": "uint128"
          },
          {
            "name": "maxCirc",
            "type": "uint128",
            "internalType": "uint128"
          },
          {
            "name": "maxReserves",
            "type": "uint128",
            "internalType": "uint128"
          },
          {
            "name": "convexityExp",
            "type": "uint128",
            "internalType": "uint128"
          },
          {
            "name": "lastInvariant",
            "type": "uint256",
            "internalType": "uint256"
          }
        ]
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "getQuoteState",
    "inputs": [
      {
        "name": "_bToken",
        "type": "address",
        "internalType": "contract BToken"
      }
    ],
    "outputs": [
      {
        "name": "state_",
        "type": "tuple",
        "internalType": "struct BLens.QuoteState",
        "components": [
          {
            "name": "snapshotCurveParams",
            "type": "tuple",
            "internalType": "struct CurveParams",
            "components": [
              {
                "name": "BLV",
                "type": "uint256",
                "internalType": "uint256"
              },
              {
                "name": "circ",
                "type": "uint256",
                "internalType": "uint256"
              },
              {
                "name": "supply",
                "type": "uint256",
                "internalType": "uint256"
              },
              {
                "name": "swapFee",
                "type": "uint256",
                "internalType": "uint256"
              },
              {
                "name": "reserves",
                "type": "uint256",
                "internalType": "uint256"
              },
              {
                "name": "totalSupply",
                "type": "uint256",
                "internalType": "uint256"
              },
              {
                "name": "convexityExp",
                "type": "uint256",
                "internalType": "uint256"
              },
              {
                "name": "lastInvariant",
                "type": "uint256",
                "internalType": "uint256"
              }
            ]
          },
          {
            "name": "quoteBlockBuyDeltaCirc",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "quoteBlockSellDeltaCirc",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "totalSupply",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "totalBTokens",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "totalReserves",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "reserveDecimals",
            "type": "uint8",
            "internalType": "uint8"
          },
          {
            "name": "liquidityFeePct",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "pendingSurplus",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "shouldSettlePendingSurplus",
            "type": "bool",
            "internalType": "bool"
          },
          {
            "name": "maxSellDelta",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "snapshotActivePrice",
            "type": "uint256",
            "internalType": "uint256"
          }
        ]
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "hasHook",
    "inputs": [
      {
        "name": "_bToken",
        "type": "address",
        "internalType": "contract BToken"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "isApprovedCreditDeployer",
    "inputs": [
      {
        "name": "_user",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "isLocked",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "isPoolPaused",
    "inputs": [
      {
        "name": "_bToken",
        "type": "address",
        "internalType": "contract BToken"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "isProtocolPaused",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "lastInvariant",
    "inputs": [
      {
        "name": "_bToken",
        "type": "address",
        "internalType": "contract BToken"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "lastUpdatedTimestamp",
    "inputs": [
      {
        "name": "_bToken",
        "type": "address",
        "internalType": "contract BToken"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "liquidityFeePct",
    "inputs": [
      {
        "name": "_bToken",
        "type": "address",
        "internalType": "contract BToken"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "originationFee",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "pendingSurplus",
    "inputs": [
      {
        "name": "_bToken",
        "type": "address",
        "internalType": "contract BToken"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "pendingYield",
    "inputs": [
      {
        "name": "_bToken",
        "type": "address",
        "internalType": "contract BToken"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "poolFeeRecipient",
    "inputs": [
      {
        "name": "_bToken",
        "type": "address",
        "internalType": "contract BToken"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "address",
        "internalType": "address"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "poolFeeShare",
    "inputs": [
      {
        "name": "_bToken",
        "type": "address",
        "internalType": "contract BToken"
      }
    ],
    "outputs": [
      {
        "name": "creator_",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "staking_",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "poolIdToBToken",
    "inputs": [
      {
        "name": "_poolId",
        "type": "bytes32",
        "internalType": "PoolId"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "address",
        "internalType": "contract BToken"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "poolKey",
    "inputs": [
      {
        "name": "_bToken",
        "type": "address",
        "internalType": "contract BToken"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "tuple",
        "internalType": "struct PoolKey",
        "components": [
          {
            "name": "currency0",
            "type": "address",
            "internalType": "Currency"
          },
          {
            "name": "currency1",
            "type": "address",
            "internalType": "Currency"
          },
          {
            "name": "fee",
            "type": "uint24",
            "internalType": "uint24"
          },
          {
            "name": "tickSpacing",
            "type": "int24",
            "internalType": "int24"
          },
          {
            "name": "hooks",
            "type": "address",
            "internalType": "contract IHooks"
          }
        ]
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "previewInvariantForPrice",
    "inputs": [
      {
        "name": "_launchPrice",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "_totalSupply",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "_bTokenDecimals",
        "type": "uint8",
        "internalType": "uint8"
      }
    ],
    "outputs": [
      {
        "name": "initialInvariant_",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "pure"
  },
  {
    "type": "function",
    "name": "previewInvariantInitPrice",
    "inputs": [
      {
        "name": "_initialInvariant",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "_totalSupply",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "_bTokenDecimals",
        "type": "uint8",
        "internalType": "uint8"
      }
    ],
    "outputs": [
      {
        "name": "launchPrice_",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "pure"
  },
  {
    "type": "function",
    "name": "protocolClaimable",
    "inputs": [
      {
        "name": "_bToken",
        "type": "address",
        "internalType": "contract BToken"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "protocolFeePct",
    "inputs": [
      {
        "name": "_bToken",
        "type": "address",
        "internalType": "contract BToken"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "protocolFeeRecipient",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address",
        "internalType": "address"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "quoteLeverage",
    "inputs": [
      {
        "name": "_bToken",
        "type": "address",
        "internalType": "contract BToken"
      },
      {
        "name": "_collateralIn",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "_leverageFactor",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "targetCollateral_",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "maxSwapReservesIn_",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "expectedDebt_",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "slippage_",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "reserve",
    "inputs": [
      {
        "name": "_bToken",
        "type": "address",
        "internalType": "contract BToken"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "address",
        "internalType": "contract ERC20"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "reserveHoldings",
    "inputs": [
      {
        "name": "_reserve",
        "type": "address",
        "internalType": "contract ERC20"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "settledReserves",
    "inputs": [
      {
        "name": "_bToken",
        "type": "address",
        "internalType": "contract BToken"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "stakedPosition",
    "inputs": [
      {
        "name": "_bToken",
        "type": "address",
        "internalType": "contract BToken"
      },
      {
        "name": "_user",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "supportsInterface",
    "inputs": [
      {
        "name": "_interfaceId",
        "type": "bytes4",
        "internalType": "bytes4"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "stateMutability": "pure"
  },
  {
    "type": "function",
    "name": "swapFee",
    "inputs": [
      {
        "name": "_bToken",
        "type": "address",
        "internalType": "contract BToken"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "timeToAdapt",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "timeToDistribute",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "tokensPerSecond",
    "inputs": [
      {
        "name": "_bToken",
        "type": "address",
        "internalType": "contract BToken"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "totalBTokens",
    "inputs": [
      {
        "name": "_bToken",
        "type": "address",
        "internalType": "contract BToken"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "totalCollateral",
    "inputs": [
      {
        "name": "_bToken",
        "type": "address",
        "internalType": "contract BToken"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "totalDebt",
    "inputs": [
      {
        "name": "_bToken",
        "type": "address",
        "internalType": "contract BToken"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "totalFeeShare",
    "inputs": [
      {
        "name": "_bToken",
        "type": "address",
        "internalType": "contract BToken"
      }
    ],
    "outputs": [
      {
        "name": "creator_",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "staking_",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "protocol_",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "totalReserves",
    "inputs": [
      {
        "name": "_bToken",
        "type": "address",
        "internalType": "contract BToken"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "totalStaked",
    "inputs": [
      {
        "name": "_bToken",
        "type": "address",
        "internalType": "contract BToken"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "totalSupply",
    "inputs": [
      {
        "name": "_bToken",
        "type": "address",
        "internalType": "contract BToken"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "withdrawable",
    "inputs": [
      {
        "name": "_bToken",
        "type": "address",
        "internalType": "contract BToken"
      },
      {
        "name": "_user",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "error",
    "name": "BLens_InvalidLeverageFactor",
    "inputs": []
  },
  {
    "type": "error",
    "name": "BLens_UnrepresentableLaunchPrice",
    "inputs": []
  },
  {
    "type": "error",
    "name": "Component_NotPermitted",
    "inputs": []
  },
  {
    "type": "error",
    "name": "InvalidConvexityExp",
    "inputs": []
  },
  {
    "type": "error",
    "name": "InvariantDecreased",
    "inputs": [
      {
        "name": "prevInvariant",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "newInvariant",
        "type": "uint256",
        "internalType": "uint256"
      }
    ]
  }
]