Re: "according to popularity."
Youtube does a similar thing with its subscriptions. A portion of the amount you pay every month goes to the creators you use. Similarly a portion of paid-for GitHub accounts' fees could go to open source dependencies.
That should be pretty hard to game, as you can't get back more than you pay for, and the amounts involved will be small.