# Altoros Protofire DApp Test
## Goal
Create a smart contract that lets people buy or sell a `TOK` token from it for a certain price. This contract should hold the total amount of tokens received in exchange for all bought `TOK` tokens. The token to be used for payment may be DAI, USDC or any other USD-stable ERC20 token.
Develop a dapp that lets you interact with this smart contract. You are free to do it however you want, but at the very least you should include a way for the user to see their balance, and the buy and sell functionalities.
Extra points (not required):
- Make it work in any network
- Make each action clickable. When you click it, you are taken to the etherscan page for the transaction that triggered the buy or sell operation.
- Make the token price vary with the amount of tokens already sold. Read [this blogpost](https://medium.com/linum-labs/intro-to-bonding-curves-and-shapes-bf326bc4e11a) for ideas.
Feel free to ask any clarifying questions you may have.
You can get rinkeby Ether and tokens by following [this guide](https://teller.gitbook.io/rinkeby-faucets/rinkeby-dai).
## Stack
The only requirements are to use React for the frontend and Solidity for the smart contract. Everything else is up to you.
We recommend:
- Sticking to known-safe smart contract libraries.
- Using [this boilerplate](https://github.com/protofire/web3-react-boilerplate), which hosts a minimal working dapp with react, web3-react and ethers.js.
## Submitting solution
* After reading and analyzing this, please provide an estimation of how many days you will think it will take you to do this.
* Create a Github repo, give Profotire team access and commit new code as usually, this is part of the evaluation process.
* Let Protofire know once work is completed.
## Expectations
This is the list of things Protofire expects from your submission:
- It should work, of course. "Work" here means "it does what we asked". It's your responsibility to be sure that you understand what we want. Ask questions if you have to!
- It should have instructions on how to run it.
- Follow the same process you would use if this was a real project. It's up to you what this means, but at the very least aim for good commit messages.
- You should understand as much as possible what you did and how it works. This is unbounded, so use your own judgement. We don't expect you to be an expert, but avoid things that "just work, I don't know why".