I have a question, how are addresses for users created on an exchange? As a subaddress or as a new wallet?
If you take an example like LocalMonero, how are the addresses made there?
how are addresses for users created on an exchange?
An exchange can use many ways to create addresses for users. Typically they'll either create subaddresses or integrated addresses using the wallet RPC commands create_address or make_integrated_address respectively. Addresses can of course be created without the wallet RPC, in any language, so long as they follow the correct format.
If you take an example like LocalMonero, how are the addresses made there?
LocalMonero uses subaddresses for hosted wallets, most likely created using the wallet RPC create_address.