Savings GHO (sGHO) 🟡

Savings GHO (sGHO) is the Aave Protocol's native savings mechanism for the GHO stablecoin, deployedarrow-up-right on Ethereum mainnet. sGHO allows GHO holders to supply their tokens to a smart contract and receive sGHO that accumulates rewards paid in GHO. This mechanism has no cooldowns to redeem sGHO for GHO, no slashing risk, and no rehypothecation of supplied funds. All rewards for sGHO holders are distributed through the Merit programarrow-up-right.

Deposit

To start earning rewards by depositing GHO into sGHO, follow these steps.

First, prepare the execution plan for the deposit operation.

  • React

  • TypeScript

  • GraphQL

Use the useSavingsGhoDeposit hook to create the execution plan for depositing GHO to sGHO.

Deposit GHO

import { useWalletClient } from "wagmi";import { useSavingsGhoDeposit, bigDecimal, evmAddress } from "@aave/react";
// …
const { data: walletClient } = useWalletClient();
const [deposit, depositing] = useSavingsGhoDeposit();
const execute = async () => {  const result = await deposit({    amount: {      value: bigDecimal(1000), // 1000 GHO    },    depositor: evmAddress(walletClient!.account.address),  });
  // …};

2. Process the Execution Plan

Then, handle the execution plan.

  • React

  • TypeScript

  • GraphQL

Use the useSendTransaction hook for the wallet library of your choicearrow-up-right to send the transactions in the execution plan.

Viem

Balance

Retrieve the balance of a user's sGHO.

  • React

  • TypeScript

  • GraphQL

Use the useSavingsGhoBalance hook to fetch the balance of a user's sGHO.

  • Loading State

  • React Suspense

Fetch the balance of a user's sGHO.

sGHO Balance

Withdraw

Withdraw sGHO to GHO instantly with no cooldown period. You can still claim any previous rewards.

Follow these steps to withdraw sGHO to GHO:

1. Prepare the Execution Plan

First, prepare the execution plan for the withdrawal operation.

  • React

  • TypeScript

  • GraphQL

Use the useSavingsGhoWithdraw hook to create the execution plan for withdrawing sGHO to GHO.

Withdraw GHO

2. Process the Execution Plan

Finally, handle the execution plan.

  • React

  • TypeScript

  • GraphQL

Use the useSendTransaction hook for the wallet library of your choicearrow-up-right to send the transaction.

Viem


Claiming Incentives

Users who deposit into sGHO become eligible for rewards distributed through Merklarrow-up-right.

These rewards are not automatically added to the sGHO balance, they must be claimed separately.

Users can claim rewards in two ways:

Follow these steps to claim rewards using the SDK:

1. Fetch the Claimable Rewards

First, determine if a user has claimable rewards.

  • React

  • TypeScript

  • GraphQL

Use the useUserMeritRewards hook to fetch the user's sGHO claimable rewards and the transaction to claim them.

  • Loading State

  • React Suspense

Fetch the user's claimable rewards and the transaction to claim them.

sGHO Rewards

If data is null, the user has no sGHO claimable rewards.

2. Claim Rewards

Finally, if the user has claimable rewards, they can claim them by sending the transaction.

  • React

  • TypeScript

  • GraphQL

Use the useSendTransaction hook for the wallet library of your choicearrow-up-right to send the transactions in the execution plan.

Viem

For more details, see the GHO Savings Upgrade forum postarrow-up-right.

Last updated