ProofSuite / OrFeed

DeFi & Distributed Data Service Aggregator
https://www.orfeed.org
Apache License 2.0
242 stars 153 forks source link

Arbitrage and Triangular Arbitrage Calculator #57

Closed mikedeshazer closed 4 years ago

mikedeshazer commented 4 years ago

Bancor was recently added as a price oracle to the OrFeed ecosystem. Currently, you can get the Uniswap (Buy and Sell), Kyber (Buy and Sell) and Synthetix (Buy and Sell), as well.

One of the greatest benefits of OrFeed is for Arbitrage discovery. Additionally, users can add their own oracles to the registry, so it is expandable. This is also why it's difficult to test OrFeed off-mainnet... there are over 50 contracts that OrFeed currently relies on and the number is constantly growing as oracle providers grow.

We are seeking a simple function that can take an array of 2 or 3 token symbols (strings), leverage OrFeed to convert those strings into token addresses, and then compare across Uniswap, Kyber and Bancor (using orfeed's getExchangeRate method) to determine the closes spread (or arb profit) between the pairs (returning a string array of the trade order swap platform, an address order of the order that tokens are being swapped, and the spread integer).

You can test exchange rates on the site here: with https://www.orfeed.org/explorer

For buying, the venue should be either "BANCOR", "BUY-KYBER-EXCHANGE" or "BUY-UNISWAP-EXCHANGE". For selling, the venue should be wither " BANCOR", "SELL-KYBER-EXCHANGE" or "SELL-UNISWAP-EXCHANGE"

Here is the triangular calculation algo workflow: https://www.investopedia.com/terms/t/triangulararbitrage.asp

We can also provide ETH for testing on Mainnet (Qualifier: you have completed one other project on Gitcoin or have a robust Github commit history).

For any questions or comments, please feel free to drop into our Discord chat: https://discord.gg/byCPVsY

gitcoinbot commented 4 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


This issue now has a funding of 0.2 ETH (49.62 USD @ $248.1/ETH) attached to it as part of the ProofSuite fund.

gitcoinbot commented 4 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work has been started.

These users each claimed they can complete the work by 2 months from now. Please review their action plans below:

1) mul1sh has started work.

I have a good understanding of what needs to be done, so will implement the required functionality in the next few hours. 2) aranhaagency has started work.

I would love to work on this issue. 3) arun0930 has started work.

HI ARUN CHUEASANGA ASASCDW DSVCWSFSDC 4) jmlon has started work.

I will implement the simple arbitrage first trying pairs of symbols. Then, extend the algorithm to the full triangular case. I plan to do an initial version using only the web3 library. 5) smile4me1974 has started work.

learn how to do all this in one night and not lose my dang mind...

Learn more on the Gitcoin Issue Details page.

gitcoinbot commented 4 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work for 0.2 ETH (53.85 USD @ $269.23/ETH) has been submitted by:

  1. @jmlon

@mikedeshazer please take a look at the submitted work:


gitcoinbot commented 4 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


The funding of 0.2 ETH (53.13 USD @ $265.65/ETH) attached to this issue has been approved & issued to @jmlon.