ArbMachine — By CyberTrade

Vincent
5 min readJun 24, 2022

www.ArbMachine.io

ArbMachine — Whitepaper

Abstract.

Arbitrage is the practice of taking advantage of the difference in prices in two or more markets; striking a combination of matching deals to capitalise on the difference, the profit being the difference between the market prices at which the unit is traded. — Wikipedia.

ArbMachine is a fully decentralised application (dApp) that performs arbitrage trading across decentralised cryptocurrency exchanges (e.g. Uniswap and Sushiswap).

As such, the ArbMachine is a financial instrument of the Decentralised Finance (DeFi) sector of the blockchain, a sector which delivers financial instruments without relying on intermediaries such as brokerages, or banks by using smart contracts.

This white paper describes how arbitrage is implemented across Decentralised Exchanges (DEX) of the blockchain and how the ArbMachine is able to work, without requiring trading funds.

Cryptocurrency CeFi nd DeFi explaned

It is ironic that the ‘killer app’ of the (decentralised) blockchain has been the ‘centralised’ (CeFi) cryptocurrency exchange. Exchanges such as Binance, Coinbase, Huobi, etc, have trading columes measured in $ billions, per day. Such CeFi exchnges ‘broke the rules’ of the decentralisation movement. They established centralised databases and centralised organisations. With that centralisation came arbitary rules, restrictions, onerous know your customer (KYC) requirements, and loss of privacy for innocent retail traders.

In 2018, Haden Adams created a decentralised exchange called Uniswap. This exchange provides a decentralised protocol for the exchange of cryptocurrencies and tokens. The protocol runs on the blockchain itself (unlike centralised exchanges) and is opensource. The opensource software can be freely ‘forked’ to create additional exchanges (e.g. Sushiswap, pancake swap, ApeSwap and others). Furthermore, changes to the protocol are democratically voted on by the owners of the native cryptocurrency governance token UNI, and then implemented by a team of developers. As a result, The the uniswap protocol has been embraced by the Decentralised Finance (DeFi) sector and Uniswap has become one of the largest and certainly the most influencial of all cryptocurrency exchanges.

ArbMachine

The ArbMachine is designed as a decentralised arbitraging trading bot (software robot), operating on the blockchain. The ArbMachine ‘smart contracts’ to avoid depending upon intermediaries. The bot operates 24 hours a day x 365 days per year.

The Flash Loan Arbitrage bot has two primany components:-

  1. Detection of profitable arbitrage opportunities
  2. Execution of arbitrage trades

Detection is handled by a ‘scanner’ component, which is able to detect a difference of price between say the Eth/Btc pair on Uniswap and the price of the Eth/Btc pair on Sushiswap. (Two DEX running on the Ethereum main net).

The scanner is responsible for determining profit by taking into consideration. exchange trading fees, interest on the flash loan and network transaction fees (e.g. Gas).

The scanner is also responsible for determing the ‘optimum’ size of the trade, taking ‘slipage’ into account.

Typically, about 50% of the profit available will be consumed by the various costs, leaving approx 50% available as net profit.

Each profitable trading opportunity is notified to the execution component.

The execution component uses ‘smart contracts’ to coordinate the trading activity as follows:-

  1. Request a loan from a DeFi Flash Loan Provider (e.g. dYdX)
  2. Receive the loan amount.
  3. Send the the ‘arb for’ currency (e.g. wrapped Ethereum, wETH) to exchange A
  4. Receive the ‘arb against’ currency (e.g. btc) [wEth exchanged for btc]
  5. Send the btc to exchange b, to exchange if back to wEth
  6. Receive the wEth amount from exchange B
  7. Repay the flash loan to the provider
  8. Store the net profit

The smart contract arranges the above steps so that they are all performed in a single (multi-step) blockchain transaction. The single transaction aspect also provides the necessary assurance and protection for the flash loan provider.

The resulting profit is stored ready for distribution to the investor/users.

No trading funds required!

The most remarkable aspect of the Flash Loan Arbitrage Bot is that investor/users do not contribute any funds for trading. When the arbitrage bot requires funds, it simply acquires them from one of the DeFi flash loan providers! This is ‘Blockchain magic’.

Because the loan duration’ is so short (a single blockchain transaction), the interest payable on the loan is absolutely minimal. Typically it is much less than the ‘trading fees’ charged by the DEX.

Decentralised Exchanges Ecosystem

By design, the ArbMachine works with a growing ecosystem of (blockchain native) decentralised exchanges (DEX).

Because the DEX are ‘blockchain native’ most adhere to de-facto standard blockchain protocols. This means that it is fairly simple to enhance the arbitrage bot to execute across multiple DEX.

Given that each DEX provides numerous trading pairs, there are a huge number of traiding pairs to scan to find arbitrage opportunities.

Triangular Arbitrage

In addition to the ‘simple’ arbitrage pattern illistrated above, the arbitage bot will also habdle triangular arbitrage which arbitrages between three curency pairs. This can be accomplished either within a single exchange or across exchanges.

New Trading Experience

The ArbMachine is intended to make arbitrage trading become a largely invisible, automated process. Once the arbitrage bots are deployed they will operate in a ‘fire-and-forget’ mode, generating profits and storing them, ready for distribution.

Tokenomics

The token of the ArbMachine project is the ArbM token which is a governance token. The token provides community membership, voting rights and profit sharing rights.

The Arb token will be listed on Uniswap and may be freely traded.

Social Links:

--

--

Vincent

IT Professional, active in software design/development, Agile delivery of CryptoCurrency and CRM projects.