
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
aave-v3-react
Advanced tools
A collection of React hooks to interact with the Aave V3 pools and smart contracts.

aave-v3-react is a React SDK that makes creating a dApp on top of the Aave Protocol V3 feeling like a breeze. We offer a full suite of hooks and providers integrated with wagmi and viem to make devs life easier.
After having setting up a react project with vite or next.js
install the required packages using your favourite package manager:
npm install aave-v3-react @tanstack/react-query wagmi viem@2.x connectkit @tanstack/react-query-devtools
or
yarn add aave-v3-react @tanstack/react-query wagmi viem@2.x connectkit @tanstack/react-query-devtools
aave-v3-react depends on @tanstack/react-query, wagmi and viem. If any of those packages is missing or installed with an unsupported version, it's possible you experience errors like:
useQuery must be used with QueryClientProvider;useChain must be used with Wagmiprovider;If this is the case, please double check the version of the packages before opening an issue.
if you have installed all the packages above, you can spin up your project quickly with the following structure:
my-project/
│
├── src/
│ ├── App.tsx
| |── wagmiConfig.ts
│ └── main.tsx
│
└── package.json
wagmiConfig.ts
import { supportedNetworks } from "aave-v3-react";
import { getDefaultConfig } from "connectkit";
import { createConfig, http } from "wagmi";
import { Chain } from "wagmi/chains";
/**
* his config allows wagmi to support all the networks supported by aave-v3-react, feel free to
* change it according to your needs
*/
export const config = createConfig(
getDefaultConfig({
appName: "Vite/AAVE react sdk sample app",
walletConnectProjectId: "PROJECT_ID",
// TODO: IS there a better type for this?
chains: supportedNetworks as unknown as readonly [Chain, ...Chain[]],
transports: supportedNetworks.reduce(
(acc, network) => {
acc[network.id] = http();
return acc;
},
{} as Record<number, ReturnType<typeof http>>,
),
}),
);
main.tsx
import React from "react";
import ReactDOM from "react-dom/client";
import { WagmiProvider } from "wagmi";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
import { ConnectKitProvider } from "connectkit";
import { AaveContractsProvider } from "aave-v3-react";
import { config } from "./config";
import { App } from "./App";
/**
* To be configured based on your needs. All the aave-v3-react hooks will store data here
*/
const queryClient = new QueryClient();
ReactDOM.createRoot(document.getElementById("root")!).render(
<React.StrictMode>
<WagmiProvider config={config}>
<QueryClientProvider client={queryClient}>
<ReactQueryDevtools initialIsOpen={false} />
<ConnectKitProvider>
<AaveContractsProvider>
<App />
</AaveContractsProvider>
</ConnectKitProvider>
</QueryClientProvider>
</WagmiProvider>
</React.StrictMode>
);
App.tsx
import { formatBalance, useReserves } from "aave-v3-react";
export const App = () => {
const { data, isLoading, error } = useReserves()
console.log({data, isLoading, error})
return (
<div>
<h1> Total liquidity </h1>
<b>{formatBalance(
userReserves?.formattedReserves.totalLiquidityUSD,
"USD",
)}
</b>
</div>
)
}
aave-v3-react is fully complatible with next.js, but you may experience some issues with wagmi and connectkit in some cases. Make sure to add the "use client"; directive where needed, and eventually check their docs to tackle such errors.
React native support is still unexplored but should work out of the box. In case you managed to integrate the library there correctly, please open a PR documenting that and possibly providing an example app.
Full API reference is coming soon. For the moment you can refer to aave-utilities. Most of the V3 methods available there have been integrated, and we aim to full support.
Also, a few methods like
useReserves
useUserReserves
useSupply
useWithdraw
have been fully integrated in the example apps.
aave-v3-react is a reactive wrapper on top of aave-utilities, in the short/mid term we aim to:
Contributing guidlines are coming soon. If you want to contribute to this project, open an issue, PR or write me on X (@ErikNucibella)
FAQs
A collection of React hooks to interact with the Aave V3 pools and smart contracts.
We found that aave-v3-react demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.