Skip to content
uniswap / Bilaxy arbitrage with haskell
Haskell
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci
app
src/Potato
test
.gitignore
.stylish-haskell.yaml
ERC20.json
LICENSE
LICENSE.txt
README.md
Setup.hs
TODO.txt
package.yaml
potatotrader.cabal
stack.yaml
stack.yaml.lock
uniswap.json

README.md

CircleCI

Potato Trader 🥔🥔🥔

Potato Trader is a trading library written in Haskell created for the purpose of bot trading shit coins.

Exchanges and tokens are encoded at the type level to help enforce sensible trading compile time.

For example a token on an exchange is defined by

class (Token t, Exchange e) => ExchangeToken t e

a trading pair is thus

class (ExchangeToken t1 e, ExchangeToken t2 e) => ExchangePair t1 t2 e

and given 2 trading pairs, we can arbitrage

arbitrage :: (ExchangePair t1 t2 e1, ExchangePair t1 t2 e2) => ...

Potato Trader currently supports the following trading algorithms:

  • arbitrage
  • market maker (needs testing)

And supports the following exchanges:

  • Uniswap (on any Web3 compatible blockchain)
  • Bilaxy

Once an exchange is implemented, supported tokens and trading pairs must be (easily) added in code to support trading with type safety.

Some planned features that aren't implemented yet:

  • accounts are currently read unencrypted from a file directly inside the library. This is solved with ExchangeAccount type family but it hasn't been fully integrated yet
  • better test cases for effectful code using test-fixture
    • note that the current tests require a key file and communicate with live exchanges D:
You can’t perform that action at this time.