Comments (15)
In the test error folders there is the following :
.emit(Flashloan, "SwapFinished")
.emit(Flashloan, "SentProfit");
const balance = await USDT.balanceOf(owner.address);
expect(balance.gt(getBigNumber(0, 6))).to.be.true;
});
Do you know why this isn't included in the live script?
from poly-flashloan-bot.
I got this error too and have no idea what's going on there.
Yes, I agree. It's probably because of the contract.
from poly-flashloan-bot.
That token info is used only at src/debug.ts to debug transactions, so it doesn't fix the error itself.
from poly-flashloan-bot.
Fail with error 'UniswapV2Library: INSUFFICIENT_INPUT_AMOUNT'
how can i resolve this error
from poly-flashloan-bot.
Possible reason
I just happened to know that 1inch api returns the burn address instead of wmatic address.
That's why the bot passes the burn address instead of wmatic address and the transaction ends up failing without any error messages.
from poly-flashloan-bot.
I noticed the burn address is also on line 1 & 21 of src/constraints, is this of any relevance?
looks out of place to me but im by no means experienced
from poly-flashloan-bot.
True. I didn't write that part.
Replacing the burn address to wmatic one seems to solve the issue.
from poly-flashloan-bot.
The burn address also appears in the contract.
Is this the correct address? : 0x0000000000000000000000000000000000001010
And do you mean replacing the burn address with the Matic address? Looks like WMatic is fine.
Great job spotting that btw.
from poly-flashloan-bot.
I updated the Matic address from the burn address to 0x0000000000000000000000000000000000001010 on both the contract and the bot but still hasn't been successful :
https://polygonscan.com/address/0x10A1504aE79e7A1f2e80A299f3E94565673A5165
from poly-flashloan-bot.
If I'm not mistaken you need WMATIC Address rather than MATIC.
https://polygonscan.com/token/0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270
im getting INSUFFICIENT_OUTPUT_AMOUNT on every tx after making the amendments, have increased slippage to 5% but still the same after rebuild
from poly-flashloan-bot.
I'm confused about it being WMatic still. Where I find the burn address is where Matic is stated.
Line 4: exports.polyMatic = "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee";
Line 8: MATIC: {
Line 12 :address: "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
from poly-flashloan-bot.
No sorry, I just mean that I don’t think you meant to say WMatic above, the burn address is listed beside Matic, not WMatic. Did you mean to say we just need to change the burn address to the Matic address?
from poly-flashloan-bot.
Any idea why there is a call to selfdestruct to 1inch Network: CHI Token
I don't see an address for CHI anywhere in the code. Since CHI is a gas token for 1inch, do we need to indicate this anywhere?
from poly-flashloan-bot.
I have no idea about the selfdestruct to 1inch.
I reproduced the "Fail" error here.
yuichiroaoki/poly-flash#16
Does it make sense?
it("should be reverted without any error messages when the path includes the burn address.", async () => {
await impersonateFundErc20(USDC, DAI_WHALE, Flashloan.address, "100.0", 6);
await expect(
Flashloan.dodoFlashLoan({
flashLoanPool: dodoV2Pool.WETH_USDC,
loanAmount: getBigNumber(1, 6),
firstRoutes: [{
path: [erc20Address.USDC, BurnAddress, erc20Address.WETH],
router: uniswapRouter.quickswap,
}],
secondRoutes: [{
path: [erc20Address.WETH, erc20Address.USDC],
router: uniswapRouter.quickswap,
}]
}, { gasLimit: 1000000 })
).to.be.revertedWith("");
});
from poly-flashloan-bot.
Good point!
That would be awesome. I will do that.
Probably that could be done with ethers.js.
from poly-flashloan-bot.
Related Issues (20)
- Connect to smart contract HOT 2
- Trade array doesn't read string of protocols - messes up router setup! HOT 2
- SetInterval
- > [8/8] RUN yarn build: #12 40.25 src/index.ts(8,3): error TS2305: Module '"./config"' has no exported member 'tradingRoutes'. HOT 7
- Nothing happens... HOT 1
- Docker giving error, and yarn hanging infinitely. HOT 6
- build but no output HOT 1
- error when i get oppurtinity
- ENS Error on Yarn Start HOT 1
- Nothing posting to logs
- getting 0 confirmations transactions everytime i get oppurtunity HOT 1
- reason: 'insufficient funds for intrinsic transaction cost', HOT 4
- "Yarn Start" and nothing happens. HOT 4
- Discord and telegram group HOT 15
- Fail with error 'SafeERC20: low-level call failed' HOT 12
- Failed to estimate price: missing revert data in call exception !! HOT 3
- Analysis - % Diff inter Exchanges, Fee Uniswap, Fee Flash Loan - Very Difficult Opportunities HOT 3
- Testing - Error encountered during contract execution [execution reverted] HOT 3
- Error: EACCES: permission denied, mkdir 'log'
- Not enough amount to return loan HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from poly-flashloan-bot.