Goldman's sales and its clandestine wagers, completed at the brink of the housing market meltdown, enabled the nation's premier investment bank to pass most of its potential losses to others before a flood of mortgage defaults staggered the U.S. and global economies.