Questions tagged [aave]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
52 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 ...
1
vote
1answer
34 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
0answers
9 views

Is it possible to borrow Asset X (let's say DAI) in a FLash Loan and reimburse the loan with Asset Y (let's say ETH) in AAVE?

Well I was wondering if it is possible to let's say borrow an asset in flash loan and then return the flash loan in a different asset on AAVE. For eg. I took a loan of 100 DAI and return the flash ...
0
votes
1answer
69 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
1answer
124 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 ...
0
votes
1answer
14 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 ...
0
votes
0answers
34 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 ...
1
vote
1answer
50 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 ...
0
votes
1answer
26 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 ...
1
vote
1answer
19 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 &...
1
vote
1answer
24 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 ...
0
votes
0answers
19 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 ...
1
vote
1answer
176 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....
1
vote
1answer
346 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. ...
0
votes
1answer
119 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....
1
vote
1answer
293 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: '...
0
votes
1answer
126 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 = ...
2
votes
0answers
155 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, ...
0
votes
1answer
26 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 ...
0
votes
0answers
23 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 &...
0
votes
1answer
109 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!
0
votes
1answer
261 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(...
1
vote
1answer
158 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/...
0
votes
1answer
726 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 ...
2
votes
0answers
439 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
1answer
38 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" ...
1
vote
1answer
212 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 ...
3
votes
0answers
24 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 ...
1
vote
0answers
28 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/...
0
votes
1answer
214 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 (...
1
vote
1answer
431 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
0answers
19 views

Is it possible to derive multiple public addresses for a smart contract to receive ERC-20 tokens?

I have a smart contract that deposits user's fund in the AAVE lending pool on behalf of users: lendingPool.deposit(stableCoinAddress, amount, address(this), 0) Users can deposit at different times ...
2
votes
1answer
34 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 ...
0
votes
1answer
163 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 ...
3
votes
1answer
468 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 ...
1
vote
0answers
991 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 ...
1
vote
0answers
252 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....
1
vote
0answers
30 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 ...
2
votes
1answer
385 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 ...
0
votes
0answers
100 views

Transferring aToken(aDAI) in my truffle tests reverts with unspecific error

I'm having issues with setting up a truffle test to transfer aTokens (aDAI) to my contract. I'm using Aave v2 and running ganache with a fork from mainnnet. This is what I did so far: 1- Started a ...
9
votes
1answer
2k 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
0answers
2k views

Contract call: data out of bounds

I'm working on a nextjs/react project in which i want to fetch the health factor of an address on AAVE. This can be done by calling getUserAcountData(address) on the lending pool contract. I can ...