@aave/graphql 0.11.1 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -109,6 +109,23 @@ input BorrowErc20AmountInput {
109
109
  value: BigDecimal!
110
110
  }
111
111
 
112
+ type BorrowPointsIncentive {
113
+ id: RewardId!
114
+ program: PointsProgram!
115
+ name: String!
116
+ startDate: DateTime!
117
+ endDate: DateTime
118
+ multiplier: Float!
119
+ criteria: [IncentiveCriteria!]
120
+ userEligible: Boolean!
121
+ kind: PointsProgramKind!
122
+ dailyPoints: Float
123
+ pointsPerThousandUsd: Float
124
+ description: String
125
+ customMessage: String
126
+ customForumLink: String
127
+ }
128
+
112
129
  input BorrowRequest {
113
130
  """The market pool address"""
114
131
  market: EvmAddress!
@@ -153,6 +170,11 @@ type ClaimableMeritReward {
153
170
  amount: TokenAmount!
154
171
  }
155
172
 
173
+ type ClaimableReward {
174
+ currency: Currency!
175
+ amount: TokenAmount!
176
+ }
177
+
156
178
  input CollateralToggleRequest {
157
179
  """The pool address for the market"""
158
180
  market: EvmAddress!
@@ -258,7 +280,7 @@ type EmodeMarketCategory {
258
280
  """The liquidation penalty applied in efficiency mode"""
259
281
  liquidationPenalty: PercentValue!
260
282
 
261
- """Whether this eMode category is isolated in v3.7+"""
283
+ """Whether this eMode category is isolated in Aave v3.7+"""
262
284
  isolated: Boolean!
263
285
 
264
286
  """The list of reserves which will tailor for this eMode"""
@@ -387,6 +409,16 @@ type HealthFactorPreviewResponse {
387
409
  after: BigDecimal
388
410
  }
389
411
 
412
+ """
413
+ Display metadata for a single eligibility rule on an owned Merkl incentive.
414
+ \`userPassed\` is false when no user context was supplied.
415
+ """
416
+ type IncentiveCriteria {
417
+ id: ID!
418
+ text: String!
419
+ userPassed: Boolean!
420
+ }
421
+
390
422
  """
391
423
  Indicates the user does not have enough balance to perform the operation.
392
424
  """
@@ -637,6 +669,12 @@ type MeritBorrowAndSupplyIncentiveCondition {
637
669
 
638
670
  """Where you can go and claim the incentives"""
639
671
  claimLink: URL!
672
+ actionKey: String
673
+ rewardTokenAddress: String
674
+ rewardTokenSymbol: String
675
+ customMessage: String
676
+ customForumLink: String
677
+ selfApr: PercentValue
640
678
  }
641
679
 
642
680
  type MeritBorrowIncentive {
@@ -645,6 +683,27 @@ type MeritBorrowIncentive {
645
683
 
646
684
  """Where you can go and claim the incentives"""
647
685
  claimLink: URL!
686
+ actionKey: String
687
+ rewardTokenAddress: String
688
+ rewardTokenSymbol: String
689
+ customMessage: String
690
+ customForumLink: String
691
+ selfApr: PercentValue
692
+ }
693
+
694
+ type MeritSavingsGhoIncentive {
695
+ """
696
+ APR earned for depositing GHO into Savings GHO via the AAVE Merit program
697
+ """
698
+ apr: PercentValue!
699
+
700
+ """Where you can go and claim the incentives"""
701
+ claimLink: URL!
702
+ actionKey: String
703
+ rewardTokenAddress: String
704
+ rewardTokenSymbol: String
705
+ customMessage: String
706
+ customForumLink: String
648
707
  }
649
708
 
650
709
  type MeritSupplyIncentive {
@@ -653,6 +712,101 @@ type MeritSupplyIncentive {
653
712
 
654
713
  """Where you can go and claim the incentives"""
655
714
  claimLink: URL!
715
+
716
+ """
717
+ aavechan/Merit action slug (e.g. "ethereum-sgho"). Admin-set through
718
+ the Slack bot; used as join key between the DB row and the live
719
+ aavechan APR cache.
720
+ """
721
+ actionKey: String
722
+
723
+ """
724
+ Reward token paid out by the campaign (often an aToken like
725
+ aEthUSDC). Distinct from \`claim_link\`, which is just the landing page.
726
+ """
727
+ rewardTokenAddress: String
728
+ rewardTokenSymbol: String
729
+
730
+ """Anti-loop eligibility warning or other tooltip copy."""
731
+ customMessage: String
732
+
733
+ """Governance forum link with full campaign details."""
734
+ customForumLink: String
735
+
736
+ """
737
+ Extra APR when a parallel "self" campaign is running for this action
738
+ (sGHO / Safety Module lock). Populated from the \`self-{action_key}\`
739
+ row in the aavechan response. Null when disabled.
740
+ """
741
+ selfApr: PercentValue
742
+ }
743
+
744
+ """Borrow-side incentive funded by an Aave-owned Merkl campaign."""
745
+ type MerklBorrowIncentive {
746
+ id: RewardId!
747
+ startDate: DateTime!
748
+ endDate: DateTime!
749
+
750
+ """
751
+ Borrow APR discount sourced live from Merkl. The user effectively
752
+ pays \`borrow_apr - borrow_apr_discount\`. Naming aligned with
753
+ \`AaveBorrowIncentive.borrow_apr_discount\` and
754
+ \`MeritBorrowIncentive.borrow_apr_discount\`.
755
+ """
756
+ borrowAprDiscount: PercentValue!
757
+ payoutToken: Currency!
758
+ criteria: [IncentiveCriteria!]!
759
+ userEligible: Boolean!
760
+ description: String
761
+ customMessage: String
762
+ customForumLink: String
763
+ customClaimMessage: String
764
+ }
765
+
766
+ """Supply-side incentive funded by an Aave-owned Merkl campaign."""
767
+ type MerklSupplyIncentive {
768
+ id: RewardId!
769
+ startDate: DateTime!
770
+ endDate: DateTime!
771
+
772
+ """
773
+ Extra APR for suppliers in this reserve, sourced live from Merkl.
774
+ The interface converts APR \u2192 APY for display, matching how it
775
+ renders \`AaveSupplyIncentive.extra_supply_apr\` and
776
+ \`MeritSupplyIncentive.extra_supply_apr\`.
777
+ """
778
+ extraSupplyApr: PercentValue!
779
+
780
+ """The token the campaign pays out in."""
781
+ payoutToken: Currency!
782
+ criteria: [IncentiveCriteria!]!
783
+
784
+ """
785
+ Whether the user (if passed to \`incentives(user:)\`) meets the required
786
+ criteria. False when no user is provided and rules exist.
787
+ """
788
+ userEligible: Boolean!
789
+
790
+ """
791
+ Short tooltip copy for the campaign. Seeded from admin input or the
792
+ aavechan override table for legacy third-party campaigns.
793
+ """
794
+ description: String
795
+
796
+ """
797
+ Eligibility conditions tooltip copy (anti-loop warnings, whitelist
798
+ requirements, etc.).
799
+ """
800
+ customMessage: String
801
+
802
+ """Governance forum link with full campaign details."""
803
+ customForumLink: String
804
+
805
+ """
806
+ Merkl-specific call-to-action copy shown next to the claim button
807
+ (e.g. "Rewards will be claimable starting in early August.").
808
+ """
809
+ customClaimMessage: String
656
810
  }
657
811
 
658
812
  type MessageData {
@@ -782,6 +936,33 @@ type PermitTypedDataResponse {
782
936
  message: MessageData!
783
937
  }
784
938
 
939
+ type PointsProgram {
940
+ id: RewardId!
941
+ name: String!
942
+ externalUrl: String
943
+ iconUrl: String
944
+ }
945
+
946
+ """
947
+ Kind of POINTS program. Discriminates between Merkl-backed campaigns (which
948
+ expose live \`daily_points\` / \`points_per_thousand_usd\`) and loyalty
949
+ multiplier programs (which only carry a fixed multiplier). Lets clients
950
+ branch on shape without inspecting whether \`daily_points\` is null.
951
+ """
952
+ enum PointsProgramKind {
953
+ """
954
+ Merkl-backed campaign. \`daily_points\` and \`points_per_thousand_usd\`
955
+ are populated when the live feed has data.
956
+ """
957
+ CAMPAIGN
958
+
959
+ """
960
+ Loyalty multiplier program (Ethena, Ether.fi, etc.). Fixed multiplier,
961
+ no daily points.
962
+ """
963
+ LOYALTY
964
+ }
965
+
785
966
  input PreviewAction @oneOf {
786
967
  supply: SupplyRequest
787
968
  borrow: BorrowRequest
@@ -963,9 +1144,19 @@ type Query {
963
1144
  forkTopUp(request: ForkTopUpRequest!): ForkTopUpResponse!
964
1145
 
965
1146
  """
966
- The user merits reward information and transaction if you wish to claim
1147
+ Legacy alias \u2014 returns the same data as \`userRewards\` but without the
1148
+ \`rewardIds\` filter. Kept for backwards compatibility with existing
1149
+ clients; new clients should use \`userRewards\`.
1150
+ """
1151
+ userMeritRewards(request: UserMeritRewardsRequest!): UserMeritRewards @deprecated(reason: "Use \`userRewards\` instead. This alias will be removed in a future release.")
1152
+
1153
+ """
1154
+ The user's Merkl-claimable rewards on a chain, plus the claim
1155
+ transaction. Canonical replacement for \`userMeritRewards\` \u2014 same
1156
+ underlying data source, with an added \`rewardIds\` filter for
1157
+ program-specific claims.
967
1158
  """
968
- userMeritRewards(request: UserMeritRewardsRequest!): UserMeritRewards
1159
+ userRewards(request: UserRewardsRequest!): UserRewards
969
1160
 
970
1161
  """
971
1162
  Users saving GHO balance - note rewards are not paid out live onchain they paid out with the merit schema,
@@ -978,6 +1169,41 @@ type Query {
978
1169
 
979
1170
  """Withdraw sGHO (savings GHO) back to GHO"""
980
1171
  savingsGhoWithdraw(request: SavingsGhoWithdrawRequest!): ExecutionPlan!
1172
+
1173
+ """
1174
+ Merit APR incentive for depositing GHO into Savings GHO.
1175
+ Returns null when no active savings GHO incentive campaign is running.
1176
+ """
1177
+ savingsGhoIncentive(chainId: ChainId): MeritSavingsGhoIncentive
1178
+
1179
+ """Build a transaction to deposit GHO into the sGHO ERC-4626 vault."""
1180
+ sghoVaultDeposit(request: SghoVaultDepositRequest!): ExecutionPlan!
1181
+
1182
+ """
1183
+ Build a transaction to redeem sGHO shares for GHO from the ERC-4626 vault.
1184
+ """
1185
+ sghoVaultRedeemShares(request: SghoVaultRedeemSharesRequest!): ExecutionPlan!
1186
+
1187
+ """
1188
+ Returns the current state of the sGHO ERC-4626 vault, including rates, totals, and
1189
+ optionally the connected user's position.
1190
+ """
1191
+ sghoVault(request: SghoVaultRequest!): SghoVault!
1192
+
1193
+ """
1194
+ Returns the number of sGHO shares that would be minted for a given GHO deposit amount.
1195
+ """
1196
+ sghoVaultPreviewDeposit(request: SghoVaultPreviewRequest!): DecimalValue!
1197
+
1198
+ """
1199
+ Returns the amount of GHO that would be received for redeeming a given number of sGHO shares.
1200
+ """
1201
+ sghoVaultPreviewRedeem(request: SghoVaultPreviewRequest!): DecimalValue!
1202
+
1203
+ """
1204
+ Build a transaction to migrate the user's full stkGHO position into the sGHO ERC-4626 vault.
1205
+ """
1206
+ stkGhoMigrate(request: StkGhoMigrateRequest!): ExecutionPlan!
981
1207
  }
982
1208
 
983
1209
  input RepayAmountInput @oneOf {
@@ -1093,9 +1319,15 @@ type Reserve {
1093
1319
  permitSupported: Boolean!
1094
1320
 
1095
1321
  """
1096
- This exposes the extra incentives you can earn from third parties (Merit) or from
1097
- incentives set by governance through the RewardsController.
1098
- Note Aave Labs does not guarantee third party program and accepts no liability to those
1322
+ Extra incentives for this reserve \u2014 covers three sources:
1323
+
1324
+ - Legacy Merit program (ACI-owned, on-chain RewardsController).
1325
+ - Aave native incentives (governance-owned, on-chain RewardsController).
1326
+ - Aave-owned Merkl reward campaigns (managed via the \`/rewards/*\` Slack
1327
+ bot; linked to Merkl off-chain).
1328
+
1329
+ When the surrounding \`Reserve\` query carries a user, eligibility for
1330
+ the owned Merkl variants is evaluated against that user's V3 positions.
1099
1331
  """
1100
1332
  incentives: [ReserveIncentive!]!
1101
1333
 
@@ -1169,7 +1401,7 @@ enum ReserveBorrowingState {
1169
1401
  USER_EMODE_DISABLED_BORROW
1170
1402
  }
1171
1403
 
1172
- union ReserveIncentive = MeritSupplyIncentive | MeritBorrowIncentive | MeritBorrowAndSupplyIncentiveCondition | AaveSupplyIncentive | AaveBorrowIncentive
1404
+ union ReserveIncentive = MeritSupplyIncentive | MeritBorrowIncentive | MeritBorrowAndSupplyIncentiveCondition | AaveSupplyIncentive | AaveBorrowIncentive | MerklSupplyIncentive | MerklBorrowIncentive | SupplyPointsIncentive | BorrowPointsIncentive
1173
1405
 
1174
1406
  type ReserveInfo {
1175
1407
  """The market information the reserve is under"""
@@ -1281,6 +1513,8 @@ type ReserveUserState {
1281
1513
  isInIsolationMode: Boolean! @deprecated(reason: "Deprecated in v3.7+: use the selected eMode category's \`isolated\` flag instead")
1282
1514
  }
1283
1515
 
1516
+ scalar RewardId
1517
+
1284
1518
  input SavingsGhoBalanceRequest {
1285
1519
  """The user to query the savings GHO balance"""
1286
1520
  user: EvmAddress!
@@ -1339,8 +1573,123 @@ input SayingsGhoDepositAmountInput {
1339
1573
  permitSig: ERC712Signature
1340
1574
  }
1341
1575
 
1576
+ type SghoUserPosition {
1577
+ """The user's sGHO shares balance"""
1578
+ shares: TokenAmount!
1579
+
1580
+ """GHO value of the shares at the current yield index (convertToAssets)"""
1581
+ balance: TokenAmount!
1582
+
1583
+ """
1584
+ Maximum GHO the user can deposit: min(wallet GHO balance, remaining supply cap); 0 when paused
1585
+ """
1586
+ maxDeposit: TokenAmount!
1587
+
1588
+ """Maximum GHO that can be withdrawn"""
1589
+ maxWithdraw: TokenAmount!
1590
+
1591
+ """User's GHO wallet balance (the underlying token they can deposit)"""
1592
+ underlyingBalance: TokenAmount!
1593
+ }
1594
+
1595
+ type SghoVault {
1596
+ """Total GHO locked in the vault"""
1597
+ totalAssets: TokenAmount!
1598
+
1599
+ """Total sGHO shares outstanding"""
1600
+ totalSupply: DecimalValue!
1601
+
1602
+ """Maximum GHO that can be deposited"""
1603
+ supplyCap: TokenAmount!
1604
+
1605
+ """Target yield APR in basis points (e.g. 500 = 5%)"""
1606
+ targetRate: PercentValue!
1607
+
1608
+ """
1609
+ Whether the vault is currently paused (deposits and withdrawals are blocked)
1610
+ """
1611
+ paused: Boolean!
1612
+
1613
+ """User position \u2014 present only when \`user\` is provided in the request"""
1614
+ user: SghoUserPosition
1615
+ }
1616
+
1617
+ input SghoVaultDepositAmountInput {
1618
+ """The amount of GHO to deposit."""
1619
+ value: BigDecimal!
1620
+
1621
+ """
1622
+ Optional ERC20 permit signature to avoid a separate approval transaction.
1623
+ """
1624
+ permitSig: ERC712Signature
1625
+ }
1626
+
1627
+ input SghoVaultDepositRequest {
1628
+ """The amount of GHO to deposit."""
1629
+ amount: SghoVaultDepositAmountInput!
1630
+
1631
+ """The user depositing GHO."""
1632
+ depositor: EvmAddress!
1633
+
1634
+ """The address to receive sGHO shares \u2014 defaults to \`depositor\`."""
1635
+ sharesRecipient: EvmAddress
1636
+
1637
+ """The chain id"""
1638
+ chainId: ChainId!
1639
+ }
1640
+
1641
+ input SghoVaultPreviewRequest {
1642
+ """The amount in human-readable form"""
1643
+ amount: BigDecimal!
1644
+
1645
+ """The chain id"""
1646
+ chainId: ChainId!
1647
+ }
1648
+
1649
+ input SghoVaultRedeemSharesAmount @oneOf {
1650
+ """Redeem all sGHO shares for GHO."""
1651
+ maxRedeem: AlwaysTrue
1652
+
1653
+ """Redeem an exact number of sGHO shares for GHO."""
1654
+ shares: BigDecimal
1655
+ }
1656
+
1657
+ input SghoVaultRedeemSharesRequest {
1658
+ """The redeem amount \u2014 redeem all shares or an exact share count."""
1659
+ amount: SghoVaultRedeemSharesAmount!
1660
+
1661
+ """
1662
+ The address whose sGHO shares will be burned (normally the caller's own wallet).
1663
+ """
1664
+ sharesOwner: EvmAddress!
1665
+
1666
+ """The address to receive GHO \u2014 defaults to \`shares_owner\`."""
1667
+ recipient: EvmAddress
1668
+
1669
+ """The chain id"""
1670
+ chainId: ChainId!
1671
+ }
1672
+
1673
+ input SghoVaultRequest {
1674
+ """
1675
+ Optional user address to include position data (shares balance, max deposit/withdraw)
1676
+ """
1677
+ user: EvmAddress
1678
+
1679
+ """The chain id"""
1680
+ chainId: ChainId!
1681
+ }
1682
+
1342
1683
  scalar Signature
1343
1684
 
1685
+ input StkGhoMigrateRequest {
1686
+ """The user migrating their full stkGHO position to sGHO."""
1687
+ user: EvmAddress!
1688
+
1689
+ """The chain id."""
1690
+ chainId: ChainId!
1691
+ }
1692
+
1344
1693
  input SupplyAPYHistoryRequest {
1345
1694
  """The market pool address"""
1346
1695
  market: EvmAddress!
@@ -1355,6 +1704,42 @@ input SupplyAPYHistoryRequest {
1355
1704
  chainId: ChainId!
1356
1705
  }
1357
1706
 
1707
+ type SupplyPointsIncentive {
1708
+ id: RewardId!
1709
+ program: PointsProgram!
1710
+ name: String!
1711
+ startDate: DateTime!
1712
+ endDate: DateTime
1713
+ multiplier: Float!
1714
+ criteria: [IncentiveCriteria!]
1715
+ userEligible: Boolean!
1716
+
1717
+ """
1718
+ \`Campaign\` for Merkl-backed programs; \`Loyalty\` for fixed-multiplier
1719
+ partner programs (Ethena, Ether.fi). Clients gate UI on this rather
1720
+ than checking whether \`daily_points\` is null.
1721
+ """
1722
+ kind: PointsProgramKind!
1723
+
1724
+ """
1725
+ Daily points emitted across the entire reserve, surfaced from the
1726
+ Merkl campaign's \`rewardsRecord.breakdowns[].value\`. Used by the V3
1727
+ interface to render "X points / $1K / day" next to the reserve.
1728
+ Always null for \`kind = Loyalty\`.
1729
+ """
1730
+ dailyPoints: Float
1731
+
1732
+ """
1733
+ Daily points normalized per $1K of TVL: \`daily_points / tvl * 1000\`.
1734
+ Computed server-side so the interface does not have to fetch TVL.
1735
+ Always null for \`kind = Loyalty\`.
1736
+ """
1737
+ pointsPerThousandUsd: Float
1738
+ description: String
1739
+ customMessage: String
1740
+ customForumLink: String
1741
+ }
1742
+
1358
1743
  input SupplyRequest {
1359
1744
  """The market pool address"""
1360
1745
  market: EvmAddress!
@@ -1564,6 +1949,36 @@ type UserRepayTransaction {
1564
1949
  timestamp: DateTime!
1565
1950
  }
1566
1951
 
1952
+ """
1953
+ Canonical shape for a user's Merkl-claimable rewards on a single chain,
1954
+ together with the transaction to send to the Merkl distributor. Same shape
1955
+ as \`UserMeritRewards\` \u2014 that type stays around for the deprecated alias.
1956
+ """
1957
+ type UserRewards {
1958
+ chain: ChainId!
1959
+ claimable: [ClaimableReward!]!
1960
+ transaction: TransactionRequest!
1961
+ }
1962
+
1963
+ input UserRewardsFilter {
1964
+ """If set, only these tokens' rewards are included in the claim."""
1965
+ tokens: [EvmAddress!]
1966
+
1967
+ """
1968
+ If set, the claim is scoped to tokens where at least one of these
1969
+ Aave-owned reward program IDs has contributed on Merkl. When absent,
1970
+ the claim covers all Merkl-claimable rewards for the user on this chain
1971
+ regardless of source (legacy Merit, Aave-owned, third-party).
1972
+ """
1973
+ rewardIds: [RewardId!]
1974
+ }
1975
+
1976
+ input UserRewardsRequest {
1977
+ user: EvmAddress!
1978
+ chainId: ChainId!
1979
+ filter: UserRewardsFilter
1980
+ }
1981
+
1567
1982
  input UserSetEmodeRequest {
1568
1983
  """The pool address for the market"""
1569
1984
  market: EvmAddress!