-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add approve DAI asset to Lending pool provider #3
base: main
Are you sure you want to change the base?
Conversation
Hi Wwarodom, any idea how to resolve this issue-
Upon executing the flashloan, I got this this error as shown below, |
ERC20 is included in FlashLoanReceiverBase.sol. "_asset" is the local variable which is declared here:
|
Thanks Wwarodom for the prompt reply. Yes, I have all these in the contract, yet upon executing I still received this error message. Am I missing out anything? or would you mind vetting the contract and advise me accordingly. Appreciate your assistance. I am still kinda newbie to all these. contracts/flashloan.sol:48:27: DeclarationError: Undeclared identifier. Did you mean "assert"?
|
Opp, you have to move
to flashloan() function you can check my project with hardhat project here: |
update dai transfered
Thanks! I will do test run later. By the way can it be done on Ropsten Testnet? or it has to be Kovan? |
I haven't tested it yet. If AAVE deploys LPs on Ropsten, it can work. |
Noted. In addition, may I check with you, do you develop any code for flash loan arbitrage bot? |
same i needed for arbitrage functionality is there anyone know? |
You may want to check this out and let me know if it works for you - https://github.com/ChengGong0602/flashloan-arbitrage-bot/blob/main/FlashArbitrageTrader.sol |
oi , dá para fazer a estratégia em outra network diferente da Kovan test net ? |
I faced this errors due to no approval for a lending pool.
"Fail with error 'SafeMath: subtraction overflow' "
Ref: https://kovan.etherscan.io/tx/0x25169bbad32aa94a14242b47c4e951cdac37dca7cedb6ca6c2cbdd377099fef3
AAVE state that:
Also note that since the owed amounts will be pulled from your contract, your contract must give allowance to the Pool to pull those funds to pay back the flash loan amount + premiums.
Ref: https://docs.aave.com/developers/guides/flash-loans#overview
After applied "approve", I can successfully run flashloan.
https://kovan.etherscan.io/tx/0x34a5c5f7e64747fdcb1b029ce4e36f901361ef4ebb5736acd31adba3112b8424