It could actually be illegal if it would turn out to be a scheme for evading tax payments. For example I think you can not simply start exchanging goods for services and quit paying taxes because you don't make money - somehow you have to make a statement to the tax office.
Try this on for size: if someone offers to trade me a week of their time for a week of my time (do NOT do this, please, as it makes little sense for me and even less for you), and I say yes, then I have a legal obligation to a) declare the fair market value of your time as income I received for services and b) file a form with the IRS saying that I paid you something of value equivalent to my usual consulting rate for the week. You then get taxed at your usual rate on that implied income, despite no dollar changing hands. (That would almost certainly be several thousand dollars in taxes.)