That's not how it works lmao. You can't just trade your house for $0 to your friend and agree that there's no tax to be assessed. The government has its own opinion on the fair market value that they use.
Otherwise EVERYTHING would be "valued" at $0 right before it's sold and then people would "gift" the sale amount to dodge taxes. The IRS isn't dumb.