Giter Club home page Giter Club logo

amm-arbitrageur's People

Contributors

changzhi1990 avatar dependabot[bot] avatar paco0x avatar yipu3 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

amm-arbitrageur's Issues

Error: call revert exception method getProfit(address,address)

I clone sourse code
and set bsc wallet in .secret.ts

depoly flashBot contract with remix editor and set contract address in config.ts

after use this command in command promt (windows 10)
yarn run bot
I have this error:


Error: call revert exception (method="getProfit(address,address)", errorArgs=null, errorName=null, errorSignature=null, reason=null, code=CALL_EXCEPTION, version=abi/5.2.0)
    at Logger.makeError (\amm-arbitrageur\node_modules\@ethersproject\logger\src.ts\index.ts:213:28)
    at Logger.throwError (\amm-arbitrageur\node_modules\@ethersproject\logger\src.ts\index.ts:225:20)
    at Interface.decodeFunctionResult (\amm-arbitrageur\node_modules\@ethersproject\abi\src.ts\interface.ts:384:23)
    at Contract.<anonymous> (\amm-arbitrageur\node_modules\@ethersproject\contracts\src.ts\index.ts:321:44)
    at step (\amm-arbitrageur\node_modules\@ethersproject\contracts\lib\index.js:48:23)
    at Object.next (\amm-arbitrageur\node_modules\@ethersproject\contracts\lib\index.js:29:53)
    at fulfilled (\amm-arbitrageur\node_modules\@ethersproject\contracts\lib\index.js:20:58)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5) {
  reason: null,
  code: 'CALL_EXCEPTION',
  method: 'getProfit(address,address)',
  errorArgs: null,
  errorName: null,
  errorSignature: null,
  address: ' my contract address',
  args: [
    '0xaeBE45E3a03B734c68e5557AE04BFC76917B4686',
    '0x52AaEF46c9F02dBC45Ce3a55ff2B7057f5aB6275'
  ],
  transaction: {
    data: '0x759eee10000000000000000000000000aebe45e3a03b734c68e5557ae04bfc76917b468600000000000000000000000052aaef46c9f02dbc45ce3a55ff2b7057f5ab6275',
    to: my contract address,
    from: my wallet address
  }
}

Bot Stuck?

When running the bot it seems to only access the base token price. My only output has been as follows. Any idea why this might happen?

Creating Typechain artifacts in directory typechain for target ethers-v5
Successfully generated Typechain artifacts!
2021-05-04 19:51:29 info: Load pairs from json
2021-05-04 19:51:30 info: Start arbitraging
2021-05-04 19:51:36 info: BNB price: $609.99
2021-05-04 20:51:30 info: BNB price: $627.05

Basically just been logging BNB price for twenty hours lol

Install hardhat

Hi
I'm really really new here and no any knowledge about developer skill. now i have ubuntu server and already clone project to my local server. I just need to know how to install hardhat to amm-arbitrageur folder cause the instructor of hardhat need to install in empty folder and i tried to run "npx hardhat with amm-arbitrageur that located any file from github but it's show error like no hardhat to be executed. question is how to install hardhat in amm-arbitrageur and run it.

"Start arbitraging" Waiting

Whats does at mean? ı am waiting about 10 minutes

yarn run v1.22.10m-arbitrageur>yarn run bot
$ hardhat run --network bsc bot/index.ts
Creating Typechain artifacts in directory typechain for target ethers-v5
Successfully generated Typechain artifacts!
2021-05-24 00:08:20 info: Load pairs from json
2021-05-24 00:08:23 info: Start arbitraging

Error in deploy.

When running deploy.ts I get an error about insufficient funds.

Error: insufficient funds for intrinsic transaction cost (error={"name":"ProviderError","code":-32000,"_isProviderError":true}, method="sendTransaction", transaction=undefined, code=INSUFFICIENT_FUNDS, version=providers/5.1.0)

Test failed

I run npx hardhat test and found this problem

1) Flashswap flash swap arbitrage "before all" hook for "do flash swap between Pancake and MDEX": Error: call revert exception (method="getPair(address,address)", errorSignature=null, errorArgs=[null], reason=null, code=CALL_EXCEPTION, version=abi/5.1.0) at Logger.makeError (node_modules/@ethersproject/logger/src.ts/index.ts:205:28) at Logger.throwError (node_modules/@ethersproject/logger/src.ts/index.ts:217:20) at Interface.decodeFunctionResult (node_modules/@ethersproject/abi/src.ts/interface.ts:326:23) at Contract.<anonymous> (node_modules/@ethersproject/contracts/src.ts/index.ts:321:44) at step (node_modules/@ethersproject/contracts/lib/index.js:48:23) at Object.next (node_modules/@ethersproject/contracts/lib/index.js:29:53) at fulfilled (node_modules/@ethersproject/contracts/lib/index.js:20:58) at runMicrotasks (<anonymous>) at processTicksAndRejections (node:internal/process/task_queues:96:5)

