right so is there a penalty if your caught buying a firearm to a felon?
IANAL, but:
Buying a firearm for a known felon (or otherwise prohibited individual)? -- felony
Buying a firearm for as a gift somebody who happens to be a felon? (not reasonably known by you at the time) -- probably depends on the prosecutor and your relationship with the felon, i.e. whether you would actually be purchasing a gift for somebody and not know that they are a fellon (or are otherwise prohibited)
Selling a firearm to somebody who happens to be a felon? (not reasonably known by you at the time) -- likely depends on the prosecutor, but generally not a felony