It’s self-healing magic. Corrosion can be prevented by using stainless steel joist hangers, fasteners, etc. Stainless steel is available in different grades, like many things. The best is 316 ...