Skip to main content

Entities

Entities for the BentoBox subgraph are all listed below.

BentoBox

FieldTypeDescription
idIDid
users[User]array of users
tokens[Token]array of tokens
kashiPairs[KashiPair]array of Kashi Pairs
transactions[BentoBoxAction]array containing all the transactions
flashLoans[FlashLoan]array of Flash Loans
masterContracts[MasterContract]array of MasterContracts
totalTokensBigInttotal number of tokens in BentoBox
totalKashiPairsBigInttotal number of Kashi Pairs in BentoBox
totalUsersBigInttotal number of users
blockBigIntblock
timestampBigInttimestamp

BentoBoxAction

FieldTypeDescription
idIDid
bentoBoxBentoBoxBentoBox
typeBentoBoxActionTypeBentoBoxActionType type
fromUseruser initiating the action
toUseruser receiving the action
tokenTokentoken being used
amountBigIntamount of token to use
shareBigIntamount of BentoBox shares
blockBigIntblock action was taken on
timestampBigInttimestamp

FlashLoan

FieldTypeDescription
idIDid
bentoBoxBentoBoxBentoBox
borrowerBytesborrower's address
receiverBytesreceiver's address
tokenTokentoken being borrowed
amountBigIntamount of token to borrow
feeAmountBigIntfee for loan
blockBigIntblock loan was taken on
timestampBigInttimestamp

MasterContract

FieldTypeDescription
idIDid
bentoBoxBentoBoxBentoBox
clones[Clone]array of clones
masterContractApprovals[MasterContractApproval]array of masterContractApprovals

Clone

FieldTypeDescription
idIDid
bentoBoxBentoBoxBentoBox
masterContractMasterContractMasterContract
dataStringdata needed to build clone
blockBigIntblock clone was created on
timestampBigInttimestamp

MasterContractApproval

FieldTypeDescription
idIDconcantenated user address with MasterContract
masterContractMasterContractMasterContract
userUseruser
approvedBooleanMasterContract approved or not

Protocol

FieldTypeDescription
idIDid

Token

FieldTypeDescription
idIDid
bentoBoxBentoBoxBentoBox
nameStringtoken's name
symbolStringtoken's symbol
decimalsBigInttoken's amount of decimals
totalSupplyElasticBigInttotal amount of elastic supply
totalSupplyBaseBigInttotal amount of base supply
strategyStrategystrategy
strategyTargetPercentageBigInttarget percentage to set for the strategy chosen
blockBigIntblock
timestampBigInttimestamp

User

FieldTypeDescription
idIDid
bentoBoxBentoBoxBentoBox
masterContractApprovals[MasterContractApproval]array of MasterContractApprovals
tokens[UserToken]array of tokens user owns
kashiPairs[UserKashiPair]array of Kashi Pairs user owns
withdrawals[BentoBoxAction]array containing all the withdrawals owner has made
deposits[BentoBoxAction]array containing all the deposits owner has made
blockBigIntblock user was created on
timestampBigInttimestamp

UserToken

FieldTypeDescription
idIDconcatenated user address with token address
userUseruser
tokenTokentoken
shareBigIntamount of shares user owns
blockBigIntblock user token was created on
timestampBigInttimestamp

KashiPair

FieldTypeDescription
idIDid
bentoBoxBentoBoxBentoBox
typeKashiPairTypeKashi Pair type
masterContractMasterContractMasterContract
ownerBytesowner address
feeToBytesreceiver address
nameStringpair name
symbolStringpair symbol
oracleBytesoracle address
assetTokenhalf of pair
collateralTokenother half of pair
exchangeRateBigIntexchange rate
totalAssetElasticBigIntelastic supply of pair
totalAssetBaseBigIntbase supply of pair
totalCollateralShareBigIntamount of collateral in shares
totalBorrowElasticBigIntelastic supply of borrow amount
totalBorrowBaseBigIntbase supply of borrow amount
interestPerSecondBigIntinterest rate
utilizationBigIntutilization rate
feesEarnedFractionBigIntfees earned in shares
totalFeesEarnedFractionBigInttotal fees earned in shares
lastAccruedBigIntmost recent amount of fees earned
supplyAPRBigIntsupply APR
borrowAPRBigIntborrow APR
transactions[KashiPairAction]array of transactions made on the pair
users[UserKashiPair]total number of users using the pair
blockBigIntblock pair was created on
timestampBigInttimestamp

KashiPairAction

FieldTypeDescription
idIDid
typeKashiPairActionTypetype of Kashi Pair
pairKashiPairKashi Pair
rootUserKashiPairUserKashiPair
tokenTokentoken being used
amountBigIntamount of token being used
shareBigIntamount of shares to receive
feeAmountBigIntfee amount
fractionBigInt...
partBigInt...
poolPercentageBigIntpercentage of pool
blockBigIntblock action was taken on
timestampBigInttimestamp

UserKashiPair

FieldTypeDescription
idIDid
userUseruser
pairKashiPairKashi Pair
assetFractionBigIntuser's pair amount
collateralShareBigIntcollateral amount in shares
borrowPartBigIntamount user has borrowed
transactions[KashiPairAction]user's transactions with pair
blockBigIntblock
timestampBigInttimestamp

KashiPairHourData

FieldTypeDescription
idIDid
hourStartUnixIntunix timestamp
pairKashiPairKashi Pair
totalAssetElasticBigIntpair's total elastic supply
totalAssetBaseBigIntpair's total base supply
totalCollateralShareBigIntpair's total collateral amount in shares
totalBorrowElasticBigIntpair's total elastic borrowing rate
totalBorrowBaseBigIntpair's total base borrowing rate
avgExchangeRateBigIntaverage exchange rate
avgUtilizationBigIntaverage utilization rate
avgInterestPerSecondBigIntaverage amount of interest per second

KashiPairDayData

FieldTypeDescription
idIDday start timestamp
dateInthour start timestamp
pairKashiPairKashi Pair
totalAssetElasticBigIntpair's total elastic supply
totalAssetBaseBigIntpair's total base supply
totalCollateralShareBigIntpair's total collateral amount in shares
totalBorrowElasticBigIntpair's total elastic borrowing rate
totalBorrowBaseBigIntpair's total base borrowing rate
avgExchangeRateBigIntaverage exchange rate
avgUtilizationBigIntaverage utilization rate
avgInterestPerSecondBigIntaverage amount of interest per second

Strategy

FieldTypeDescription
idIDid
tokenTokentoken
balanceBigInttoken balance
totalProfitBigIntstrategy's total profit accrued
harvests[StrategyHarvest]array of harvests
timestampBigInttimestamp
blockBigIntblock

StrategyHarvest

FieldTypeDescription
idIDid
strategyStrategystrategy
profitBigIntamount of profit accrued in harvest
tokenElasticBigIntelastic supply of token
timestampBigInttimestamp
blockBigIntblock harvest was called on