Skip to main content

Questions tagged [aave]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2 votes
3 answers
655 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
0 answers
34 views

i created sandwich attack python script using aave flashloan. is it correct? i created whole code

solidity contract function: function executeOperation( address asset, uint256 amount, uint256 premium, address initiator, bytes calldata params ) external override returns (bool) { ...
0 votes
0 answers
13 views

What is Collateral swap? How to get benefits from this feature?

Let's say ETH price is $3,000 and wstETH price is $3,500. I have collateral using ETH on Aave. and tomorrow ETH price is $2,950 and wstETH price is $3,650. I did swap my collateral from ETH to wstETH. ...
0 votes
1 answer
33 views

Error: VM Exception while processing transaction: reverted with reason string '36' while running borrow function on Lending Pool contract

const { getWeth, AMOUNT } = require("../scripts/getWeth") async function main() { await getWeth() let { deployer } = await getNamedAccounts() let signer = await ethers.provider....
0 votes
0 answers
21 views

Trying to create a contract for Aave... failing miserably!

I am trying to create a contract so that it deposits wsteth on the scroll pool whenever there is availability. import time from web3 import Web3 from web3.middleware import geth_poa_middleware from ...
0 votes
2 answers
764 views

How to deposit ETH in AAVE v3 testnet WETHgateway.depositETH()

My goal: AAVE v3, deposit ETH, and borrow DAI I played around with AAVE in lesson 10 of the Solidity, Blockchain, and Smart Contract Course, and as long as I stick to the course and use the v2 code ...
1 vote
1 answer
327 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
1 vote
1 answer
737 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 ...
0 votes
1 answer
35 views

Error: VM Exception while processing transaction: reverted with reason string 'SafeERC20: low-level call failed'

// hardhat.config.js require("hardhat-deploy") require("dotenv").config() require("@nomicfoundation/hardhat-ethers"); require("@nomiclabs/hardhat-etherscan"); ...
0 votes
1 answer
664 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: /...
0 votes
0 answers
25 views

What if lending pool oracle price different from market?

If Aave DAI oracle price stay at $0.90, but actual DAI price on any exchange market is $1.12 What would happen? Is that mean someone can abuse or exploit Aave because of this price discrepancy?
0 votes
3 answers
455 views

AttributeError - 'InterfaceContainer' object has no attribute

from brownie import config, network, interface from scripts.helpful_scripts import get_account from scripts.get_weth import get_weth def main(): account = get_account() erc20_address = config[...
0 votes
1 answer
469 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
427 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
4 answers
1k 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
0 votes
0 answers
30 views

FlashLoanWithSwap

Question: I have tried to flashloan with Solidity using Aave code. The issue occurred when calling the _flashloan function with the token address and amount as arguments. Steps: Convert the pool ...
0 votes
1 answer
44 views

Why are rebasing tokens like Aave USDC more popular than accumulating tokens?

Why do some lending protocols prefer rebasing tokens (Compound V3, Aave) over accumulating tokens (Spark, Compound V2)? Rebasing lacks composability. You can't really use them across different ...
0 votes
1 answer
32 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(...
0 votes
1 answer
49 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 ...
1 vote
0 answers
50 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 ...
0 votes
0 answers
15 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%) ...
0 votes
0 answers
74 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 ...
0 votes
0 answers
14 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 ...
0 votes
0 answers
28 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....
0 votes
0 answers
41 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);...
0 votes
1 answer
73 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 ...
1 vote
1 answer
80 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/...
4 votes
2 answers
631 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
2 answers
2k views

Is there any way to find the Aave health factor for a given address (not mine) at a given block?

Is there any way to find the Aave health factor for a given address (not mine) at a given block? e.g. Find out the exact “health factor” for the address 0x0000006daea1723962647b7e189d311d757Fb793 at ...
1 vote
0 answers
104 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
1 answer
2k views

How can I acquire some ERC20 tokens to test AAVE on mumbai testnet?

I need to acquire some DAI or other assets which are supported by AAVE on Mumbai testnet to test my smart contract, but it seems that the AAVE faucet on their site is broken and does not work! (I ...
1 vote
2 answers
757 views

Is there any version of AAVE protocol deployed on polygon/matic testnet?

As AAVE documentation suggests, there is a deployed version of the protocol on matic/polygon mainnet. However, it does not make any mention of those smart contracts on Mumbai testnet which I need to ...
0 votes
2 answers
276 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 ...
1 vote
2 answers
275 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
1 answer
196 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 ...
16 votes
2 answers
6k views

Explain "griefing" attack on Aave flash loan

Aave doc about flash loan warns to never store funds inside a receiver contract as it can be exposed to "griefing" attack. So my questions are Can you give an example of this attack? How ...
3 votes
1 answer
41 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$)...
3 votes
2 answers
1k views

Flashloan error `reverted with reason string 'SafeERC20: low-level call failed'`

I'm attempting to execute a flashloan on a forked mainnet within hardhat and am getting Error: VM Exception while processing transaction: reverted with reason string 'SafeERC20: low-level call failed'....
0 votes
1 answer
128 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
136 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
551 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
185 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
31 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
132 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-...
1 vote
1 answer
789 views

How to correctly import aave/flashloan-box in Remix IDE

I was following the step-by-step guide, and since there is only the main code, I've tried with the following imports pragma solidity 0.6.12; import { FlashLoanReceiverBase } from "https://...
0 votes
1 answer
18 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 ...
1 vote
1 answer
243 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
239 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, ...
0 votes
1 answer
60 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
467 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 ...