Earlier quoted context omitted.
A lot of these contracts, and especially those owned by first-tier cryptocurrency companies, are reviewed by 3rd party auditors. Of course that doesn't completely remove the risk, but certainly at least ensures that no obvious bugs are missed.
Do you have some sources for this claim? Or just a belief?
Uniswap: https://uniswap.org/audit.html
Sushi Swap: https://github.com/peckshield/publications/blob/master/audit...
Alpaca Finance (high complexity in my opinion): https://docs.alpacafinance.org/transparency
A lot of projects provide their source and you can verify that what you're interacting with matches the source.