(Work in progress) Basic backend for a cryptocurrency exchange using a created ERC20 (PresetMinterPauser) token
- Change Price
- Set ask and bid price
- Get lowest ask price
- get spread
- market buy/sell tokens
The exchange offers a base rate unless there a worse deal in the bid/ask price (to simulate a spread)
Eth-brownie should be installed. Please visit their documentation to get a full picture of how to install it.
Previously tested on rinkeby (in Remix)
- Add a reset function, to save time via not needing to re-deploy the contract
- Create mock contracts that are in the specified test states already, to save time ...
- Prompt for approval to transfer a base amount of input token, instead of manually approving
- Add extra exchange functionality such as (more tokens, limit orders, volume etc.) ...