这个项目可不可以用到CHI Gastoken

  1. 看到一些bot,有用到chi token用来支付gas费,从而减少很多gas,请问这个代码怎么修改可以做到这点呀.
  2. 类似下面这个bot,成功率很高,请问怎么可以做到提高成功率?
  3. 类似下面这个bot,为什么要先转成busd再转成bnb?
    image

Third pair in swap

Hello. Thank you for your work!

Can you direct me which files I need to modify to add third pair in trading?
like:
token - base | base - base | base - token
token - usdc | usdc - weth | weth - token

I see it should be:
generating pairs than
calculate trading with generated pairs
that trade through three pairs

Thank you for advice.

Hardhat test

hi all
i have a question when i run hardhat test it's show error log below. Who's can tell me how to solve it.
MathTest
#sqrt
1) "before each" hook for "calculate square root correctly with small input"

Flashswap
flash swap arbitrage
2) "before all" hook for "do flash swap between Pancake and MDEX"

Issue with secret.ts

I input my public and private keys both with and without quotes and either way i keep getting the same error. What format should i be using?

Error: network does not support ENS (operation="ENS", network="unknown", code=UNSUPPORTED_OPERATION, version=providers/5.1.0)

Keep showing "Object is of type 'unknown'" error when running bot on mainnet

bot/index.ts:63:13 - error TS2571: Object is of type 'unknown'.

