Aave.

Bài viết

Chia sẻ kiến thức của bạn.

Aaveator.
Mar 10, 2023
Hỏi đáp Chuyên Gia

RequestLoan function reverting when attempting to execute an Aave flashloan contract?

Hello Aave community,

I'm currently learning about Aave v3 flashloan (as well as v2) and trying to build a contract to execute a flash loan. However, my requestLoan function keeps reverting and I'm not sure why.

Does the fact that my contract does not currently have any tokens impact the execution of the Aave flashloan? I've created a new contract and am trying to request a 1 USDC flash loan on the Goerli testnet, but it's not executing.

I'd appreciate any insights or suggestions on why the requestLoan function keeps failing and whether not having the required token is the issue.

Thank you in advance for your help!

  • Aave flashloan
  • Aave v2
  • Aave v3
0
1
Chia sẻ
Bình luận
.

Câu trả lời

1
Aaveator.
Mar 15 2023, 12:55

If the receiving contract does not have a balance to cover the flashloaned amount + premium then execution reverted will happen. Be careful not to store funds on the aave flashloan contract though because they could be used by someone else calling your contract. You can get test tokens from the faucets here.

0
Bình luận
.

Bạn có biết câu trả lời không?

Hãy đăng nhập và chia sẻ nó.

Aave is a decentralized non-custodial liquidity protocol where users can participate as depositors or borrowers.

213Bài viết230Câu trả lời
Sui.X.Peera.

Kiếm phần của bạn từ 1000 Sui

Tích lũy điểm danh tiếng và nhận phần thưởng khi giúp cộng đồng Sui phát triển.