Questions tagged [aave]
The aave tag has no usage guidance.
89
questions
1
vote
1
answer
37
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/...
3
votes
2
answers
85
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 ...
1
vote
0
answers
51
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 & ...
0
votes
0
answers
6
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 ...
0
votes
0
answers
14
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 ...
0
votes
2
answers
59
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 ...
0
votes
0
answers
42
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 ...
1
vote
2
answers
60
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 ...
0
votes
0
answers
67
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&...
3
votes
1
answer
27
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$)...
0
votes
0
answers
60
views
Is it possible to use flashloan as liquidity provider?
I am reading about flash loans where I come over a use case of flash loan as providing liquidity to DEXs.
I am bit confused here. How we can earn profits by just providing liquidity to DEXs since we ...
0
votes
1
answer
68
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 ...
0
votes
0
answers
100
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 ...
0
votes
2
answers
309
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: '...
0
votes
1
answer
95
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 ...
0
votes
0
answers
23
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 ...
1
vote
1
answer
77
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-...
0
votes
1
answer
15
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 ...
0
votes
1
answer
186
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, ...
1
vote
1
answer
113
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 ...
0
votes
1
answer
40
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?
0
votes
1
answer
115
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 ...
0
votes
1
answer
63
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 (...
0
votes
1
answer
265
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 ...
0
votes
0
answers
129
views
Error in hardhat mainnet forking
i have wriiten my hardhat-cofig.js file to allow me in forking a the Ethereum mainnet in hardhat below is my code
/** @type import('hardhat/config').HardhatUserConfig */
const MAINNET_RPC_URL = ...
1
vote
1
answer
125
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, ...
0
votes
1
answer
343
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 = ...
0
votes
1
answer
76
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 ...
0
votes
0
answers
124
views
Writing a flashLoan function call in assembly
I am making a call for an Aave flashloan per the code block below and am getting a too deep in the stack error.
Would writing this function in assembly eliminate the error?
If yes, what would that ...
1
vote
0
answers
109
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 ...
1
vote
1
answer
232
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 ...
0
votes
0
answers
31
views
Configure AAVE subgraph to listen from a specific block
This problem is related to the AAVE subgraph BUT maybe other people ended up in the same situation so there is a general solution:
I'm using the AAVE subgraph and I attached it to a hardhat blockchain....
0
votes
0
answers
136
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://...
0
votes
2
answers
171
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 = ...
1
vote
1
answer
190
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 ...
0
votes
1
answer
119
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 ...
1
vote
0
answers
170
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\...
0
votes
1
answer
361
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:
/...
1
vote
1
answer
137
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
0
votes
1
answer
187
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 ...
0
votes
1
answer
894
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/...
1
vote
0
answers
199
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 ...
2
votes
3
answers
214
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
...
0
votes
1
answer
102
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 ...
0
votes
1
answer
70
views
Unable to deposit into AAVEv3 via web3
I'm attempting to deposit WMATIC on the Polygon chain into AAVEv3, but I'm getting a revert.
I'm running a forked version of Polygon mainnet locally with ganache. I'm using the first account provided ...
1
vote
0
answers
321
views
Depositing Weth ERC20 from Brownie into Aave Pool in contract
I am tying to do a simple deposit into an Aave V2 pool with Python Brownie and Solidity on a mainnet-fork but my transaction keeps getting reverted and I dont know why.
In brownie, I call my function ...
2
votes
1
answer
231
views
What does AaveV3 Error Code '51' actually mean?
Here is a scenario I am simulating on a Hardhat Avalanche Mainnet fork:
Supply USDC to AaveV3.
Borrow WAVAX.
Wait four weeks.
Claim WAVAX rewards.
Swap the rewards into USDC via a UniswapV2-like pair....
0
votes
1
answer
109
views
Pool.borrow ValueError: Gas estimation failed: 'execution reverted'
I'm trying to borrow some DAI on the rinkeby testnet but borrow() transaction fails, even if I have collateral in the Pool contract. I'm trying to borrow 50% of the borrowable.
Any idea why this could ...
0
votes
0
answers
199
views
Unable to withdraw from Aave using contracts
I am using Polygon mainnet. Below are the steps I am trying to follow.
address private constant _lendingPoolAddressesProvider = 0xd05e3E715d945B59290df0ae8eF85c1BdB684744;
address private constant ...
1
vote
1
answer
645
views
Issue implementing and testing aave V3 flash loan
I'm trying to implement a flash loan using aave-v3 flash loan contracts. and when testing using hardhat I get this error:
Error:
Transaction reverted: function returned an unexpected amount of data
...