Is Vote Swapping Legal?

Yes!!

Vote swapping is protected by the First Amendment

During the 2000 election, the California Secretary of State shut down a vote swapping website, claiming it violated various state election regulations. Another site also shut itself down as a result. They took their case to court, and finally in 2007, a US Federal Appeals Court ruled that vote swapping was fully protected by First Amendment and cannot be made illegal by state law.

In the 2016 election, numerous vote swapping websites were functioning without any threat of legal action. Vote swapping is also common practice in the UK and in many other countries.

Selling your vote, however, is definitely illegal

Under Title 18 of the US Code, chapter 29, code no. 597, whoever makes or offers to make an expenditure to any person to either vote or withhold his vote, or to vote for or against candidates, and whoever solicits, accepts or receives any such consideration for his vote or withholding his vote shall be fined under this title or imprisoned not more than one year or both, and if the violation was wilful, shall be fined under this title for not more than 2 years or both.