63         if (err.message === 'Too much pending tasks' || err.message === 'async-lock timed out') {
               ~~~
bot/index.ts:63:57 - error TS2571: Object is of type 'unknown'.

63         if (err.message === 'Too much pending tasks' || err.message === 'async-lock timed out') {

Seems it got some unexpected error? Do anyone have any idea how to deal with it?

Edit: by viewing debug logs, it seems to be the problem of cannot estimate gas; transaction may fail or may require manual gas limit, which due to "deprecated token pairs". I wonder is there a good way to know which token pairs are not deprecated?...

"Out of gas" on flashBot.getProfit

Hey!
I'm trying to run the script but i'm getting Out of gas error on the flashBot.getProfit call.
I have coins both in my wallet and in the contract itself

Good script, but hard to make it work

Hi,
I have tried many front-running and arbitrage scripts from Github. I also modified it (use to MySQL to store the spotted potential pairs so that next round I can check in DB if match it can start the arbitrage directly instead of check all again & again).
I also deployed a full node on AWS i3.xlarge instance, I run the script in that VPS. I managed to run the attack just less than 50 mini seconds after the bot spotted an opportunity and fire a transaction to a smart contract written by me. The smart contract will execute the Tx if it check it is profit and revert the transaction if it is not.

Here is the summary I can tell:

  1. When the bot spot an opportunity, let say you can buy BNB cheaper in ApeSwap and sell higher price on Pancakeswap. Current block is 19000, so when you send a transaction now, it will be ALWAYS at least in block 19002 (2 blocks behind because BSC have Min of 2 blocks or 6 seconds confirmation). So the opportunity you spotted on block 19000, you are impossible to send a transaction there (because it already passed at least 6 seconds when your Tx is confirm)

  2. Even you listen to the pending transactions events using Web Socket with web3 (which I done), and repeat the same process, my Tx is ALWAYS at least 10 position behind a spotted Tx. And there is always one Tx that just sit ONE position behind the spotted Tx. Which it is nearly impossible to done by people like us, the most possibility is those running as validator which are able to place and re-arrange the Tx orders when their validate the transactions. You can go and search MEV issues on Ethereum, BSC or Polygon. Because i believe even I upgraded the AWS instance, I still can't win whose guys because all the transactions at the end are being validated on their full node. And surely they already modified their GETH so that they can re-order the TX and place their Tx just any position they like in the block their validating... So no matter how good is your bot, you will never win in the race. The only way you can win is become one of the validator and changing the Tx order on it lolx...

You must think out of the box, or other way to run it. This is what I have experienced and doing research to find out. If anyone interested can contact me at TG @PancakeSwapUniSwapBot and we can discuss more.

Bot is not running properly yet...

Hey first of all, thanks for the code. I was able to deploy the contract and start the bot. the pair file was created and is very extensive. A successful transaction is performed every few hours. so in general it works.However, when I run the bot in debug mode, I can see that it is not running properly.

On the one hand, this error occurs 90% of the time:

2022-07-12 09:01:45 debug: call revert exception; VM Exception while processing transaction: reverted with reason string "Complex number" [ See: https://links.ethers.org/v5-errors-CALL_EXCEPTION ] (method="getProfit(address,address)", data="0x.......00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000.............000000000000000000000000000000000000", errorArgs=["Complex number"], errorName="Error", errorSignature="Error(string)", reason="Complex number", code=CALL_EXCEPTION, version=abi/5.6.4)

(... for parts of my contract adress)

On the other hand, many calculations are simply 0.0 : Profit on CAKE-WBNB: 0.0

lp addresses were generated correctly in the pairs file.

Do you have ideas for the issues? I've tried many things

transaction fail, i cant understand profit

I see a profit between the two pair
profit: 0.059353947220959595
'0x5010dA63eBD45D833258cca1FEFB7715c16708c2', '0x223740a259E461aBeE12D84A9FFF5Da69Ff071dD'

config
minimumProfit: 3, // in USD

I called the flashArbitrage manually
But the transaction went fail
Was the amount of profit small?
How is the loan amount obtained, can it be changed for max profit?

I use bsc network

code:


const tokens = await flashBot.getBaseTokens();
  console.log('Base tokens: ', tokens);

  const res = await flashBot.getProfit('0x5010dA63eBD45D833258cca1FEFB7715c16708c2', '0x223740a259E461aBeE12D84A9FFF5Da69Ff071dD');
  console.log(res);
  const [baseTokens] = getTokens(Network.BSC);
  const netProfit = await calcNetProfit(res.profit, res.baseToken, baseTokens);
  console.log('profit: ', netProfit);

  const lock = new AsyncLock({ timeout: 2000, maxPending: 20 });
  try {
    // lock to prevent tx nonce overlap
    await lock.acquire('flash-bot', async () => {
      const response = await flashBot.flashArbitrage('0x5010dA63eBD45D833258cca1FEFB7715c16708c2', '0x223740a259E461aBeE12D84A9FFF5Da69Ff071dD', {
        gasPrice: config.gasPrice,
        gasLimit: config.gasLimit,
      });
      const receipt = await response.wait(1);
      console.log(`Tx: ${receipt.transactionHash}`);
    });
  } catch (err) {
    if (err.message === 'Too much pending tasks' || err.message === 'async-lock timed out') {
      return;
    }
    console.log(err);
  }
}

result:

Error: transaction failed (transactionHash="0x233", transaction={"hash":"0x233","type":0,"accessList":null,"blockHash":null,"blockNumber":null,"transactionIndex":null,"confirmations":0,"from":"0x555","gasPrice":{"type":"BigNumber","hex":"0x04a817c800"},"gasLimit":{"type":"BigNumber","hex":"0x7530"},"to":"0x4xx","value":{"type":"BigNumber","hex":"0x00"},"nonce":87,"data":"0xba","r":"0x9d","s":"0x5b","v":148,"creates":null,"chainId":56}, receipt={"to":"0x4xx","from":"0x555","contractAddress":null,"transactionIndex":0,"gasUsed":{"type":"BigNumber","hex":"0x7530"},"logsBloom":"0x000000000000000000","blockHash":"0x1","transactionHash":"0x233","logs":[],"blockNumber":7939670,"confirmations":1,"cumulativeGasUsed":{"type":"BigNumber","hex":"0x7530"},"status":0,"byzantium":true}, code=CALL_EXCEPTION, version=providers/5.2.0)
   at Logger.makeError (\node_modules\@ethersproject\logger\src.ts\index.ts:213:28)
   at Logger.throwError (\node_modules\@ethersproject\logger\src.ts\index.ts:225:20)
   at EthersProviderWrapper.<anonymous> (\node_modules\@ethersproject\providers\src.ts\base-provider.ts:1189:24)
   at step (\node_modules\@ethersproject\providers\lib\base-provider.js:48:23)
   at Object.next (\node_modules\@ethersproject\providers\lib\base-provider.js:29:53)
   at fulfilled (\node_modules\@ethersproject\providers\lib\base-provider.js:20:58) {
 reason: 'transaction failed',
 code: 'CALL_EXCEPTION',
 transactionHash: '0x233',
 transaction: {
   hash: '0x233',
   type: 0,
   accessList: null,
   blockHash: null,
   blockNumber: null,
   transactionIndex: null,
   confirmations: 0,
   from: '0x555',
   gasPrice: BigNumber { _hex: '0x04a817c800', _isBigNumber: true },
   gasLimit: BigNumber { _hex: '0x7530', _isBigNumber: true },
   to: '0x4xx',
   value: BigNumber { _hex: '0x00', _isBigNumber: true },
   nonce: 87,
   data: '0xbxxxx',
   r: '0x9xxx',
   s: '0x5xxx',
   v: 148,
   creates: null,
   chainId: 56,
   wait: [Function (anonymous)]
 },
 receipt: {
   to: '0x4xxxx',
   from: '0x555',
   contractAddress: null,
   transactionIndex: 0,
   gasUsed: BigNumber { _hex: '0x7530', _isBigNumber: true },
   logsBloom: '0x000000',
   blockHash: '0x1xxx',
   transactionHash: '0x233',
   logs: [],
   blockNumber: 
   confirmations: 1,
   cumulativeGasUsed: BigNumber { _hex: '0x7530', _isBigNumber: true },
   status: 0,
   byzantium: true
 }
}

The pairs contract does not have a deal but the profit is shown

I saw a profit several times
But the wrong transaction was made
I checked the pair of contracts to see if the pool has a deal
But I saw that many hours had passed since their last deal

Please help me why this profit has been shown but transaction Fail while no transaction was made in the pairs contract

...
...
...

if (netProfit < config.minimumProfit) {
        return;
      }

      log.info(`Calling flash arbitrage ${pair.symbols}, res profit ${ethers.utils.formatEther(res.profit)} *+* net profit: ${netProfit}`);
      try {
        // lock to prevent tx nonce overlap
        await lock.acquire('flash-bot', async () => {

....
....
...

and console log:

2021-06-13 08:52:53 debug: res Profit LINK-WBNB: 0.226815865945103848 **** net profit: 75.86014960343351
2021-06-13 08:52:53 info: Calling flash arbitrage LINK-WBNB, res profit 0.226815865945103848 *+* net profit: 75.86014960343351
network block skew detected; skipping block events

image

image

image

image

error TS2345: Argument of type 'BigNumber' is not assignable to parameter of type 'BigNumberish'

i get this error when try to test

``
npx hardhat test
Creating Typechain artifacts in directory typechain for target ethers-v5
Successfully generated Typechain artifacts!
An unexpected error occurred:

test/AccessControlTest.ts:45:39 - error TS2345: Argument of type 'BigNumber' is not assignable to parameter of type 'BigNumberish'.
Type 'import("/root/Desktop/amm-arbitrageur/node_modules/@ethersproject/bignumber/lib/bignumber").BigNumber' is not assignable to type 'import("/root/Desktop/amm-arbitrageur/node_modules/ethers/node_modules/@ethersproject/bignumber/lib/bignumber").BigNumber'.
The types returned by 'toBigInt()' are incompatible between these types.
Type 'BigInt' is not assignable to type 'bigint'.

45 await weth.mint(flashBot.address, wethAmount);
~~~~~~~~~~
test/AccessControlTest.ts:58:59 - error TS2345: Argument of type 'BigNumber' is not assignable to parameter of type 'BigNumberish'.

58 expect(wethBlanceAfter).to.be.eq(wethBlanceBefore.add(wethAmount));
~~~~~~~~~~
``

transaction failed

Hi,
I have this issue when the bot tryies to make an arbitrage
transaction failed (transactionHash="0x3ee297138a54934523064664b92fe10365df7f3e7f15443735da6e65bb3d52cc", transaction={"hash":"0x3ee297138a54934523064664b92fe10365df7f3e7f15443735da6e65bb3d52cc","type":null,"accessList":null,"blockHash":null,"blockNumber":null,"transactionIndex":null,"confirmations":0,"from":"0x7eA23185A79895fE4717d050Ae18AcA6da1934DC","gasPrice":{"type":"BigNumber","hex":"0x02540be400"},"gasLimit":{"type":"BigNumber","hex":"0x0493e0"},"to":"0x9b41E94846B73a983f76601Fb8d285f78ba59A15","value":{"type":"BigNumber","hex":"0x00"},"nonce":120,"data":"0xbaee64f10000000000000000000000000aa4b9be1dbb8cbca7bbddddb4f30894b1afe85b000000000000000000000000229e9f691ed34cf4cb706fae7bf65aeb9020e329","r":"0xd59eec24cf9e3f47d0f3db34937d47ff68204b006d83bf0c09ce3e609cf11203","s":"0x02ad5c73f62763de3d18754f0031f086428a32432b07bf4410a3acd9273f3111","v":147,"creates":null,"chainId":56}, receipt={"to":"0x9b41E94846B73a983f76601Fb8d285f78ba59A15","from":"0x7eA23185A79895fE4717d050Ae18AcA6da1934DC","contractAddress":null,"transactionIndex":10,"gasUsed":{"type":"BigNumber","hex":"0x012c17"},"logsBloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","blockHash":"0xa8832e56440749f085fa5459bc4a55f0835d6ca4fae6d211d96c61f83339a1d7","transactionHash":"0x3ee297138a54934523064664b92fe10365df7f3e7f15443735da6e65bb3d52cc","logs":[],"blockNumber":7128396,"confirmations":2,"cumulativeGasUsed":{"type":"BigNumber","hex":"0x18e321"},"status":0,"byzantium":true}, code=CALL_EXCEPTION, version=providers/5.1.0)
Could you help me with that please ?

TypeError: Fallback function cannot take parameters.

Compiling 12 files with 0.7.0
contracts/FlashArb.sol:228:53: TypeError: Return values for fallback functions are not yet implemented.
fallback(bytes calldata input) external returns (bytes memory) {
^------------^

contracts/FlashArb.sol:228:13: TypeError: Fallback function cannot take parameters.
fallback(bytes calldata input) external returns (bytes memory) {
^--------------------^

Error HH600: Compilation failed

Formula for optimal in incorrect, doesn't pass simple test.

I've made a simplest python test based on the formulas here:

import math as m

r01_0 = 10*10**9
r01_1 = 10*10**9
r10_0 =   5*10**9
r10_1 =  15*10**9


a1 = r01_0
b1 = r01_1

a2 = r10_0
b2 = r10_1

a = a1 * b1 - a2 * b2
b = 2 * b1 * b2 * (a1 + a2)
c = b1 * b2 * (a1 * b2 - a2 * b1)

m_ = b**2 - 4 * a * c

sqrtM = m.sqrt(m_);

x1 = (-b + sqrtM) / (2 * a);
x2 = (-b - sqrtM) / (2 * a);


if x1 > 0 and x1 < b1 and x1 < b2:
    amount = x1
else:
    amount = x2

print( f'opt_in: {amount:.2f}')


def getAmountOut(
    amountIn,
    reserveIn,
    reserveOut
):
    amountInWithFee = amountIn * 997
    numerator = amountInWithFee * reserveOut
    denominator = (reserveIn * 1000) + amountInWithFee
    amountOut = numerator / denominator
    return amountOut

amountz1 = getAmountOut(amount, r01_0, r01_1)
amountz2 = getAmountOut(amountz1, r10_0, r10_1)


print("amnz out: ", amountz1)
print("amnz out: ", amountz2)

pr = amountz2 - amount
print("profitz: ", pr)


print("[!!] verifying +")
print("if amounts were higher by 1000, the profits should be less!")
print("profits are...")

amountz1 = getAmountOut(amount+1000, r01_0, r01_1)
amountz2 = getAmountOut(amountz1, r10_0, r10_1)
pr = amountz2 - (amount+1000)

print(f"...{pr}")

print("[!!] verifying -")
print("if amounts were lower by 1000, the profits should be less!")
print("profits are...")

amountz1 = getAmountOut(amount-1000, r01_0, r01_1)
amountz2 = getAmountOut(amountz1, r10_0, r10_1)
pr = amountz2 - (amount-1000)

print(f"...{pr}")

Output of this:

opt_in: -176602540378.44
amnz out:  10602145808.88565
amnz out:  10183149306.464203
profitz:  186785689684.90808
[!!] verifying +
if amounts were higher by 1000, the profits should be less!
profits are...
...186785688686.02304
[!!] verifying -
if amounts were lower by 1000, the profits should be less!
profits are...
...186785690683.79312

got stuck in function getProfit

yarn run v1.22.10
warning ../package.json: No license field
warning ../../../package.json: No license field
$ hardhat run --network bsc bot/index.ts
Creating Typechain artifacts in directory typechain for target ethers-v5
Successfully generated Typechain artifacts!
(node:51798) ExperimentalWarning: The fs.promises API is experimental
2021-06-16 04:01:32 info: Load pairs from json
2021-06-16 04:01:35 info: Start arbitraging
2021-06-16 04:01:39 info: BNB price: $365.58

I noticed that, every time i call the function getProfit, there will be:
2021-06-16 04:07:29 info: cannot estimate gas; transaction may fail or may require manual gas limit (error={"name":"ProviderError","code":3,"_isProviderError":true,"data":"0x08c379a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000154e6f206261736520746f6b656e20696e20706169720000000000000000000000"}, method="call", transaction={"from":"0x343CEBd1E7D1A6838CD8b82f6238B29ad78e235E","to":"0xf53da1c2694b16692957d8c86212f4C45d472f32","data":"0x759eee10000000000000000000000000e7cc44de50b54906a9c1c48240650be2766481fc000000000000000000000000408d46d0f351f51ebc15e466aa897e5e0f5d2060","accessList":null}, code=UNPREDICTABLE_GAS_LIMIT, version=providers/5.3.1)

Question on formula

Hi,

Can you elaborate on where the first set of formula's come from: \delta a_1 = \delta b_1 * a1 / (b_1 - \delta b_1) ?

Thanks!

Ygor

自己本地搭建BSC节点套利

如果我是自己搭建BSC网络的节点,那么服务器的区域选择有差别吗?比如东京阿里云和香港阿里云,只要我的套利程序跟自建的BSC节点在一台服务器上,跟服务器的地理位置应该没啥关系吧?

Couldn't find ethers-v5

Hi all,
i am trying to deploy this project but i get this error

``
Creating Typechain artifacts in directory typechain for target ethers-v5
An unexpected error occurred:

Error: Couldn't find ethers-v5. Tried loading: @typechain/ethers-v5, typechain-t arget-ethers-v5, /root/Desktop/amm-arbitrageur/ethers-v5.
Perhaps you forgot to install @typechain/ethers-v5?
``

i have already do
npm i @typechain/ethers-v5 npm i typechain-target-ethers-v5

Withdrawing Profits?

Hey,
Thanks for the awesome project!

I've modified the bot a bit to increase chances of profit.
It did report a profit of +$100 and showed a transaction hash.
But I can't find the money anywhere.
The contract value on bscscan is saying $0.01.

I tried creating a simple script:
const res = await flashBot.withdraw(); const receipt = await res.wait(1); log.debug(Transaction: ${receipt.transactionHash});

But nothing is received, not even a transcation hash.

Any idea what could the problem be?

deployer address

deploy.ts 中 const flashBot = await FlashBot.deploy(deployer.address) 的 deployer.address 我填写的是自己的钱包地址,
看到 flashbot.sol中,这个地址应该是 weth(wbnb)的地址
constructor(address _WETH) {
WETH = _WETH;
baseTokens.add(_WETH);
}
是否存在问题?

fallback return value "bytes memory" isn't asigned,

fallback(bytes calldata _input) external returns (bytes memory) { (address sender, uint256 amount0, uint256 amount1, bytes memory data) = abi.decode(_input[4:], (address, uint256, uint256, bytes)); uniswapV2Call(sender, amount0, amount1, data); }

would this be a solution?

fallback(bytes calldata _input) external returns (bytes memory) { (address sender, uint256 amount0, uint256 amount1, bytes memory data) = abi.decode(_input[4:], (address, uint256, uint256, bytes)); uniswapV2Call(sender, amount0, amount1, data); return data; }

Logger and pair order

Hi I’ve really enjoyed this repo and learned a lot from playing with it. I had two questions about things I haven’t quite figured out. One is that I see a lot of pictures in issues of the logger, how do I access that log page while running the bot. I’m a scrub. Also, an error I’ve received a lot of on Matic specifically is “wrong pair order” and while I see this in the contract I’m not sure I can really figure out why it happens. Appreciate the repo immensely it basically taught me how to use ethers library which has been amazing.

代码笔误

Flashbot.sol line 313 应该为 int256 a = a1 * b1 - a2 * b2; ???

请问要怎么调用withdraw呀

当前我用we3.py包来用Python调用这个合约,想withdraw,当时因为它的合约没有验证,所以abi显示不出来,我就在python里面创建不了contract对象,接着无法调用withdraw了。

作者您好,请问怎么调用withdraw呢? 可以写个加个withdraw功能在github的bot里面,或者web3.py版本的脚本?
可以大概讲一下

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.