I am new to programming smart contracts in solidity, My goal is just to learn how a mobile app interacts with the block chain. I am currently building my own smart contract and ERC-20 Token as a project to better understand blockchain and specifically the Ethereum blockchain. I have been following the courses Dapp University has to offer.
And my question is in solidity how do I calculate a proper dynamic exchange rate. In the course it is a static rate 1 ETH = 100 Dapp but I know in the real world that is not how that works since the USD value of every Cryptocurrency is always changing and thus the exchange rate even from 1 Token to another Token has to change all the time aswell. So how is this calculated and deployed?
Edit: spelling errors