So since no money is exchanged it’s legal?
I think what really makes it legal is there is no way to enforce a "contract".
You and I can promise to vote for particular candidates, but in the end there's no way to force you to vote as promised, and vice versa.
So, it's just two guys talking sh**.