It seems flawed to assume that he was the mastermind, especially given the actual outcome.
There is a lot of room for manipulation in the justice system in determining the hierarchy and who gets to be offered a sweet deal. Had Caroline been labeled by the media as 'the mastermind' and Sam as 'the help' by the media, the outcomes may have flipped.
The media could totally construct a story where Sam was just the helpless front guy who knew nothing, misled as to the source of the money which Alameda Research was providing.