Should I enter a sham marriage or not?

The husband has to contest paternity within some time limit, perhaps within a year of the birth of the child. Once that time is up, then he’s the legal father, whether or not he’s the genetic father.

Look at it like adoption. If a couple adopts a child, then divorces, the non-custodial parent is responsible for child support for that child. You can’t get a DNA test that proves you’re not the genetic parent of the child to get out of child support, your genetic relationship to the child is irrelevant. You are the legal parent, period.

So if your wife gets pregnant by another man, you’ve got to deny paternity right away. If you fail to contest paternity then you’re the legal parent forever.