-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathschema.graphql
More file actions
3347 lines (2598 loc) · 84.8 KB
/
schema.graphql
File metadata and controls
3347 lines (2598 loc) · 84.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
"""Exposes a URL that specifies the behavior of this scalar."""
directive @specifiedBy(
"""The URL that specifies the behavior of this scalar."""
url: String!
) on SCALAR
"""
Indicates exactly one field must be supplied and this field must not be `null`.
"""
directive @oneOf on INPUT_OBJECT
directive @cacheControl(maxAge: Int, scope: CacheControlScope, inheritMaxAge: Boolean) on FIELD_DEFINITION | OBJECT | INTERFACE | UNION | QUERY
"""42 character long hex address"""
scalar Address
type AddressDataPoint {
x: Float!
y: Address
}
type AddressMetadata {
type: AddressMetadataType!
metadata: Metadata!
}
enum AddressMetadataType {
safe
risk
aragon
}
"""Risk address metadata"""
type AddressRiskMetadata {
risk: String!
riskReason: String
isAuthorized: Boolean!
}
"""Aragon address metadata"""
type AragonAddressMetadata {
ensDomain: String
name: String
description: String
}
"""Asset"""
type Asset {
id: ID!
"""ERC-20 token contract address"""
address: Address!
chain: Chain!
decimals: Float!
name: String!
symbol: String!
tags: [String!]
"""Token logo URI, for display purpose"""
logoURI: String
"""ERC-20 token total supply"""
totalSupply: BigInt! @deprecated(reason: "this data is not updated anymore")
"""Current price in USD, for display purpose."""
priceUsd: Float
"""Historical price in USD, for display purpose"""
historicalPriceUsd(options: TimeseriesOptions = {}): [FloatDataPoint!]
"""Current oracle price in USD, for display purpose."""
oraclePriceUsd(timestamp: Float): Float
"""Current spot price in ETH."""
spotPriceEth(timestamp: Float): Float
"""Historical spot price in ETH"""
historicalSpotPriceEth(options: TimeseriesOptions = {}): [FloatDataPoint!]
"""MetaMorpho vault"""
vault: Vault
"""Asset yield"""
yield: AssetYield
"""Risk related data on the asset"""
riskAnalysis: [RiskAnalysis!]
"""Either the asset is whitelisted or not"""
isWhitelisted: Boolean!
}
enum AssetOrderBy {
Address
CredoraRiskScore
}
input AssetsFilters {
search: String
"""Filter by asset id"""
id_in: [String!]
"""Filter by token symbol"""
symbol_in: [String!]
"""Filter by token contract address. Case insensitive."""
address_in: [String!]
"""Filter by chain id"""
chainId_in: [Int!]
"""Filter by token's tags"""
tags_in: [String!]
"""Filter by credora risk score lower than or equal to given value"""
credoraRiskScore_lte: Float
"""Filter by credora risk score greater than or equal to given value"""
credoraRiskScore_gte: Float
"""Filter by whitelisted status"""
whitelisted: Boolean
"""Filter assets that are listed by at least one vault"""
isVaultAsset: Boolean
"""Filter assets that are listed as collateral on at least one market"""
isCollateralAsset: Boolean
"""Filter assets that are listed as loan on at least one market"""
isLoanAsset: Boolean
"""Filter assets that are listed by specific curators"""
curator_in: [String!]
}
"""Asset yield"""
type AssetYield {
"""Asset yield (APR)"""
apr: Float!
}
"""
The `BigInt` scalar type represents non-fractional signed whole numeric values.
"""
scalar BigInt
type BigIntDataPoint {
x: Float!
y: BigInt
}
enum CacheControlScope {
PUBLIC
PRIVATE
}
"""Event data for cap-related operation"""
type CapEventData {
market: Market!
cap: BigInt!
}
"""Chain"""
type Chain {
id: Int!
network: String!
currency: String!
}
"""Oracle creation tx"""
type ChainlinkOracleV2Event {
txHash: HexString!
timestamp: BigInt!
blockNumber: BigInt!
chainId: Int!
}
"""
Amount of collateral at risk of liquidation at collateralPriceRatio * oracle price
"""
type CollateralAtRiskDataPoint {
collateralPriceRatio: Float!
collateralAssets: BigInt!
collateralUsd: Float!
}
"""Credora risk analysis"""
type CredoraRiskAnalysis {
score: Float!
rating: String
isUnderReview: Boolean!
timestamp: Float!
}
"""Vault curator"""
type Curator {
id: ID!
name: String!
description: String
verified: Boolean!
"""Curator logo URI, for display purpose"""
image: String
"""Link to curator website"""
url: String @deprecated(reason: "Use `socials` instead")
socials: [CuratorSocial!]!
"""Current state"""
state: CuratorState
addresses: [CuratorAddress!]!
}
"""Curator Address"""
type CuratorAddress {
chainId: Int!
address: String!
"""Additional information about the address."""
metadata: PaginatedAddressMetadata
}
"""
Filtering options for curators. AND operator is used for multiple filters, while
OR operator is used for multiple values in the same filter.
"""
input CuratorFilters {
search: String
chainId: Int
chainId_in: [Int!]
address_in: [String!]
verified: Boolean
}
type CuratorSocial {
type: String!
url: String!
}
"""Vault curator state"""
type CuratorState {
curatorId: ID!
"""
Assets Under Management. Total assets managed by the curator, in USD for display purpose.
"""
aum: Float!
}
"""Custom Warning Metadata"""
type CustomMetadata {
content: String
}
type FloatDataPoint {
x: Float!
y: Float
}
"""Hardcoded Price Metadata"""
type HardcodedPriceMetadata {
symbolFrom: String
symbolTo: String
}
"""Hexadecimal string"""
scalar HexString
type IntDataPoint {
x: Float!
y: Int
}
"""IRM curve data point"""
type IRMCurveDataPoint {
"""Market utilization rate"""
utilization: Float!
"""Supply APY at utilization rate"""
supplyApy: Float!
"""Borrow APY at utilization rate"""
borrowApy: Float!
}
"""Morpho Blue market"""
type Market {
id: ID!
uniqueKey: MarketId!
lltv: BigInt!
oracleAddress: Address!
irmAddress: Address!
creationBlockNumber: Int!
creationTimestamp: BigInt!
creatorAddress: Address
whitelisted: Boolean!
"""
Amount of collateral to borrow 1 loan asset scaled to both asset decimals
"""
collateralPrice: BigInt @deprecated(reason: "Use `state.price` instead.")
"""Underlying amount of assets that can be reallocated to this market"""
reallocatableLiquidityAssets: BigInt
targetBorrowUtilization: BigInt!
targetWithdrawUtilization: BigInt!
loanAsset: Asset!
collateralAsset: Asset
oracle: Oracle
morphoBlue: MorphoBlue!
"""Current state"""
state: MarketState
"""State history"""
historicalState: MarketHistory
"""Feeds used by the oracle if provided by the contract"""
oracleFeed: MarketOracleFeed
"""Market oracle information"""
oracleInfo: MarketOracleInfo
"""Market concentrations"""
concentration: MarketConcentration @deprecated(reason: "Not maintained.")
"""Market bad debt values"""
badDebt: MarketBadDebt
"""Market realized bad debt values"""
realizedBadDebt: MarketBadDebt
"""Daily market APYs"""
dailyApys: MarketApyAggregates @deprecated(reason: "Use `market.state` daily average APYs instead.")
"""Weekly market APYs"""
weeklyApys: MarketApyAggregates @deprecated(reason: "Use `market.state` weekly average APYs instead.")
"""Monthly market APYs"""
monthlyApys: MarketApyAggregates @deprecated(reason: "Use `market.state` monthly average APYs instead.")
"""Quarterly market APYs"""
quarterlyApys: MarketApyAggregates @deprecated(reason: "Use `market.state` quarterly average APYs instead.")
"""Yearly market APYs"""
yearlyApys: MarketApyAggregates @deprecated(reason: "Use `market.state` yearly average APYs instead.")
"""All time market APYs"""
allTimeApys: MarketApyAggregates @deprecated(reason: "Use `market.state` all time average APYs instead.")
"""
Current IRM curve at different utilization thresholds for display purpose
"""
currentIrmCurve(numberOfPoints: Float = 100): [IRMCurveDataPoint!]
"""Public allocator shared liquidity available reallocations"""
publicAllocatorSharedLiquidity: [PublicAllocatorSharedLiquidity!]
"""Market warnings"""
warnings: [MarketWarning!]
"""Vaults with the market in supply queue"""
supplyingVaults: [Vault!]
"""Risk related data on the market"""
riskAnalysis: [RiskAnalysis!]
}
"""Market APY aggregates"""
type MarketApyAggregates {
"""Average market supply APY excluding rewards"""
supplyApy: Float
"""Average market borrow APY excluding rewards"""
borrowApy: Float
"""Average market supply APY including rewards"""
netSupplyApy: Float
"""Average market borrow APY including rewards"""
netBorrowApy: Float
}
"""Bad debt realized in the market"""
type MarketBadDebt {
"""Amount of bad debt realized in the market in underlying units."""
underlying: BigInt!
"""Amount of bad debt realized in the market in USD."""
usd: Float
}
"""Market collateral at risk of liquidation"""
type MarketCollateralAtRisk {
market: Market!
"""Total collateral at risk of liquidation at certain prices thresholds."""
collateralAtRisk: [CollateralAtRiskDataPoint!]
}
"""Market collateral transfer transaction data"""
type MarketCollateralTransferTransactionData {
assets: BigInt!
assetsUsd: Float
market: Market!
}
"""Morpho Blue supply and borrow side concentrations"""
type MarketConcentration {
"""Borrowers Herfindahl-Hirschman Index"""
supplyHhi: Float @deprecated(reason: "Not maintained.")
"""Borrowers Herfindahl-Hirschman Index"""
borrowHhi: Float @deprecated(reason: "Not maintained.")
}
"""
Filtering options for markets. AND operator is used for multiple filters, while
OR operator is used for multiple values in the same filter.
"""
input MarketFilters {
search: String
"""Filter by market id"""
id_in: [String!]
whitelisted: Boolean
countryCode: String
isIdle: Boolean
"""Filter by market unique key"""
uniqueKey_in: [String!]
"""Filter by loan asset tags."""
loanAssetTags_in: [String!]
"""Filter by collateral asset tags."""
collateralAssetTags_in: [String!]
"""Filter by market oracle address. Case insensitive."""
oracleAddress_in: [String!]
"""Filter by market irm address"""
irmAddress_in: [String!]
"""Filter by chain id"""
chainId_in: [Int!]
"""Filter by collateral asset address. Case insensitive."""
collateralAssetAddress_in: [String!]
"""Filter by collateral asset id"""
collateralAssetId_in: [String!]
"""Filter by loan asset address. Case insensitive."""
loanAssetAddress_in: [String!]
"""Filter by loan asset id"""
loanAssetId_in: [String!]
"""Filter by greater than or equal to given lltv"""
lltv_gte: BigInt
"""Filter by lower than or equal to given lltv"""
lltv_lte: BigInt
"""
Filter by greater than or equal to given borrow asset amount, in underlying token units.
"""
borrowAssets_gte: BigInt
"""
Filter by lower than or equal to given borrow asset amount, in underlying token units.
"""
borrowAssets_lte: BigInt
"""Filter by greater than or equal to given borrow asset amount, in USD."""
borrowAssetsUsd_gte: Float
"""Filter by lower than or equal to given borrow asset amount, in USD."""
borrowAssetsUsd_lte: Float
"""
Filter by greater than or equal to given supply asset amount, in underlying token units.
"""
supplyAssets_gte: BigInt
"""
Filter by lower than or equal to given supply asset amount, in underlying token units.
"""
supplyAssets_lte: BigInt
"""Filter by greater than or equal to given supply asset amount, in USD."""
supplyAssetsUsd_gte: Float
"""Filter by lower than or equal to given supply asset amount, in USD."""
supplyAssetsUsd_lte: Float
"""Filter by greater than or equal to given borrow shares amount"""
borrowShares_gte: BigInt
"""Filter by lower than or equal to given borrow shares amount"""
borrowShares_lte: BigInt
"""Filter by greater than or equal to given supply shares amount"""
supplyShares_gte: BigInt
"""Filter by lower than or equal to given borrow shares amount"""
supplyShares_lte: BigInt
"""Filter by greater than or equal to given utilization rate"""
utilization_gte: Float
"""Filter by lower than or equal to given utilization rate"""
utilization_lte: Float
"""Filter by greater than or equal to given apy at target utilization"""
apyAtTarget_gte: Float
"""Filter by lower than or equal to given apy at target utilization"""
apyAtTarget_lte: Float
"""Filter by greater than or equal to given supply APY"""
supplyApy_gte: Float
"""Filter by lower than or equal to given supply APY"""
supplyApy_lte: Float
"""Filter by greater than or equal to given net supply APY"""
netSupplyApy_gte: Float
"""Filter by lower than or equal to given net supply APY"""
netSupplyApy_lte: Float
"""Filter by greater than or equal to given borrow APY"""
borrowApy_gte: Float
"""Filter by lower than or equal to given borrow APY"""
borrowApy_lte: Float
"""Filter by greater than or equal to given net borrow APY"""
netBorrowApy_gte: Float
"""Filter by lower than or equal to given net borrow APY"""
netBorrowApy_lte: Float
"""Filter by greater than or equal to given fee rate"""
fee_gte: Float
"""Filter by lower than or equal to given fee rate"""
fee_lte: Float
"""Filter by credora risk score lower than or equal to given value"""
credoraRiskScore_lte: Float
"""Filter by credora risk score greater than or equal to given value"""
credoraRiskScore_gte: Float
}
"""Market state history"""
type MarketHistory {
"""
Amount borrowed on the market, in underlying units. Amount increases as interests accrue.
"""
borrowAssets(options: TimeseriesOptions = {}): [BigIntDataPoint!]
"""
Amount supplied on the market, in underlying units. Amount increases as interests accrue.
"""
supplyAssets(options: TimeseriesOptions = {}): [BigIntDataPoint!]
"""Amount borrowed on the market, in USD for display purpose"""
borrowAssetsUsd(options: TimeseriesOptions = {}): [FloatDataPoint!]
"""Amount supplied on the market, in USD for display purpose"""
supplyAssetsUsd(options: TimeseriesOptions = {}): [FloatDataPoint!]
"""
Amount borrowed on the market, in market share units. Amount does not increase as interest accrue.
"""
borrowShares(options: TimeseriesOptions = {}): [BigIntDataPoint!]
"""
Amount supplied on the market, in market share units. Amount does not increase as interest accrue.
"""
supplyShares(options: TimeseriesOptions = {}): [BigIntDataPoint!]
"""Amount available to borrow on the market, in underlying units"""
liquidityAssets(options: TimeseriesOptions = {}): [BigIntDataPoint!]
"""Amount available to borrow on the market, in USD for display purpose"""
liquidityAssetsUsd(options: TimeseriesOptions = {}): [FloatDataPoint!]
"""Amount of collateral in the market, in underlying units"""
collateralAssets(options: TimeseriesOptions = {}): [BigIntDataPoint!]
"""Amount of collateral in the market, in USD for display purpose"""
collateralAssetsUsd(options: TimeseriesOptions = {}): [FloatDataPoint!]
"""Utilization rate"""
utilization(options: TimeseriesOptions = {}): [FloatDataPoint!]
"""AdaptiveCurveIRM APY if utilization was at target"""
apyAtTarget(options: TimeseriesOptions = {}): [FloatDataPoint!]
"""AdaptiveCurveIRM APY if utilization was at target"""
rateAtUTarget(options: TimeseriesOptions = {}): [FloatDataPoint!] @deprecated(reason: "Use `apyAtTarget` instead")
"""AdaptiveCurveIRM rate per second if utilization was at target"""
rateAtTarget(options: TimeseriesOptions = {}): [BigIntDataPoint!]
"""Supply APY excluding rewards"""
supplyApy(options: TimeseriesOptions = {}): [FloatDataPoint!]
"""Supply APY including rewards"""
netSupplyApy(options: TimeseriesOptions = {}): [FloatDataPoint!]
"""Borrow APY excluding rewards"""
borrowApy(options: TimeseriesOptions = {}): [FloatDataPoint!]
"""Supply APY including rewards"""
netBorrowApy(options: TimeseriesOptions = {}): [FloatDataPoint!]
"""Fee rate"""
fee(options: TimeseriesOptions = {}): [FloatDataPoint!]
"""Collateral price"""
price(options: TimeseriesOptions = {}): [FloatDataPoint!]
"""Daily Supply APY excluding rewards"""
dailySupplyApy(options: TimeseriesOptions = {}): [FloatDataPoint!]
"""Daily Supply APY including rewards"""
dailyNetSupplyApy(options: TimeseriesOptions = {}): [FloatDataPoint!]
"""Daily Borrow APY excluding rewards"""
dailyBorrowApy(options: TimeseriesOptions = {}): [FloatDataPoint!]
"""Daily Borrow APY including rewards"""
dailyNetBorrowApy(options: TimeseriesOptions = {}): [FloatDataPoint!]
"""Weekly Supply APY excluding rewards"""
weeklySupplyApy(options: TimeseriesOptions = {}): [FloatDataPoint!]
"""Weekly Supply APY including rewards"""
weeklyNetSupplyApy(options: TimeseriesOptions = {}): [FloatDataPoint!]
"""Weekly Borrow APY excluding rewards"""
weeklyBorrowApy(options: TimeseriesOptions = {}): [FloatDataPoint!]
"""Weekly Borrow APY including rewards"""
weeklyNetBorrowApy(options: TimeseriesOptions = {}): [FloatDataPoint!]
"""Monthly Supply APY excluding rewards"""
monthlySupplyApy(options: TimeseriesOptions = {}): [FloatDataPoint!]
"""Monthly Supply APY including rewards"""
monthlyNetSupplyApy(options: TimeseriesOptions = {}): [FloatDataPoint!]
"""Monthly Borrow APY excluding rewards"""
monthlyBorrowApy(options: TimeseriesOptions = {}): [FloatDataPoint!]
"""Monthly Borrow APY including rewards"""
monthlyNetBorrowApy(options: TimeseriesOptions = {}): [FloatDataPoint!]
"""Quarterly Supply APY excluding rewards"""
quarterlySupplyApy(options: TimeseriesOptions = {}): [FloatDataPoint!]
"""Quarterly Supply APY including rewards"""
quarterlyNetSupplyApy(options: TimeseriesOptions = {}): [FloatDataPoint!]
"""Quarterly Borrow APY excluding rewards"""
quarterlyBorrowApy(options: TimeseriesOptions = {}): [FloatDataPoint!]
"""Quarterly Borrow APY including rewards"""
quarterlyNetBorrowApy(options: TimeseriesOptions = {}): [FloatDataPoint!]
"""Yearly Supply APY excluding rewards"""
yearlySupplyApy(options: TimeseriesOptions = {}): [FloatDataPoint!]
"""Yearly Supply APY including rewards"""
yearlyNetSupplyApy(options: TimeseriesOptions = {}): [FloatDataPoint!]
"""Yearly Borrow APY excluding rewards"""
yearlyBorrowApy(options: TimeseriesOptions = {}): [FloatDataPoint!]
"""Yearly Borrow APY including rewards"""
yearlyNetBorrowApy(options: TimeseriesOptions = {}): [FloatDataPoint!]
"""All Time Supply APY excluding rewards"""
allTimeSupplyApy(options: TimeseriesOptions = {}): [FloatDataPoint!]
"""All Time Supply APY including rewards"""
allTimeNetSupplyApy(options: TimeseriesOptions = {}): [FloatDataPoint!]
"""All Time Borrow APY excluding rewards"""
allTimeBorrowApy(options: TimeseriesOptions = {}): [FloatDataPoint!]
"""All Time Borrow APY including rewards"""
allTimeNetBorrowApy(options: TimeseriesOptions = {}): [FloatDataPoint!]
}
"""66 character long hexadecimal market ID"""
scalar MarketId
"""Market liquidation transaction data"""
type MarketLiquidationTransactionData {
repaidAssets: BigInt!
repaidAssetsUsd: Float
repaidShares: BigInt!
seizedAssets: BigInt!
seizedAssetsUsd: Float
badDebtShares: BigInt!
badDebtAssets: BigInt!
badDebtAssetsUsd: Float
liquidator: Address!
market: Market!
}
"""Market oracle accuracy versus spot price"""
type MarketOracleAccuracy {
market: Market!
"""Average oracle/spot prices deviation"""
averagePercentDifference: Float @deprecated(reason: "Not maintained anymore.")
"""Maximum oracle/spot prices deviation"""
maxPercentDifference: Float @deprecated(reason: "Not maintained anymore.")
}
"""Market oracle feeds"""
type MarketOracleFeed {
baseFeedOneAddress: Address!
baseFeedOneDescription: String
baseFeedOneVendor: String
baseFeedTwoAddress: Address!
baseFeedTwoDescription: String
baseFeedTwoVendor: String
baseVault: Address
baseVaultDescription: String
baseVaultVendor: String
baseVaultConversionSample: BigInt
quoteFeedOneAddress: Address!
quoteFeedOneDescription: String
quoteFeedOneVendor: String
quoteFeedTwoAddress: Address!
quoteFeedTwoDescription: String
quoteFeedTwoVendor: String
quoteVault: Address
quoteVaultDescription: String
quoteVaultVendor: String
quoteVaultConversionSample: BigInt
scaleFactor: BigInt
}
"""Market oracle information"""
type MarketOracleInfo {
type: OracleType!
}
enum MarketOrderBy {
UniqueKey
Lltv
BorrowAssets
BorrowAssetsUsd
SupplyAssets
SupplyAssetsUsd
BorrowShares
SupplyShares
Utilization
RateAtUTarget
ApyAtTarget
SupplyApy
NetSupplyApy
BorrowApy
NetBorrowApy
Fee
LoanAssetSymbol
CollateralAssetSymbol
TotalLiquidityUsd
DailyBorrowApy
DailyNetBorrowApy
CredoraRiskScore
SizeUsd
}
"""Market position"""
type MarketPosition {
id: ID!
"""Amount of loan asset supplied, in market shares."""
supplyShares: BigInt! @deprecated(reason: "Use `state.supplyShares` instead.")
"""Amount of loan asset supplied, in underlying token units."""
supplyAssets: BigInt! @deprecated(reason: "Use `state.supplyAssets` instead.")
"""Amount of loan asset supplied, in USD for display purpose."""
supplyAssetsUsd: Float @deprecated(reason: "Use `state.supplyAssetsUsd` instead.")
"""Amount of loan asset borrowed, in market shares."""
borrowShares: BigInt! @deprecated(reason: "Use `state.borrowShares` instead.")
"""Amount of loan asset borrowed, in underlying token units."""
borrowAssets: BigInt! @deprecated(reason: "Use `state.borrowAssets` instead.")
"""Amount of loan asset borrowed, in USD for display purpose."""
borrowAssetsUsd: Float @deprecated(reason: "Use `state.borrowAssetsUsd` instead.")
"""
Amount of collateral asset deposited on the market, in underlying token units.
"""
collateral: BigInt! @deprecated(reason: "Use `state.collateral` instead.")
"""
Amount of collateral asset deposited on the market, in USD for display purpose.
"""
collateralUsd: Float @deprecated(reason: "Use `state.collateralUsd` instead.")
"""
Health factor of the position, computed as collateral value divided by borrow value.
"""
healthFactor: Float
"""
Price variation required for the given position to reach its liquidation threshold (scaled by WAD)
"""
priceVariationToLiquidationPrice: Float
"""Current state"""
state: MarketPositionState
"""State history"""
historicalState: MarketPositionHistory
user: User!
market: Market!
}
"""
Filtering options for market positions. AND operator is used for multiple
filters, while OR operator is used for multiple values in the same filter.
"""
input MarketPositionFilters {
search: String
"""Filter by market id"""
marketId_in: [String!]
"""Filter by market unique key"""
marketUniqueKey_in: [String!]
"""Filter by user id"""
userId_in: [String!]
"""Filter by user address. Case insensitive."""
userAddress_in: [String!]
"""Filter by chain id"""
chainId_in: [Int!]
"""Filter by greater than or equal to given health factor"""
healthFactor_gte: Float
"""Filter by lower than or equal to given health factor"""
healthFactor_lte: Float
"""Filter by greater than or equal to given supply shares"""
supplyShares_gte: BigInt
"""Filter by lower than or equal to given supply shares"""
supplyShares_lte: BigInt
"""Filter by greater than or equal to given borrow shares"""
borrowShares_gte: BigInt
"""Filter by lower than or equal to given borrow shares"""
borrowShares_lte: BigInt
"""
Filter by greater than or equal to given collateral amount, in underlying token units.
"""
collateral_gte: BigInt
"""
Filter by lower than or equal to given collateral amount, in underlying token units.
"""
collateral_lte: BigInt
}
"""Market position state history"""
type MarketPositionHistory {
"""
Profit (from the collateral asset's price variation) & Loss (from the loan interest) history, in loan assets.
"""
pnl(options: TimeseriesOptions = {}): [BigIntDataPoint!]
"""
Profit (from the collateral asset's price variation) & Loss (from the loan interest) history, in USD for display purposes.
"""
pnlUsd(options: TimeseriesOptions = {}): [FloatDataPoint!]
"""Return Over Equity history."""
roe(options: TimeseriesOptions = {}): [FloatDataPoint!]
"""Return Over Equity history, taking into account prices variation."""
roeUsd(options: TimeseriesOptions = {}): [FloatDataPoint!]
"""
Profit & Loss (from the loan asset's price variation and interest) of the
supply side of the position since its inception, in loan assets.
"""
supplyPnl(options: TimeseriesOptions = {}): [BigIntDataPoint!]
"""
Profit & Loss (from the loan asset's price variation and interest) of the
supply side of the position since its inception, in USD for display purpose.
"""
supplyPnlUsd(options: TimeseriesOptions = {}): [FloatDataPoint!]
"""Return Over Equity history of the supply side of the position."""
supplyRoe(options: TimeseriesOptions = {}): [FloatDataPoint!]
"""
Return Over Equity history of the supply side of the position, taking into account the loan asset's price variation.
"""
supplyRoeUsd(options: TimeseriesOptions = {}): [FloatDataPoint!]
"""
Profit & Loss (from the loan asset's price variation and interest) of the
borrow side of the position since its inception, in loan assets.
"""
borrowPnl(options: TimeseriesOptions = {}): [BigIntDataPoint!]
"""
Profit & Loss (from the loan asset's price variation and interest) of the
borrow side of the position since its inception, in USD for display purpose.
"""
borrowPnlUsd(options: TimeseriesOptions = {}): [FloatDataPoint!]
"""Return Over Equity history of the borrow side of the position."""
borrowRoe(options: TimeseriesOptions = {}): [FloatDataPoint!]
"""
Return Over Equity history of the borrow side of the position, taking into account the loan asset's price variation.
"""
borrowRoeUsd(options: TimeseriesOptions = {}): [FloatDataPoint!]
"""
Profit & Loss (from the collateral asset's price variation) of the collateral
of the position since its inception, in USD for display purpose.
"""
collateralPnlUsd(options: TimeseriesOptions = {}): [FloatDataPoint!]
"""
Return Over Equity history of the collateral of the position, taking into account the collateral asset's price variation.
"""
collateralRoeUsd(options: TimeseriesOptions = {}): [FloatDataPoint!]
"""
Profit & Loss (from the assets' price variation and loan interest) of the
margin of the position since its inception, in loan assets.
"""
marginPnl(options: TimeseriesOptions = {}): [BigIntDataPoint!]
"""
Profit & Loss (from the collateral asset's price variation and loan interest)
of the margin of the position since its inception, in USD for display purpose.
"""
marginPnlUsd(options: TimeseriesOptions = {}): [FloatDataPoint!]
"""Return Over Equity history of the margin of the position."""
marginRoe(options: TimeseriesOptions = {}): [FloatDataPoint!]
"""
Return Over Equity history of the margin of the position, taking into account prices variation.
"""
marginRoeUsd(options: TimeseriesOptions = {}): [FloatDataPoint!]
"""Collateral history."""
collateral(options: TimeseriesOptions = {}): [BigIntDataPoint!]
"""Collateral value history, in loan assets."""
collateralValue(options: TimeseriesOptions = {}): [BigIntDataPoint!]
"""Collateral value history, in USD."""
collateralUsd(options: TimeseriesOptions = {}): [FloatDataPoint!]
"""Supply assets history."""
supplyAssets(options: TimeseriesOptions = {}): [BigIntDataPoint!]
"""Supply assets history, in USD."""
supplyAssetsUsd(options: TimeseriesOptions = {}): [FloatDataPoint!]
"""Supply shares history."""
supplyShares(options: TimeseriesOptions = {}): [BigIntDataPoint!]
"""Borrow assets history."""
borrowAssets(options: TimeseriesOptions = {}): [BigIntDataPoint!]
"""Borrow assets history, in USD."""