Subpanel neutral wire sizing and protection
I was wondering what protects the neutral wire feeding a subpanel from over amperage draw? Near as I can tell, the only circuit breakers are on the two 'hots' in the main panel, thus it would seem that they are providing this protection? After giving this a little thought, it seems that the neutral wire feeding the subpanel should be twice the amperage rating of each ‘hot’ feeding the panel?
Here's a specific example for this question: a 50 amp subpanel is wired next to the main panel using #6 copper and a 50 amp breaker in the main panel. The subpanel is wired with eight 20amp 120volt branch circuits, each protected with a 20amp breaker. The 20amp breakers are set up in the subpanel with four on each 'hot' feed coming from the main panel. I believe that 50 amp breaker in the main panel allows EACH hot wire to pass 50 amps of current before tripping (that is to say, two 50 amp single pole breakers are 'ganged together' at the factory for this purpose). Now the question: in the subpanel, if each of the eight 120volt branch circuits were to draw 10 amps at the same time I believe the 50amp breaker in the main panel would NOT trip as each 'hot' is only drawing 40 amps. However, the neutral (which is servicing both ‘hots’ for 120volt wiring) would be carrying an 80amp load? (which would be bad using 6 gauge wire :-)
My first question, is my logic all catawampus in some way, have I missed something obvious in this supposition?
Second, if this is the case, should the neutral wire feeding the subpanel be gauged for twice the amperage of each ‘hot’ wire feeding the subpanel?
And third, if my logic is sound, has this been addressed by someone already (the national electric code or similar)?
Thanks in advance for any thoughts you may be able to offer.