Questions tagged [aave]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
10 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 ...
user avatar
0 votes
1 answer
26 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 ...
user avatar
0 votes
0 answers
67 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 ...
user avatar
1 vote
1 answer
33 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....
user avatar
  • 345
0 votes
1 answer
22 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 ...
user avatar
  • 11
0 votes
0 answers
16 views

aave v3 Pool decimals

I'm trying to get the user data from an aave v3 contract and I'm very confused by the number of decimals, or better I cannot find the number of decimals with which the collateral, borrowable and debt ...
user avatar
  • 11
0 votes
0 answers
47 views

Trying to call an Aave function

I have been trying to call GetReserveData() for the variable burrow rate but am failing at how doing it, the documentation here: https://docs.aave.com/developers/core-contracts/pool#getreservedata is ...
user avatar
0 votes
0 answers
63 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 ...
user avatar
0 votes
1 answer
239 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 ...
user avatar
0 votes
2 answers
197 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 ...
user avatar
0 votes
0 answers
31 views

How to compute supply apy and distribution apy from BenQI protocol?

I'm integrating BenQI (aka AAVE on avalanche) into antoher dapp and for this I need to reproduce Supply APY and Distribution APY computation for each market. But there is no info out there about this, ...
user avatar
0 votes
1 answer
190 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[...
user avatar
0 votes
0 answers
65 views

Error depositing matic to Aave WEHTGateway in polygon mumbai test net

I'm testing out Patric Collins youtube video and trying to test it in polygon testnet Mumbai but I when I try to deposit eth/matic to Aave Wethgateway I face this error: File "C:\Users\...
user avatar
1 vote
1 answer
346 views

What could go wrong if I change the version pragma of a third-party contract to make it importable with a newer Solidity compiler?

What are the consequences of changing compiler versions in dependency contracts to the same version as the main contract? I have one main contract that inherits some other contracts to interact with ...
user avatar
1 vote
1 answer
251 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://...
user avatar
  • 13
1 vote
1 answer
583 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 ...
user avatar
3 votes
1 answer
532 views

How to import Aave and Uniswap contracts from a 0.8.x Solidity contract

So I have some smart contracts with version pragmas set to 0.8.0, my Truffle config's solc is set to 0.8.2 and everything compiles except for some imported contracts from Aave and Uniswap. This is ...
user avatar
0 votes
1 answer
19 views

Why is this transaction showing value as 0?

New to crypto. I see in the erc20 tokens column that there are some SNX tokens. SNX was converted to aSNX then it was supposedly transferred to another wallet. But when I check that wallet there is no ...
user avatar
0 votes
0 answers
53 views

Pending transactions remain pending forever?

I have a pending transaction stucked for more than 24 hours. I have receive advice on how to cancel it already so please do not answer me that advice again. Because it hasn't worked for me. Now my ...
user avatar
1 vote
1 answer
167 views

Approving tokens after flash loan

I'm creating a smart contract that can both make flash loans and swap tokens via 0x. I can call the flash loan and token swap functions just fine, but when I try to call the token swap within the ...
user avatar
0 votes
1 answer
77 views

Get AAVE LendingPool address using Vyper interface contract

I'm at the very early stages of trying to understand how to send coins to AAVE. I've coded the following which is the first step to get the pool address from the proxy contract. from vyper.interfaces ...
user avatar
1 vote
1 answer
23 views

Distribution coefficient

I'm building a dapp and I need some help with creating the formula for a "distribution coefficient/index" (my math is rusted). The idea behind it is: There's a total balance. Let's call it &...
user avatar
  • 307
2 votes
1 answer
40 views

Aave's gas consumption on state modification

On every action from LendingPool (deposit, withdraw, repay, borrow, etc), Aave updates its entire state for certain variables, including the aToken balances of each user holding aTokens. How can Aave ...
user avatar
  • 307
0 votes
0 answers
32 views

Lending too Aave protocol

I am a newbie in DeFi programming and just entered the space. I have made a simple contract to observe how it works. The intention was to lend some ether to the Aave protocol ( WETH (specified for ...
user avatar
1 vote
1 answer
446 views

Getting a compile error every time I try to compile a contract with Brownie that includes an import statement from the web

I have a contract that starts with the following import statements: import 'https://github.com/aave/protocol-v2/blob/master/contracts/flashloan/base/FlashLoanReceiverBase.sol'; import 'https://github....
user avatar
1 vote
1 answer
661 views

Retrieving Matic Reward Rates on AAVE with a Python script

I am trying to build a Python script to retrieve different AAVE rates programmatically (borrow, lending, and rewards), on the Polygon blockchain (will be very similar for Ethereum). I am using Python. ...
user avatar
0 votes
1 answer
252 views

How to withdraw rewards with aave's LendingPool?

Let's say a contract deposits money into Aave with LendingPool.deposit(). After a while, we use LendingPool.withdraw(). Will it withdraw all rewards and interest? It doesn't seem so? https://docs.aave....
user avatar
1 vote
1 answer
796 views

Transaction Reverted when attempting to withdraw from aave

I got an example running which deposits the Aave token into Aave. I'm using the Code Contracts examples provided by Aave v2 github // Fork Kovan await hre.network.provider.request({ method: '...
user avatar
  • 212
0 votes
0 answers
218 views

How to use AAVE borrow through web3py and RPC?

I'm using web3py on polygon network, through the RPC provided from MaticVigil I'm trying to borrow using the following python code : nonce = web3.eth.get_transaction_count(ether_address) contract = ...
user avatar
2 votes
0 answers
265 views

Simple Contract to supply eth to aave

I'm trying programatically deposit using into Aave V2 Contract Aave's Code Examples // SPDX-License-Identifier: MIT pragma solidity >= 0.4.22 < 0.8.7; import { IERC20, ILendingPool, ...
user avatar
  • 212
0 votes
1 answer
31 views

How does Aavegotchi attach wearable NFTs to gotchi NFTs?

Aavegotchi (and presumably many other NFT games) have different types of NFTs, some of which can be attached to others. For example: An Aavegotchi ghost, or gotchi, is an NFT with attributes that ...
user avatar
  • 151
0 votes
0 answers
41 views

Cannot import Aave in remix

I tried to load aave in remix by following the below code pragma solidity ^0.6.6; import "https://github.com/aave/flashloan-box/blob/Remix/contracts/aave/FlashLoanReceiverBase.sol"; import &...
user avatar
  • 161
0 votes
1 answer
288 views

How do I claim rewards on polygon aave with smart contract?

What is the function to claim rewards on polygon aave? I can't seem to find it in its docs. Thanks!
user avatar
0 votes
1 answer
443 views

Aave deposit function on polygon says execution reverted

I have here a contract where I can deposit dai into the aave lending pool. I am able to deposit it, but unable to withdraw. Here is the contract: // dai ERC20 public TOKEN = ERC20(...
user avatar
1 vote
1 answer
363 views

Failing to borrow from Aave's Lending Pool

I'm trying to borrow USDC from Aave v2's lending pool through an interface, but I can't manage to do it: My contract: //SPDX-License-Identifier: Unlicense pragma solidity ^0.8.0; import './interfaces/...
user avatar
  • 307
0 votes
1 answer
1k 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 ...
user avatar
3 votes
1 answer
733 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'....
user avatar
  • 131
0 votes
1 answer
120 views

Aave Flashloan `reverted with reason '73'`

I'm getting an error when attempting to execute an Aave V2 Flashloan within a Hardhat-mocha test while connected to a fork of the Kovan network. It's unclear to me what revert reason "73" ...
user avatar
  • 131
1 vote
1 answer
307 views

How does flash loan lender know you are not able to pay it back?

Basically I am wondering how does it know when the loan is not paid back. I understand this is easy to check but how can it revert the transaction? For example let's say I borrow 1M USDT, and then I ...
user avatar
3 votes
0 answers
32 views

Why borrow DAI from compound has lower rate than borrow USDT?

As shown in the figure, borrowing Tether from compound have 10.73% APY, while borrow DAI from compound only have 4.64%. However, we can exchange DAI or USDC to Tether in any exchange very easily, so ...
user avatar
1 vote
0 answers
41 views

AAVE Protocol v1 issue on reserve addresses with compound ctoken addresses

https://kovan.etherscan.io/tx/0xa7f5e857d1a9ecb4aca0714b24a70ca0942cc1a656c8e09b6d01bab9af4ec9e5 I am trying to make a transaction from DSProxy (Smart Wallet) on a contract https://kovan.etherscan.io/...
user avatar
0 votes
1 answer
233 views

aAAVE (Atoken) accidently transferred from Metamask wallet to exchange AAVE wallet - HELP PLEASE! [closed]

Really hoping someone here can help. I have AAVE being used as collateral on AAVEV2 as I borrowed some USDC at very low LTV. I use metamask to connect to AAVE and in my wallet you can see aAAVE (...
user avatar
1 vote
1 answer
591 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 ...
user avatar
2 votes
1 answer
54 views

Calculating AAVE intereset rate belonging to different users that transferred into a smart contract

I have a smart contract that accepts user funds and adds them to an AAVE lending pool (DAI for example). Something like this: lendingPool.deposit(stableCoinAddress, amount, address(this), 0); As you ...
user avatar
0 votes
1 answer
279 views

Getting current user balance of an aToken for a specific asset in AAVE v2 protocol

As AAVE protocol V2 documentation says: aTokens are interest-bearing tokens that are minted and burned upon deposit and withdraw. The aTokens' value is pegged to the value of the corresponding ...
user avatar
3 votes
1 answer
676 views

Double Flash Loan

Looking into Flash Loans, is it possible to take out TWO at once (aave/dydx/uniswap)? How would you go about doing this? Here is what I'm thinking of, but it seems too complicated: Contract 1 takes a ...
user avatar
  • 133
1 vote
0 answers
1k views

Does the gas limit for AAVE transactions need to be so high?

There are two parts to the fee you pay for an Ethereum transaction - gwei and gas limit. Gwei is determined by how competitive (ie, congested) the Ethereum network is. As most people are aware, the ...
user avatar
  • 11
1 vote
0 answers
338 views

Cant receive wETH to my contract after swap on uniswap

I write a simple contract to do a flash loan from aave and interact with uniswap in it. I found out that no wETH is sent to my contract after swaping on uniswap. Transcations are here: https://kovan....
user avatar
  • 41
1 vote
0 answers
39 views

Presign transaction to later publish with aave

Is it possible to have pre-signed tx that I could publish to close a position with aave. Let's imagine I have 0.1 wbtc deposited with aave and I borrow 1000 usdt. I can close my position from the ...
user avatar
  • 23
2 votes
1 answer
416 views

why aave total supply not equal to circulation supply?

I'm new to the blockchain world. I'm trying hard to understand how tokens are generated and I learned that the tokens are not minable, unlike bitcoin or eth coins. also learned that these tokens only ...
user avatar
  • 121