Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Crypto Trading on DMITCryptEx NOTE: you do not have to know anything about cryptocurrency or Ethereum to complete this assignment. Cryptocurrency ( crypto ) trading
Crypto Trading on DMITCryptEx
NOTE: you do not have to know anything about cryptocurrency or Ethereum to complete this assignment.
Cryptocurrency crypto trading has become more mainstream over the past few years. Ether ETH is one of the betterknown cryptocurrencies, and provides a lowerrisk crypto exposure vehicle for new crypto investors. ETH is backed by a lively community and the technology used to support it can be harnessed to develop decentralized applications using the Ethereum network. However, most folks are simply interested in holding the ETH cryptocurrency as an investment that may appreciate or earn rewards from staking and ETH Investment Strategies: Staking vs Speculation.
The centralized exchange DMITCryptEx would like to explore the option of providing a CLI application for their clients to execute trades. The initial proofofconcept will allow a client to execute a trade to purchase ETH and optionally, to stake their ETH. DMITCryptEx will charge clients a commission fee varies depending on the amount of ETH they purchase on all trades and they offer a staking reward rate of on all staked ETH.
Requirements
The program will need to prompt the user for several inputs, namely:
The fractional amount of ETH the user would like to purchase must be greater than zero
Whether the user would like to stake their ETH or not
The program will need to simulate the spot price for ETH. Generate a random value between $ and $ to simulate the current ETH price. The simulated price only needs to be generated once during the program's execution. NOTE: For testing purposes, you may set the cost for ETH to a fixed amount. Ensure your final submission makes use of the generated value.
The program will apply a commision charged by the centralized exchange to the trade using the following table:
tableETH Purchased,Commission Rate
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started