-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathmorpho_ql_schema.txt
More file actions
3827 lines (2974 loc) · 97.1 KB
/
morpho_ql_schema.txt
File metadata and controls
3827 lines (2974 loc) · 97.1 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
"""
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
"""Chain"""
type Chain {
id: Int!
network: String!
currency: String!
}
type BigIntDataPoint {
x: Float!
y: BigInt
}
"""
The `BigInt` scalar type represents non-fractional signed whole numeric values.
"""
scalar BigInt
type FloatDataPoint {
x: Float!
y: Float
}
type IntDataPoint {
x: Float!
y: Int
}
type AddressDataPoint {
x: Float!
y: Address
}
"""42 character long hex address"""
scalar Address
"""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!]
}
input TimeseriesOptions {
"""Unix timestamp (Inclusive)."""
startTimestamp: Int
"""Unix timestamp (Inclusive)."""
endTimestamp: Int
"""
The timestamp interval to space and group points. Defaults to around 50 points between startTimestamp and endTimestamp.
"""
interval: TimeseriesInterval
}
enum TimeseriesInterval {
MINUTE @deprecated(reason: "HOUR is the minimum interval.")
FIVE_MINUTES @deprecated(reason: "HOUR is the minimum interval.")
FIFTEEN_MINUTES @deprecated(reason: "HOUR is the minimum interval.")
HALF_HOUR @deprecated(reason: "HOUR is the minimum interval.")
HOUR
DAY
WEEK
MONTH
QUARTER
YEAR
ALL @deprecated(reason: "Use startTimestamp and endTimestamp instead.")
}
"""Morpho Blue market state rewards"""
type MarketStateReward {
"""
Amount of reward tokens per year on the supply side. Scaled to reward asset decimals.
"""
yearlySupplyTokens: BigInt!
"""
Amount of reward tokens per year on the borrow side. Scaled to reward asset decimals.
"""
yearlyBorrowTokens: BigInt!
"""Supply rewards APY."""
supplyApy: Float @deprecated(reason: "Use `supplyApr` instead. This field will be removed in the future.")
"""Supply rewards APR."""
supplyApr: Float
"""Borrow rewards APY."""
borrowApy: Float @deprecated(reason: "Use `borrowApr` instead. This field will be removed in the future.")
"""Borrow rewards APR."""
borrowApr: Float
"""
Amount of reward tokens per supplied token (annualized). Scaled to reward asset decimals.
"""
amountPerSuppliedToken: BigInt!
"""
Amount of reward tokens per borrowed token (annualized). Scaled to reward asset decimals.
"""
amountPerBorrowedToken: BigInt!
asset: Asset!
}
"""Morpho Blue market state"""
type MarketState {
id: ID!
"""Block number of the state"""
blockNumber: BigInt
"""
Amount borrowed on the market, in underlying units. Amount increases as interests accrue.
"""
borrowAssets: BigInt!
"""
Amount supplied on the market, in underlying units. Amount increases as interests accrue.
"""
supplyAssets: BigInt!
"""Amount borrowed on the market, in USD for display purpose"""
borrowAssetsUsd: Float
"""Amount supplied on the market, in USD for display purpose"""
supplyAssetsUsd: Float
"""
Amount borrowed on the market, in market share units. Amount does not increase as interest accrue.
"""
borrowShares: BigInt!
"""
Amount supplied on the market, in market share units. Amount does not increase as interest accrue.
"""
supplyShares: BigInt!
"""Amount available to borrow on the market, in underlying units"""
liquidityAssets: BigInt!
"""Amount available to borrow on the market, in USD for display purpose"""
liquidityAssetsUsd: Float
"""Amount of collateral in the market, in underlying units"""
collateralAssets: BigInt
"""Amount of collateral in the market, in USD for display purpose"""
collateralAssetsUsd: Float
"""Utilization rate"""
utilization: Float!
"""Apy at target utilization"""
rateAtUTarget: Float! @deprecated(reason: "Use `apyAtTarget` instead")
"""Apy at target utilization"""
apyAtTarget: Float!
"""Rate at target utilization"""
rateAtTarget: BigInt
"""Instantaneous Supply APY"""
supplyApy: Float!
"""Instantaneous Borrow APY"""
borrowApy: Float!
"""Instantaneous Supply APY including rewards"""
netSupplyApy: Float
"""Instantaneous Borrow APY including rewards"""
netBorrowApy: Float
"""Fee rate"""
fee: Float!
"""Collateral price"""
price: BigInt
"""Variation of the collateral price over the last 24 hours"""
dailyPriceVariation: Float
"""Last update timestamp."""
timestamp: BigInt!
"""Market state rewards"""
rewards: [MarketStateReward!]
"""
Total size of the market. This is the sum of all assets that are allocated or can be reallocated to this market.
"""
size: BigInt!
"""
Total size of the market. This is the sum of all assets that are allocated or can be reallocated to this market, in USD for display purpose.
"""
sizeUsd: Float
"""Amount available to borrow on the market, including shared liquidity."""
totalLiquidity: BigInt!
"""
Amount available to borrow on the market, including shared liquidity, in USD for display purpose.
"""
totalLiquidityUsd: Float
"""
6h average supply APY excluding rewards (6h timeframe is subject to change).
"""
avgSupplyApy: Float
"""
6h average supply APY including rewards (6h timeframe is subject to change).
"""
avgNetSupplyApy: Float
"""
6h average borrow APY excluding rewards (6h timeframe is subject to change).
"""
avgBorrowApy: Float
"""
6h average borrow APY including rewards (6h timeframe is subject to change).
"""
avgNetBorrowApy: Float
"""Daily Supply APY excluding rewards"""
dailySupplyApy: Float
"""Daily Supply APY including rewards"""
dailyNetSupplyApy: Float
"""Daily Borrow APY excluding rewards"""
dailyBorrowApy: Float
"""Daily Borrow APY including rewards"""
dailyNetBorrowApy: Float
"""Weekly Supply APY excluding rewards"""
weeklySupplyApy: Float
"""Weekly Supply APY including rewards"""
weeklyNetSupplyApy: Float
"""Weekly Borrow APY excluding rewards"""
weeklyBorrowApy: Float
"""Weekly Borrow APY including rewards"""
weeklyNetBorrowApy: Float
"""Biweekly Supply APY excluding rewards"""
biweeklySupplyApy: Float
"""Biweekly Supply APY including rewards"""
biweeklyNetSupplyApy: Float
"""Biweekly Borrow APY excluding rewards"""
biweeklyBorrowApy: Float
"""Biweekly Borrow APY including rewards"""
biweeklyNetBorrowApy: Float
"""Monthly Supply APY excluding rewards"""
monthlySupplyApy: Float
"""Monthly Supply APY including rewards"""
monthlyNetSupplyApy: Float
"""Monthly Borrow APY excluding rewards"""
monthlyBorrowApy: Float
"""Monthly Borrow APY including rewards"""
monthlyNetBorrowApy: Float
"""Quarterly Supply APY excluding rewards"""
quarterlySupplyApy: Float
"""Quarterly Supply APY including rewards"""
quarterlyNetSupplyApy: Float
"""Quarterly Borrow APY excluding rewards"""
quarterlyBorrowApy: Float
"""Quarterly Borrow APY including rewards"""
quarterlyNetBorrowApy: Float
"""Yearly Supply APY excluding rewards"""
yearlySupplyApy: Float
"""Yearly Supply APY including rewards"""
yearlyNetSupplyApy: Float
"""Yearly Borrow APY excluding rewards"""
yearlyBorrowApy: Float
"""Yearly Borrow APY including rewards"""
yearlyNetBorrowApy: Float
"""All Time Supply APY excluding rewards"""
allTimeSupplyApy: Float
"""All Time Supply APY including rewards"""
allTimeNetSupplyApy: Float
"""All Time Borrow APY excluding rewards"""
allTimeBorrowApy: Float
"""All Time Borrow APY including rewards"""
allTimeNetBorrowApy: Float
}
"""Morpho Blue state history"""
type MorphoBlueStateHistory {
"""Amount of collateral in all markets, in USD for display purpose."""
totalCollateralUsd(options: TimeseriesOptions = {}): [FloatDataPoint!]
"""Amount supplied in all markets, in USD for display purpose"""
totalSupplyUsd(options: TimeseriesOptions = {}): [FloatDataPoint!]
"""Amount deposited in all markets, in USD for display purpose"""
totalDepositUsd(options: TimeseriesOptions = {}): [FloatDataPoint!]
"""Amount borrowed in all markets, in USD for display purpose"""
totalBorrowUsd(options: TimeseriesOptions = {}): [FloatDataPoint!]
"""TVL (collateral + supply - borrows), in USD for display purpose"""
tvlUsd(options: TimeseriesOptions = {}): [FloatDataPoint!]
"""Number of unique users that have interacted with the protocol"""
userCount(options: TimeseriesOptions = {}): [IntDataPoint!]
"""Number of markets in the protocol"""
marketCount(options: TimeseriesOptions = {}): [IntDataPoint!]
"""Number of meta morpho vaults in the protocol"""
vaultCount(options: TimeseriesOptions = {}): [IntDataPoint!]
}
"""Morpho Blue global state"""
type MorphoBlueState {
id: ID!
"""Last update timestamp."""
timestamp: BigInt!
"""Amount of collateral in all markets, in USD for display purpose"""
totalCollateralUsd: Float!
"""Amount supplied in all markets, in USD for display purpose"""
totalSupplyUsd: Float!
"""Amount deposited in all markets, in USD for display purpose"""
totalDepositUsd: Float!
"""Amount borrowed in all markets, in USD for display purpose"""
totalBorrowUsd: Float!
"""TVL (collateral + supply - borrows), in USD for display purpose"""
tvlUsd: Float!
"""Number of unique users that have interacted with the protocol"""
userCount: Int!
"""Number of markets in the protocol"""
marketCount: Int!
"""Number of meta morpho vaults in the protocol"""
vaultCount: Int!
}
"""Morpho Blue deployment"""
type MorphoBlue {
id: ID!
address: Address!
creationBlockNumber: Int!
chain: Chain!
"""Current state"""
state: MorphoBlueState
"""State history"""
historicalState: MorphoBlueStateHistory
}
"""Oracle Feed"""
type OracleFeed {
id: ID!
"""Feed contract address"""
address: Address!
description: String
vendor: String
pair: [String!]
decimals: Int
chain: Chain!
historicalPrice(options: TimeseriesOptions! = {}): [BigIntDataPoint!]
price: BigIntDataPoint
}
"""Oracle Vault"""
type OracleVault {
id: ID!
"""Vault contract address"""
address: Address!
chain: Chain!
assetId: String
metamorphoId: String
vendor: String
pair: [String!]
decimals: Int
price: BigIntDataPoint
historicalPrice(options: TimeseriesOptions! = {}): [BigIntDataPoint!]
}
"""Oracle creation tx"""
type ChainlinkOracleV2Event {
txHash: HexString!
timestamp: BigInt!
blockNumber: BigInt!
chainId: Int!
"""Transaction caller address"""
caller: Address!
}
"""Hexadecimal string"""
scalar HexString
"""Oracle"""
type Oracle {
id: ID!
"""Oracle contract address"""
address: Address!
"""Oracle type"""
type: OracleType!
data: OracleData
chain: Chain!
markets: [Market!]!
creationEvent: ChainlinkOracleV2Event
}
enum OracleType {
ChainlinkOracle
ChainlinkOracleV2
CustomOracle
Unknown
}
union OracleData = MorphoChainlinkOracleData | MorphoChainlinkOracleV2Data
"""Morpho chainlink oracle data"""
type MorphoChainlinkOracleData {
baseFeedOne: OracleFeed
baseFeedTwo: OracleFeed
quoteFeedOne: OracleFeed
quoteFeedTwo: OracleFeed
scaleFactor: BigInt!
vault: String! @deprecated(reason: "Use `baseOracleVault` instead")
chainId: Int!
baseOracleVault: OracleVault
vaultConversionSample: BigInt!
}
"""Morpho chainlink oracle v2 data"""
type MorphoChainlinkOracleV2Data {
baseFeedOne: OracleFeed
baseFeedTwo: OracleFeed
quoteFeedOne: OracleFeed
quoteFeedTwo: OracleFeed
scaleFactor: BigInt!
baseVault: String! @deprecated(reason: "Use `baseOracleVault` instead")
baseOracleVault: OracleVault
quoteOracleVault: OracleVault
quoteVault: String! @deprecated(reason: "Use `quoteOracleVault` instead")
chainId: Int!
baseVaultConversionSample: BigInt!
quoteVaultConversionSample: BigInt!
}
"""Public allocator flow caps"""
type PublicAllocatorFlowCaps {
"""Public allocator flow cap in USD"""
maxIn: BigInt!
"""Public allocator flow cap in underlying"""
maxOut: BigInt!
market: Market!
}
"""Public allocator configuration"""
type PublicAllocatorConfig {
fee: BigInt!
accruedFee: BigInt!
admin: Address!
flowCaps: [PublicAllocatorFlowCaps!]!
}
"""Public allocator"""
type PublicAllocator {
id: ID!
address: Address!
creationBlockNumber: Int!
morphoBlue: MorphoBlue!
}
"""Public alllocator shared liquidity"""
type PublicAllocatorSharedLiquidity {
id: ID!
assets: BigInt!
market: Market!
vault: Vault!
publicAllocator: PublicAllocator!
allocationMarket: Market!
}
"""Risk analysis"""
type RiskAnalysis {
provider: RiskProvider!
analysis: RiskAnalysisData!
score: Float! @deprecated(reason: "Use `analysis.score` instead")
rating: String @deprecated(reason: "Use `analysis.rating` instead")
isUnderReview: Boolean! @deprecated(reason: "Use `analysis.isUnderReview` instead")
timestamp: Float! @deprecated(reason: "Use `analysis.timestamp` instead")
}
enum RiskProvider {
CREDORA
BLOCKAID
}
union RiskAnalysisData = CredoraRiskAnalysis
"""Credora risk analysis"""
type CredoraRiskAnalysis {
score: Float!
rating: String
isUnderReview: Boolean!
timestamp: Float!
}
"""Custom Warning Metadata"""
type CustomMetadata {
content: String
}
"""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.")
}
"""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
}
"""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!
}
"""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 oracle information"""
type MarketOracleInfo {
type: OracleType!
}
"""Market warning"""
type MarketWarning {
type: String!
level: WarningLevel!
metadata: MarketWarningMetadata
}
enum WarningLevel {
YELLOW
RED
}
union MarketWarningMetadata = HardcodedPriceMetadata | CustomMetadata
"""Hardcoded Price Metadata"""
type HardcodedPriceMetadata {
symbolFrom: String
symbolTo: String
}
"""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
}
"""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!]
}
"""66 character long hexadecimal market ID"""
scalar MarketId
"""MetaMorpho Vault Factories"""
type VaultFactory {
id: ID!
address: Address!
creationBlockNumber: Int!
chain: Chain!
}
"""MetaMorpho vault allocation"""
type VaultAllocation {
id: ID!
"""Block number in which the allocation was computed"""
blockNumber: BigInt
"""Amount of asset supplied on market, in market underlying token units"""
supplyAssets: BigInt!
"""Amount of asset supplied on market, in USD for display purpose."""
supplyAssetsUsd: Float
"""Amount of supplied shares on market."""
supplyShares: BigInt!
"""
Maximum amount of asset that can be supplied on market by the vault, in market underlying token units
"""
supplyCap: BigInt!
"""
Maximum amount of asset that can be supplied on market by the vault, in USD for display purpose.
"""
supplyCapUsd: Float
"""
Pending maximum amount of asset that can be supplied on market by the vault, in market underlying token units
"""
pendingSupplyCap: BigInt
"""Pending supply cap apply timestamp"""
pendingSupplyCapValidAt: BigInt
"""
Pending maximum amount of asset that can be supplied on market by the vault, in USD for display purpose.
"""
pendingSupplyCapUsd: Float
"""Supply queue index"""
supplyQueueIndex: Int
"""Withdraw queue index"""
withdrawQueueIndex: Int
enabled: Boolean!
removableAt: BigInt!
market: Market!
}
"""MetaMorpho vault state rewards"""
type VaultStateReward {
"""
Amount of reward tokens distributed to MetaMorpho vault suppliers (annualized). Scaled to reward asset decimals.
"""
yearlySupplyTokens: BigInt!
"""Rewards APR."""
supplyApr: Float
"""
Amount of reward tokens earned per supplied token (annualized). Scaled to reward asset decimals.
"""
amountPerSuppliedToken: BigInt!
asset: Asset!
}
type PageInfo {
"""Total number of items"""
countTotal: Int!
"""Number of items as scoped by pagination."""
count: Int!
"""Number of items requested."""
limit: Int!
"""Number of items skipped."""
skip: Int!
}
type AddressMetadata {
type: AddressMetadataType!
metadata: Metadata!
}
enum AddressMetadataType {
safe
risk
aragon
}
union Metadata = SafeAddressMetadata | AddressRiskMetadata | AragonAddressMetadata
"""Safe address metadata"""
type SafeAddressMetadata {
owners: [String!]!
threshold: Int!
}
"""Risk address metadata"""
type AddressRiskMetadata {
risk: String!
riskReason: String
isAuthorized: Boolean!
}
"""Aragon address metadata"""
type AragonAddressMetadata {
ensDomain: String
name: String
description: String
}
type PaginatedAddressMetadata {
items: [AddressMetadata!]
pageInfo: PageInfo
}
"""Curator Address"""