Questions tagged [aave]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
22 views

Solidity fundamentals

sometimes I am confused of how solidity works. For example in this case: function claimAssetsFromBridge( bytes calldata message, bytes calldata attestation ) public { IMessageTransmitter(...
Agustin Gonzalez Ribas's user avatar
0 votes
1 answer
39 views

I am trying to make a smart contract in solidty to pool user funds and then transfer them to AAVE lending

This is my code. I am not very familiar with solidity. Currently I am just using a hard coded interest rate instead of deriving it from AAVE for testing // SPDX-License-Identifier: GPL-3.0 pragma ...
Kunal's user avatar
  • 1
1 vote
0 answers
27 views

Calculate maximum possible Aave collateral token withdraw

A user's Aave collateral tokens (aTokens) are transferrable as long as the transfer does not cause the health factor to go below 1. Given this condition, and ANY possible configuration of supplied ...
x_X's user avatar
  • 21
0 votes
2 answers
411 views

Where to get various ERC20 token for Goerli and sepolia testnets

I'm trying to get a collection of erc20 tokens (weth, usdc, dai, wbtc) in a testnet either sepolia or goerli
codekoriko's user avatar
0 votes
0 answers
10 views

Splitting Aave v3 position

Assuming we have a leveraged trading position on Aave using aTokens as collateral and vTokens as debt. Are there examples how this position could be easily split into two (or any given ratio 0-100%) ...
Mikko Ohtamaa's user avatar
0 votes
0 answers
63 views

getting all addresses for active lenders in aave v3

specifically right now im looking at avax liquidity pool, heres what i've tried so far from using the avax address in https://docs.aave.com/developers/deployed-contracts/v3-mainnet/avalanche: from ...
adiligentlearner's user avatar
0 votes
0 answers
11 views

Not able to fetch correct APY in aave mumbai

I am following this doc - APY and APR - Developers to fetch lending and borrowing rates in mumbai for usdc but they doesn’t seem to be correct and are different from aave staging UI, how can I solve ...
Varun Sharma's user avatar
0 votes
0 answers
14 views

Data Fetching from an Aave subgraph

Hi guys I am writing a dApp which deals with liquidations flash loans etc, The 1st step of development is to receive the user addresses who have borrowed more than zero from 'The Graph' I use hardhat....
NeoRusI's user avatar
  • 11
0 votes
0 answers
27 views

aave staking I cannot withdraw usdc tokens earned as rewards in my smart contract

function stake(address _asset, uint256 _amount) public { require(_amount > 0, "Amount must be greater than 0"); IERC20(_asset).safeTransferFrom(msg.sender, address(this), _amount);...
Emin Aksar's user avatar
0 votes
1 answer
40 views

I want to subscribe to flashloan events on the Aave v2 contract via websocket, how do I find the function/event?

I am trying to set up a websocket connection with ethers.js to listen for flashloan events. I have made a connection successfully listening to Transfer events on the USDT contract - which was simple ...
Zara44's user avatar
  • 3
1 vote
1 answer
65 views

Is there MEV in replacing referral code in calldata?

I've been reading AAVE document and saw that user can include a referral code inside deposit calldata, so that the referrer can receive some rewards(source: https://docs.aave.com/developers/v/1.0/...
johnhckuo's user avatar
  • 341
3 votes
2 answers
384 views

Why are the Aave V2 supply and borrow index rate calculations done differently?

I have a question about the math in Aave V2 that performs the update liquidity and borrow index. This question was also asked and unanswered in the Aave Governance Forum. I see calculateLinearInterest ...
Mike's user avatar
  • 101
1 vote
0 answers
85 views

How can I make a flashloan bot

How Can I make a flash loan bot which can operate on Aave, uniswap, sushiswap etc? I know a furucombo, but this is too complicated for me. My Idea is the bot will keep an eye on certain tokens & ...
Saikat Karmakar's user avatar
0 votes
0 answers
26 views

AAVE:COOLDOWN_SECONDS and UNSTAKE_WINDOW

AAVE V1 's redeem() function requires us to wait for COOLDOWN_SECONDS and withdraw money in UNSTAKE_WINDOW. /** * @dev Redeems staked tokens, and stop earning rewards * @param to Address to ...
LEVI_104's user avatar
0 votes
0 answers
51 views

Aave's V3 Supply APY

I'm working on a lending protocol that partially based on Aave's V3 interest rate. I'm trying to understand the Supply APY. I only have one rate, don't have a stable and variable rate. I understand ...
littlethor's user avatar
0 votes
2 answers
173 views

Calling Aave Lending Pool V2 "Borrow" function returns "reverted with reason string 59"

My smart contract is trying to use stETH as collateral to borrow 250 WETH on the Aave Lending Pool V2, but the borrow function reverts with code 59: BORROW_ALLOWANCE_NOT_ENOUGH = '59'; // User borrows ...
MasterShake20's user avatar
0 votes
0 answers
101 views

How did AAVE dapp calculate the “maximum available withdraw” value (v2)?

I can not find the dapp of aave manage to find the exact amount that I can withdraw. I have 5 "aUSDC" but when I go on dapp, I can only withdraw 4.3. I know it's due to the debt of another ...
Frank Waldron's user avatar
1 vote
2 answers
153 views

Aave V3 Liquidations - Testing on Sepolia

I'm trying to test my nodejs app on the Sepolia testnet. What I want to do is monitor some events, gather user accounts, I will then call getUserAccountData() from the pool to see the HF. As explained ...
iliev951's user avatar
0 votes
0 answers
75 views

ValueError: Gas estimation failed: 'execution reverted'. This transaction will likely revert

Im building an DEFIAPP (AAVE)V3 I do have enough eth function deposit(address asset, uint256 amount, address onBehalfOf, uint16 referralCode) external Added settings: gas_limit: "100000000000&...
Salma Sameer's user avatar
3 votes
1 answer
35 views

What are the countermeasures for losses in decentralized finance platforms like Aave?

I am a newbie in the blockchain/Web3 space and trying to understand the AAVE protocol. Suppose a borrower deposits 1 ETH whose value is 500 DAI Tokens(500$) as collateral to borrow 100 DAI Tokens(100$)...
Hrithik Raj's user avatar
0 votes
1 answer
100 views

Credit delegation in Aave not working

I have a question on Aave Credit Delegation. I have gone through the documentation and based on that tried to set it up so that an address that deposits the collateral can delegate the borrowing power ...
adeelmahmood's user avatar
0 votes
0 answers
126 views

I am wondering what address do you use to call flashloan?

I am using this address to call flashloan 0x65aFADD39029741B3b8f0756952C74678c9cEC93 but I get Gas estimation failed error please let me know if you use another address and successfully call the ...
shawn t's user avatar
0 votes
2 answers
458 views

Request flashloan fails: Gas estimation failed: 'execution reverted: 27'. This transaction will likely revert

I have written a simple flash loan smart contract with no custom logic and deployed it to goerli testnet. When I call the requestFlashLoan() function I get the following error. Gas estimation failed: '...
Rapithwin's user avatar
0 votes
1 answer
154 views

-32000 Execution Reverted - Simple AAVE Price Oracle request

I'm currently in the early stages of learning solidity and diving into the blockchain world; I do have prior programming experience. I'm currently stumped on something that seems rather trivial, but ...
user114847's user avatar
0 votes
0 answers
25 views

How to increase supplyCap on aave v3

I am working with aave-v3 on testnet deployed from the @aave-v3-deply deployment repo. I am unable to increase the supplyCap on the pool via the poolConfigurator.I have all the permission on the ...
phydy's user avatar
  • 146
1 vote
1 answer
115 views

AAVE FlashLoanV3 alowance return 0

I'm trying to make a simple flashloan contract and export it in to goerli testnet. Everything start ok, but when I call requestFlashLoan() it become error, like this: FLashLoanArbitrage.sol // SPDX-...
Linh lê's user avatar
0 votes
1 answer
17 views

liquidate undercollateralized user without third party intervention

Im building a simple lending-borrowing protocol, using yield-generating and debt tokenization pattern, and for users liquidation when its position is undercollateralized, i want to liquidate part of ...
noro meb's user avatar
  • 338
0 votes
1 answer
228 views

Why can't I deposit to Goerli Aave with web3.py?

I'm trying to deposit weth to aave on the goerli testnet. My approveErc20 function works and I confirmed that tokens are approved for transfer. This is my code: def deposit_to_aave_goerli(privateKey, ...
Ilan Katz's user avatar
1 vote
1 answer
166 views

how aave increases debtTokens?

im working on a lending protocol and for tracking borrowers debt i want to use aave debtTokens pattern but i don't get how aave increases borrowers balances in real time since we cannot change ...
noro meb's user avatar
  • 338
0 votes
1 answer
54 views

When liquidations occur on Aave or Synthetix or Compound or any other protocol, where are the liquidated assets sold?

Do they sell them on Uniswap or Binance? Does it happen automatically? If they just sell on some random Dex, how do they avoid major slippage? Where does a protocol say how it liquidates positions?
Ilan Katz's user avatar
0 votes
1 answer
253 views

How to get user data of Aave pool position inside of Solidity smart contract?

I'm developing a smart contract, which deposits into Aave v3 stablecoin pools. For withdrawal, you have to specify the underlying token address of the a token (e..g usdc address, dai address, ...) and ...
ethadvocate123's user avatar
0 votes
1 answer
98 views

Unable to find WETH contract in mainnet fork

I have created a fork of the ethereum mainnet using Alchemy. When I try to fetch the WETH contract in the fork, it says no contract deployed at the given address (...
sramasub's user avatar
0 votes
1 answer
384 views

Fail with error '27' - Aave flashloans solidity

I have succesfully deployed the contract to the goerli testnet, via hardhat. However when I try to call the requestFlashLoan function with metamask, the transaction suggested gas fee seems unusually ...
Simsimbutdifferent's user avatar
1 vote
1 answer
226 views

aave accounts with health factor <1

Did a quick check in subgraph, and found ids with <1 health factor. Should not they be liquidated instantly? like 0xc49b59301be4d9660961f62fbeea0e234e3a53b5, ...
Castle_inthe_Air's user avatar
0 votes
1 answer
420 views

revert SafeERC20: low-level call failed

SIO2 is aave v2 foked version on Astar chain. I want to execute flash loan on it and have the following code: function myFlashLoanCall() public returns (bool){ address receiverAddress = ...
Rishabh Raghwendra's user avatar
0 votes
1 answer
109 views

Aave: What is the meaning of Refinancing a loan with a Flash Loan

I was watching an old video on AAVE and at around the 2:45 mark it talks about "refinance a loan with flash loan". I am trying to understand what it means. I understand a Flash loan is a big ...
Somjit's user avatar
  • 265
1 vote
0 answers
137 views

How can I deploy aave protocol locally or in testnet

Aave v2 mumbai testnet faucet is broken, So I was thinking to deploy the aave protocol locally or in any testnet to mint new tokens. Aave protocol is built on hardhat and I am new on hardhat. can't ...
Yeasin Rahaman's user avatar
1 vote
1 answer
334 views

How to calculate AAVE yield on chain

I’m working on a project which involves tracking and withdrawing AAVE yield on chain while maintaining the original deposit balance. I’m confused as to how to accurately calculate AAVE yield at a ...
xde's user avatar
  • 13
0 votes
0 answers
171 views

Use AAVE contract in my own contract. cannot estimate gas; transaction may fail or may require manual gas limit

I am tring to use AAVE contract in my own contract. but I have a question on this mysterious error. Error: cannot estimate gas; transaction may fail or may require manual gas limit [ See: https://...
Ethanabc's user avatar
  • 101
0 votes
2 answers
216 views

Deposit in AAVE v2 contract from HardHat

I'm trying to deposit into AAVE v2 using hardhat. My code is the following: const hre = require('hardhat') ... const contractAddress = '0x7d2768de32b0b80b7a3454c06bdac94a69ddc7a9' const contract = ...
Jacob's user avatar
  • 155
1 vote
1 answer
290 views

Hardhat network resetting repeatedly

I'm trying to test out some functionality using the AAVE sandbox network, which is a hardhat forked network that has their protocol built in for testing purposes. I am able to deploy my contract to ...
l1nkm4rine's user avatar
0 votes
1 answer
194 views

AAVE supply Pool failing with error 'ERC20: transfer amount exceeds allowance'

I'm trying write a contract that takes a transfer from a user which then deposits the sent tokens into an AAVE lending pool (I'm using USDT for testing on Georli testnet). I was able to get the funds ...
l1nkm4rine's user avatar
1 vote
0 answers
246 views

Trouble with Solidity Compiler Version when combining Aave and Openzeppelin in Foundry

I'm trying to follow this tutorial by Patrick Collins on Flashloans but in Foundry: https://www.youtube.com/watch?v=Aw7yvGFtOvI&t=328s When in try to forge build I get the following error: : src\...
banyan's user avatar
  • 21
0 votes
1 answer
512 views

How to implement a contract for AAVE V3 "Supply, borrow, withdraw, loan etc" functsions

I am trying to write a contract imported aave-v3 which includes the some aave v3 functions such as supply, borrow, repay etc. I will then make this contract accessible only to its owner. For example: /...
Turgay ÇABALAK's user avatar
1 vote
1 answer
276 views

How To deposit erc20 tokens into AAVE v3 protocol using solidity and remix?

I was trying to deposit some funds from my metamask wallet into AAVE V3 protocol using solidity and remix? plz anyone post the code
sourav menon's user avatar
0 votes
1 answer
215 views

Run aave test suite locally on ganache [Change network hardhat to ganache]

This is aave protocol v2: https://github.com/aave/protocol-v2 They have a built-in test suite. Running npm run test runs all the tests cases properly. But this runs on hardhat node. I need to change ...
Yeasin Rahaman's user avatar
0 votes
1 answer
985 views

AAVE Flashloan: SafeERC20: low-level call failed

I have this flashloan contract here: pragma solidity ^0.6.6; import "@aave/protocol-v2/contracts/flashloan/base/FlashLoanReceiverBase.sol"; import "@aave/protocol-v2/contracts/...
Rodrigo Burgos's user avatar
3 votes
0 answers
304 views

Pros and cons of interest bearing elastic supply (rebase) tokens

Single asset vaults usually choose from 2 types of tokens that represent user shares. Tokens pegged 1:1 to underlying assets employing the rebase architecture. When underlying asset volume grows then ...
origaminal's user avatar
2 votes
3 answers
470 views

How to calculate the value of supply apy seen on the aave frontend?

I tried to implement the following aave docs in order to calculate the deposit apy that you can see on the market page in Aave defi protocol. https://docs.aave.com/developers/v/2.0/guides/apy-and-apr ...
Alessandro Morandi's user avatar
0 votes
1 answer
160 views

Liquidity Pool Addresses

I am looking to run some analytics on different liquidity pools in Curve, Uniswap and AAVE and for that I need their addresses. Is there any way I can get the list of pools and their contract ...
ClaudeTi's user avatar