4 random IVs are passed directly from the parents to the child. Of these 4, 2 will always be the highest possible value and 2 may be chosen by Braces.
2 are averaged.
this line is misinterpreted a lot. this doesn't mean it will chose your non braced 31's. it will pick a stat at random, lets say special defense, and there have the highest possible value, since your 31 was on def and not special def you got screwed