0xnivek / joe-liquidator Goto Github PK
View Code? Open in Web Editor NEWFlash loan liquidation bot for traderjoe.xyz
Flash loan liquidation bot for traderjoe.xyz
Awesome repo, but when the bot finds, and tries to liquidate an opportunity I get the following error.
==========================
Error performing liquidation: <ref *1> Error: cannot estimate gas; transaction may fail or may require manual gas limit (error={"reason":"cannot estimate gas; transaction may fail or may require manual gas limit","code":"UNPREDICTABLE_GAS_LIMIT","method":"estimateGas","transaction":{"from":"0xfF4d2A47E9883432456b47fE09a663c56aBF39de","maxPriorityFeePerGas":{"type":"BigNumber","hex":"0x9502f900"},"maxFeePerGas":{"type":"BigNumber","hex":"0x0660dc72c6"},"to":"0x107CF546fA93894781Fe6568CF55604a0658314e","data":"0xca5ce2ec00000000000000000000000000085a6b85b15e7a6bc9f4f4e937ba1709d5fc57000000000000000000000000c22f01ddc8010ee05574028528614634684ec29e000000000000000000000000585e7bc75089ed111b656faa7aeb1104f5b96c15","type":2,"accessList":null}}, tx={"data":"0xca5ce2ec00000000000000000000000000085a6b85b15e7a6bc9f4f4e937ba1709d5fc57000000000000000000000000c22f01ddc8010ee05574028528614634684ec29e000000000000000000000000585e7bc75089ed111b656faa7aeb1104f5b96c15","to":{},"from":"0xfF4d2A47E9883432456b47fE09a663c56aBF39de","type":2,"maxFeePerGas":{"type":"BigNumber","hex":"0x0660dc72c6"},"maxPriorityFeePerGas":{"type":"BigNumber","hex":"0x9502f900"},"nonce":{},"gasLimit":{},"chainId":{}}, code=UNPREDICTABLE_GAS_LIMIT, version=abstract-signer/5.5.0)
at Logger.makeError (/Users/kr/joe-liquidator/bot/node_modules/@ethersproject/logger/lib/index.js:199:21)
at Logger.throwError (/Users/kr/joe-liquidator/bot/node_modules/@ethersproject/logger/lib/index.js:208:20)
at /Users/kr/joe-liquidator/bot/node_modules/@ethersproject/abstract-signer/lib/index.js:365:47
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Promise.all (index 7) {
reason: 'cannot estimate gas; transaction may fail or may require manual gas limit',
code: 'UNPREDICTABLE_GAS_LIMIT',
error: Error: cannot estimate gas; transaction may fail or may require manual gas limit (method="estimateGas", transaction={"from":"0xfF4d2A47E9883432456b47fE09a663c56aBF39de","maxPriorityFeePerGas":{"type":"BigNumber","hex":"0x9502f900"},"maxFeePerGas":{"type":"BigNumber","hex":"0x0660dc72c6"},"to":"0x107CF546fA93894781Fe6568CF55604a0658314e","data":"0xca5ce2ec00000000000000000000000000085a6b85b15e7a6bc9f4f4e937ba1709d5fc57000000000000000000000000c22f01ddc8010ee05574028528614634684ec29e000000000000000000000000585e7bc75089ed111b656faa7aeb1104f5b96c15","type":2,"accessList":null}, code=UNPREDICTABLE_GAS_LIMIT, version=providers/5.5.1)
at Logger.makeError (/Users/kr/joe-liquidator/bot/node_modules/@ethersproject/logger/lib/index.js:199:21)
at Logger.throwError (/Users/kr/joe-liquidator/bot/node_modules/@ethersproject/logger/lib/index.js:208:20)
at /Users/kr/joe-liquidator/bot/node_modules/@ethersproject/providers/lib/fallback-provider.js:652:52
at Array.forEach ()
at /Users/kr/joe-liquidator/bot/node_modules/@ethersproject/providers/lib/fallback-provider.js:632:61
at step (/Users/kr/joe-liquidator/bot/node_modules/@ethersproject/providers/lib/fallback-provider.js:48:23)
at Object.next (/Users/kr/joe-liquidator/bot/node_modules/@ethersproject/providers/lib/fallback-provider.js:29:53)
at step (/Users/kr/joe-liquidator/bot/node_modules/@ethersproject/providers/lib/fallback-provider.js:33:139)
at Object.next (/Users/kr/joe-liquidator/bot/node_modules/@ethersproject/providers/lib/fallback-provider.js:29:53)
at fulfilled (/Users/kr/joe-liquidator/bot/node_modules/@ethersproject/providers/lib/fallback-provider.js:20:58) {
reason: 'cannot estimate gas; transaction may fail or may require manual gas limit',
code: 'UNPREDICTABLE_GAS_LIMIT',
method: 'estimateGas',
transaction: {
from: '0xfF4d2A47E9883432456b47fE09a663c56aBF39de',
maxPriorityFeePerGas: [BigNumber],
maxFeePerGas: [BigNumber],
to: '0x107CF546fA93894781Fe6568CF55604a0658314e',
data: '0xca5ce2ec00000000000000000000000000085a6b85b15e7a6bc9f4f4e937ba1709d5fc57000000000000000000000000c22f01ddc8010ee05574028528614634684ec29e000000000000000000000000585e7bc75089ed111b656faa7aeb1104f5b96c15',
type: 2,
accessList: null
}
},
tx: {
data: '0xca5ce2ec00000000000000000000000000085a6b85b15e7a6bc9f4f4e937ba1709d5fc57000000000000000000000000c22f01ddc8010ee05574028528614634684ec29e000000000000000000000000585e7bc75089ed111b656faa7aeb1104f5b96c15',
to: Promise { '0x107CF546fA93894781Fe6568CF55604a0658314e' },
from: '0xfF4d2A47E9883432456b47fE09a663c56aBF39de',
type: 2,
maxFeePerGas: BigNumber { _hex: '0x0660dc72c6', _isBigNumber: true },
maxPriorityFeePerGas: BigNumber { _hex: '0x9502f900', _isBigNumber: true },
nonce: Promise { 20 },
gasLimit: Promise { [Circular *1] },
chainId: Promise { 1 }
}
Any help is greatly appreciated, thanks.
When i run yarn compile :
┌──(kali㉿kali)-[~/joe-liquidator/liquidator]
└─$ yarn compile
yarn run v1.22.18
warning package.json: No license field
warning ../../package.json: No license field
$ hardhat compile
Nothing to compile
Done in 1.96s.
I'm running into an issue when attempting to run the bot with "yarn start". Please see below:
Mainnet contract address: 0x60ae94AF8C90a0DeBF0ad75BFA44E408cb81ED27
🔧 Bot starting up...
🔁 Bot will query the subgraph every 10 seconds to search for liquidatable accounts...
🔎 Searching for account to liquidate...
🤩 Found underwater account to liquidate!
🌊 Performing liquidation on borrower 0x364efe92840aa222866759dc4e4d25a58ec80775 with borrow position on jUSDT and supply position on jWBTC
Error performing liquidation: <ref *1> Error: cannot estimate gas; transaction may fail or may require manual gas limit (error={"reason":"cannot estimate gas; transaction may fail or may require manual gas limit","code":"UNPREDICTABLE_GAS_LIMIT","method":"estimateGas","transaction":{"from":"0x4547DdF5e28CF4aBEB59Be84FFacee0571C02FD2","maxPriorityFeePerGas":{"type":"BigNumber","hex":"0x9502f900"},"maxFeePerGas":{"type":"BigNumber","hex":"0x0b757d65ba"},"to":"0x60ae94AF8C90a0DeBF0ad75BFA44E408cb81ED27","data":"0xca5ce2ec000000000000000000000000364efe92840aa222866759dc4e4d25a58ec807750000000000000000000000008b650e26404ac6837539ca96812f0123601e44480000000000000000000000003fe38b7b610c0acd10296fef69d9b18eb7a9eb1f","type":2,"accessList":null}}, tx={"data":"0xca5ce2ec000000000000000000000000364efe92840aa222866759dc4e4d25a58ec807750000000000000000000000008b650e26404ac6837539ca96812f0123601e44480000000000000000000000003fe38b7b610c0acd10296fef69d9b18eb7a9eb1f","to":{},"from":"0x4547DdF5e28CF4aBEB59Be84FFacee0571C02FD2","type":2,"maxFeePerGas":{"type":"BigNumber","hex":"0x0b757d65ba"},"maxPriorityFeePerGas":{"type":"BigNumber","hex":"0x9502f900"},"nonce":{},"gasLimit":{},"chainId":{}}, code=UNPREDICTABLE_GAS_LIMIT, version=abstract-signer/5.5.0)
reason: 'cannot estimate gas; transaction may fail or may require manual gas limit',
code: 'UNPREDICTABLE_GAS_LIMIT',
error: Error: cannot estimate gas; transaction may fail or may require manual gas limit (method="estimateGas", transaction={"from":"0x4547DdF5e28CF4aBEB59Be84FFacee0571C02FD2","maxPriorityFeePerGas":{"type":"BigNumber","hex":"0x9502f900"},"maxFeePerGas":{"type":"BigNumber","hex":"0x0b757d65ba"},"to":"0x60ae94AF8C90a0DeBF0ad75BFA44E408cb81ED27","data":"0xca5ce2ec000000000000000000000000364efe92840aa222866759dc4e4d25a58ec807750000000000000000000000008b650e26404ac6837539ca96812f0123601e44480000000000000000000000003fe38b7b610c0acd10296fef69d9b18eb7a9eb1f","type":2,"accessList":null}, code=UNPREDICTABLE_GAS_LIMIT, version=providers/5.5.1)
reason: 'cannot estimate gas; transaction may fail or may require manual gas limit',
code: 'UNPREDICTABLE_GAS_LIMIT',
method: 'estimateGas',
transaction: {
from: '0x4547DdF5e28CF4aBEB59Be84FFacee0571C02FD2',
maxPriorityFeePerGas: [BigNumber],
maxFeePerGas: [BigNumber],
to: '0x60ae94AF8C90a0DeBF0ad75BFA44E408cb81ED27',
data: '0xca5ce2ec000000000000000000000000364efe92840aa222866759dc4e4d25a58ec807750000000000000000000000008b650e26404ac6837539ca96812f0123601e44480000000000000000000000003fe38b7b610c0acd10296fef69d9b18eb7a9eb1f',
type: 2,
accessList: null
}
},
tx: {
data: '0xca5ce2ec000000000000000000000000364efe92840aa222866759dc4e4d25a58ec807750000000000000000000000008b650e26404ac6837539ca96812f0123601e44480000000000000000000000003fe38b7b610c0acd10296fef69d9b18eb7a9eb1f',
to: Promise { '0x60ae94AF8C90a0DeBF0ad75BFA44E408cb81ED27' },
from: '0x4547DdF5e28CF4aBEB59Be84FFacee0571C02FD2',
type: 2,
maxFeePerGas: BigNumber { _hex: '0x0b757d65ba', _isBigNumber: true },
maxPriorityFeePerGas: BigNumber { _hex: '0x9502f900', _isBigNumber: true },
nonce: Promise { 0 },
gasLimit: Promise { [Circular *1] },
chainId: Promise { 1 }
}
}
Any idea what could be causing the issue?
Hey this is my contract address : 0x107CF546fA93894781Fe6568CF55604a0658314e
I always get the same error when I try to run the program.
🚨 Stopping because the JOE_LIQUIDATOR_CONTRACT_ADDRESS
environment variable isn't set.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.