This is highly alpha code. Do not use it or you will lose all your money. We'd like to thank Little creatures for being the first company to test Mr. Market and for helping with QA.
Mr Market is a CeFi crypto bot and the reference exchange oracle for Hu Fi. Mr Market has three main functions
- An automated crypto bot that supports a variety of strategies for arbitrage across CeFi exchanges.
- Hu Fi Market Making via the human protocol
- A front end where users can contribute funds to increase the ability to do Hu Fi market making.
The crypto markets are characterized by their fragmented markets, where each cryptocurrency product on every exchange often requires its own market-making. Some products are quoted in USD, USDC, USDT, or even foreign currencies. In essence, each crypto exchange has an isolated order book for each trading pair. In addition, derivative and future products are also disjointed. This differs from traditional markets, which have regulated, centralized market-making where the futures markets are well hedged. In the crypto sector, each product must manage its market-making independently in a one-off manner on each exchange it launches on. Market making is a lucrative industry but it’s currently only available to the largest crypto actors and the average crypto user has no way to participate. Projects create one off agreements between market makers potentially with a subset of the exchanges they trade on. Recently DeFi markets have allowed for some programmatic market making directly from solidity but they represent a tiny fraction of the overall crypto market.
HuFi introduces a decentralized approach to market-making, enabling anyone with tokens and code to programmatically engage in market-making on any centralized exchange using Solidity. The code for market-making can be directly embedded in the crypto product itself, or externally with a sidecar market-making product. Additionally, anyone with exchange keys and the ability to run a bot can now become a market maker safely and transparently. Finally, anyone with excess crypto funds can earn income by providing it to the bot to generate yield on this excess crypto.
HuFi utilizes the Human Protocol to ensure fair compensation for market makers. By leveraging the same smart contract framework and infrastructure already in use for various applications, including machine learning, market makers can trust that they will receive timely and fair payment. This trust is reinforced by the use of the same Escrow Factories, which have a proven track record of reliably disbursing payments to individuals involved in machine learning labeling tasks for years.
The frontend user interface for Mr. Market on Mixin.
Install dependencies with yarn
npm install
npm run dev
If you're using bun:
bun dev
npx playwright install-deps
npx playwright install msedge
Unit testing
npm run test:unit
E2E testing
npm run test:e2e
-
Click
button to deploy server on railway. It's possible that the
Trial Plan
of railway doesn't have enough memory to run the server. We suggest to upgrade. -
Click
button to deploy interface on vercel, fill the environment variables from railway deployment and mixin keystore. If you don't have a mixin keystore already, go to Mixin developer dashboard to get one.
The backend server for Mr.market.
Install dependencies with yarn
yarn
yarn start
yarn test
- Nest.js - Backend API framework
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
This project is licensed under the GNU Affero General Public License - see the LICENSE.md file for details
"Data provided by CoinGecko",