So long as it is not financed by campaign donations and is not tied to any specific voting requirement, it doesn't seem to violate any laws.
Buying votes is illegal. However, the wording on it is that one may not pay someone "either to vote or withhold his vote, or to vote for or against any candidate". So long as the funds are not issued on condition of promising to vote for Yang, and have an equal opportunity go to someone who doesn't currently support him as to one who does, then it doesn't run afoul of this.
It's certainly a viable tactic to make someone like the candidate more, but so long as there are no political strings attached, it seems valid.
Compare to the wording against vote buying with congressional appropriations, which prohibits "interfering with, restraining, or coercing any individual in the exercise of his right to vote at any election."
First of all, it's entirely possible that Yang will be paying this out of his own personal funds. If so, then it would be unrelated to his campaign funding, but the laws on gift taxes would apply. The per-year limit to a given person is currently $15,000, though, so giving 10 people each $12,000 won't trigger any taxes (which Yang would be responsible for, anyway).
As for using campaign funds directly, I couldn't find anything on the FEC's website for candidates which explicitly covers this. The closest might be the rules around personal use, which seems to be a catch-all. With a few exceptions, "if the expense would exist even in the absence of the candidacy or even if the officeholder were not in office, then the personal use ban applies."
It's unclear whether giving away money would be considered personal use of the recipient (which is banned) or whether it would be fulfilling a campaign promise, and thus a campaign activity (and thus permitted). The FEC would need to clarify this one way or the other.
All the usual caveats apply to this - IANAL, I am not an expert in this field, and anyone can try to make a case against anything in the courts. It's very possible I missed some relevant law, or that a good lawyer could make a solid case as to why this is problematic.