One way is to write software for each cryptocurrency as you suggest.
A lot of it would be reusable code as you can just interface via RPC with your wallets.
Another way is to use a wallet that supports multi currencies and then interface with that wallet.
But lets examine what really is required
depostis
- those are essentially free as all you need is an address that you control. You can either create a list of addresses in advance and then use those whenever a user requests, or you can write code that creates these addresses. Now a lot of cryptos use the same elliptic curve therefore private keys can be reused across cryptocurrencies and you just create the appropriate addresses. Now of course you dont want your private keys online, so again pre-creating lists of deposit addresses makes sense
withdrawals
- here all you have to do is be able to compose a valid transaction, sign it and put it on the appropriate network. This work will be the same for a lot of cryptos.
In the end i believe that exchanges do run wallets for each crypto they deal with, it helps with staying up to date with the chain, to spot re-orgs, and of course to interface with that particular cryptocurrency
This is just conjecture of course, i have never built a crypto exchange myself 🙂












