@@ -246,6 +246,16 @@ input LiquidateRequest {
246246 chainId : ChainId !
247247}
248248
249+ type LiquidationCollateral {
250+ reserve : ReserveInfo !
251+ amount : TokenAmount
252+ }
253+
254+ type LiquidationRepaidDebt {
255+ reserve : ReserveInfo !
256+ amount : TokenAmount !
257+ }
258+
249259type Market {
250260 """The human-friendly name for the market"""
251261 name : String !
@@ -285,7 +295,10 @@ type MarketInfo {
285295}
286296
287297input MarketInput {
298+ """The address of the market pool"""
288299 address : EvmAddress !
300+
301+ """The chain id the market is deployed on"""
289302 chainId : ChainId !
290303}
291304
@@ -460,6 +473,11 @@ type PaginatedResultInfo {
460473 next : Cursor
461474}
462475
476+ type PaginatedUserTransactionHistoryResult {
477+ items : [UserTransactionItem ! ]!
478+ pageInfo : PaginatedResultInfo !
479+ }
480+
463481type PaginatedVaultsResult {
464482 items : [Vault ! ]!
465483 pageInfo : PaginatedResultInfo !
@@ -562,6 +580,9 @@ type Query {
562580
563581 """Get the reserve for on a market"""
564582 reserve (request : ReserveRequest ! ): Reserve
583+
584+ """The user's transaction history"""
585+ userTransactionHistory : PaginatedUserTransactionHistoryResult !
565586 _service : _Service !
566587}
567588
@@ -661,6 +682,25 @@ type ReserveBorrowInfo {
661682 """The reserve utilization rate"""
662683 utilizationRate : DecimalValue !
663684
685+ """
686+ Variable rate slope 1 - the rate of interest increase when utilization rate is below optimal
687+ This is the slope of the interest rate curve in the first segment (0% to optimal utilization)
688+ """
689+ variableRateSlope1 : DecimalValue !
690+
691+ """
692+ Variable rate slope 2 - the rate of interest increase when utilization rate is above optimal
693+ This is the slope of the interest rate curve in the second segment (optimal to 100% utilization)
694+ Typically much steeper than slope1 to discourage over-utilization
695+ """
696+ variableRateSlope2 : DecimalValue !
697+
698+ """
699+ The optimal usage rate - the utilization rate at which the variable rate curve transitions
700+ from slope1 to slope2. This represents the target utilization rate for the reserve
701+ """
702+ optimalUsageRate : DecimalValue !
703+
664704 """
665705 Borrowing can have different states based on the criteria of the user or the market
666706 """
@@ -684,6 +724,23 @@ enum ReserveBorrowingState {
684724 USER_EMODE_DISABLED_BORROW
685725}
686726
727+ type ReserveInfo {
728+ """The market information the reserve is under"""
729+ market : MarketInfo !
730+
731+ """The reserve underlying currency"""
732+ underlyingToken : Currency !
733+
734+ """The reserve a token"""
735+ aToken : Currency !
736+
737+ """The reserve v token"""
738+ vToken : Currency !
739+
740+ """The usd exchange rate for the underlying token"""
741+ usdExchangeRate : BigDecimal !
742+ }
743+
687744type ReserveIsolationModeConfig {
688745 """This means that it can be used to borrow"""
689746 canBeCollateral : Boolean !
@@ -824,6 +881,14 @@ input UsdExchangeRatesRequest {
824881 chainId : ChainId !
825882}
826883
884+ type UserBorrowTransaction {
885+ amount : TokenAmount !
886+ reserve : ReserveInfo !
887+ blockExplorerUrl : String !
888+ txHash : TxHash !
889+ timestamp : DateTime !
890+ }
891+
827892input UserBorrowsRequest {
828893 """The market addresses and chains ids to query"""
829894 markets : [MarketInput ! ]!
@@ -846,6 +911,14 @@ input UserBorrowsRequestOrderBy @oneOf {
846911 apy : OrderDirection
847912}
848913
914+ type UserLiquidationCallTransaction {
915+ collateral : LiquidationCollateral !
916+ debtRepaid : LiquidationRepaidDebt !
917+ blockExplorerUrl : String !
918+ txHash : TxHash !
919+ timestamp : DateTime !
920+ }
921+
849922input UserMarketStateRequest {
850923 """The pool address for the market"""
851924 market : EvmAddress !
@@ -857,6 +930,14 @@ input UserMarketStateRequest {
857930 chainId : ChainId !
858931}
859932
933+ type UserRepayTransaction {
934+ amount : TokenAmount !
935+ reserve : ReserveInfo !
936+ blockExplorerUrl : String !
937+ txHash : TxHash !
938+ timestamp : DateTime !
939+ }
940+
860941input UserSetEmodeRequest {
861942 """The pool address for the market"""
862943 market : EvmAddress !
@@ -901,9 +982,38 @@ input UserSuppliesRequestOrderBy @oneOf {
901982 isCollateralized : OrderByUserCriteria
902983}
903984
985+ type UserSupplyTransaction {
986+ amount : TokenAmount !
987+ reserve : ReserveInfo !
988+ blockExplorerUrl : String !
989+ txHash : TxHash !
990+ timestamp : DateTime !
991+ }
992+
993+ union UserTransactionItem = UserSupplyTransaction | UserWithdrawTransaction | UserBorrowTransaction | UserRepayTransaction | UserUsageAsCollateralTransaction | UserLiquidationCallTransaction
994+
995+ type UserUsageAsCollateralTransaction {
996+ enabled : Boolean !
997+ reserve : ReserveInfo !
998+ blockExplorerUrl : String !
999+ txHash : TxHash !
1000+ timestamp : DateTime !
1001+ }
1002+
1003+ type UserVaultShares {
1004+ """The user's shares on the vault"""
1005+ shares : TokenAmount !
1006+
1007+ """The amount they have deposited on the vault"""
1008+ amountDeposited : TokenAmount !
1009+
1010+ """The amount they have withdrawn on the vault"""
1011+ amountWithdrawn : TokenAmount !
1012+ }
1013+
9041014input UserVaultsFilter {
905- """Filter by market addresses """
906- markets : [EvmAddress ! ]
1015+ """Filter by markets """
1016+ markets : [VaultInput ! ]
9071017
9081018 """Filter by underlying token addresses"""
9091019 underlyingTokens : [EvmAddress ! ]
@@ -937,6 +1047,14 @@ input UserVaultsRequest {
9371047 cursor : Cursor
9381048}
9391049
1050+ type UserWithdrawTransaction {
1051+ amount : TokenAmount !
1052+ reserve : ReserveInfo !
1053+ blockExplorerUrl : String !
1054+ txHash : TxHash !
1055+ timestamp : DateTime !
1056+ }
1057+
9401058type Vault {
9411059 """The vault address"""
9421060 address : EvmAddress !
@@ -956,8 +1074,8 @@ type Vault {
9561074 """The current fee percentage set for the vault."""
9571075 fee : BigDecimal !
9581076
959- """How much this vault has made by yield """
960- feesFromYield : TokenAmount !
1077+ """How much this vault has made in revenue """
1078+ totalFeeRevenue : TokenAmount !
9611079
9621080 """
9631081 The last recorded balance of the vault's AToken. This value is updated when yield is accrued.
@@ -967,8 +1085,8 @@ type Vault {
9671085 """The chain id the vault lives on"""
9681086 chainId : ChainId !
9691087
970- """The user's shares on the vault"""
971- userShares : DecimalValue
1088+ """The user's shares info on the vault"""
1089+ userShares : UserVaultShares
9721090}
9731091
9741092input VaultClaimRewardsRequest {
@@ -993,10 +1111,13 @@ input VaultDeployRequest {
9931111 chainId : ChainId !
9941112
9951113 """
996- The address to set as which deploys the vault and will become a owner of the vault.
1114+ The address to set as which deploys the vault and will become an owner of the vault.
9971115 """
9981116 deployer : EvmAddress !
9991117
1118+ """The owner of the vault - if not defined, it will be the deployer"""
1119+ owner : EvmAddress
1120+
10001121 """The initial fee to set, expressed in %."""
10011122 initialFee : BigDecimal !
10021123
@@ -1033,6 +1154,14 @@ input VaultDepositRequest {
10331154 chainId : ChainId !
10341155}
10351156
1157+ input VaultInput {
1158+ """The address of the fault"""
1159+ address : EvmAddress !
1160+
1161+ """The chain id the vault is on"""
1162+ chainId : ChainId !
1163+ }
1164+
10361165input VaultMintSharesRequest {
10371166 """The vault address"""
10381167 vault : EvmAddress !
@@ -1183,7 +1312,7 @@ input VaultsRequest {
11831312
11841313input VaultsRequestFilterCriteria @oneOf {
11851314 """Filter by specific vault addresses"""
1186- vaults : [EvmAddress ! ]
1315+ vaults : [VaultInput ! ]
11871316
11881317 """Filter by owner addresses"""
11891318 ownedBy : [EvmAddress ! ]
0 commit comments