-
Notifications
You must be signed in to change notification settings - Fork 34
More accurately distribute donations #351
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
def-
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought we should do the opposite and spread all the general donations among the unsponsored servers. Because with your approach the sponsorings look even larger than they actually, and also larger than they currently look.
But maybe for next year a better approach would be to just fill up the donations from the first server first, then the second, etc.
|
I think general donations should go towards DDNet.org, the Masters, and the Database before going towards any locations - we don't know what servers the donator plays on, and that infrastructure is critical. What you're saying makes sense, but I would think that targeted donations vs general donations would be a pretty similar ratio for all regions, or even leaning towards targeted donations in regions with a smaller playerbase. Allocating properly should just make it clear what servers are a deadweight (and we can compare to playerbase to see how worth it that is). With the existing logic, sponsoring a server makes it receive less general funds than it did before you sponsored it. Maybe something better would be to show the sponsored servers at the top with progress bars only for direct donations, and separately list the unsponsored server costs with no percentages. Their percentages are all the same and pretty meaningless when there is a bar for the total. The percentages for the sponsored servers showing only direct donations gives us good info to depend on if servers need to be cut - if a region is fully funding their servers, no cuts; if not, depends on how close it was and the playerbase. |
|
Though that other idea might drive people to do less general donations. . . maybe we would have to ensure DDNet.org, the Masters, and the Database are funded before allowing sponsorships for servers via $$ donation. Also, I should note that I really appreciate the transparency. It feels much better to donate to something I enjoy when there are dollar goals and spending records instead of a bottomless "we accept donations :)" pit where I have no clue if they have gotten $20 this year or are way over costs. |
I like this, but seems like some effort. |
|
Will resolve conflicts if this will be merged (heinrich5991 bailed us out). @def- I have implemented something close to what I described, but I didn't move any servers as I couldn't decide what to do with regions that have fully-sponsored and not servers. It didn't feel right to split the servers up, and sorting the regions by their costs felt mean.
|
|
I don't understand what "1% of unmet costs" means. |
|
"1% of unmet costs" refers to the Regions budget. If we are undergoal on infrastructure as well that will not affect it. E.g. USA1 is (100-87)/(3241-1578) ~= 1%. Not info we need since there's the console printout, but I think it's nice if viewing as a donator. I assume the conflicts are just because I changed the "costs" map to be called "data" and the patches are anchoring on the data itself which is changing, should be a 5s rebase for this and #350. I can rebase on top of that if you prefer though. |
|
One downside of this design is that even if the region budget is filled and we are set for the year, individual regions without enough direct donations will show as unfilled. I could put something in to mark them at 100% once the total is fully funded, but that doesn't help when we're $10 off of fully funded. Maybe there should be a slightly transparent section that displays up to the old version's number (direct + percent of region budget funded)? |
def-
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks amazing!
The code is a bit messy, but not much worse than before ;)
|
Ack, surprise merge! Looks like a stray console.log() is on line 214, and I realized after sleeping on it that the transparent bars aren't accurate - they don't subtract the regions' direct payment amounts from the numerator and denominator, so visually they show a tad higher than they should. It shouldn't be much of a difference though and we don't have that number readily available because sumDirect includes the infra. |
|
Mm, GER3 says it's 187% of unmet costs on the live site and RUS2 303%. I'll open another PR to fix these last things haha |



I donated 32€ this morning to close out USA1 and USA3, and was surprised when they went from 76/100 and 42/50 to 93/100 and 42/50. Not a big deal, but odd.
The existing code in effect adds sponsored servers' numbers, then distributes the general funds by adding to each entry
entry remaining * (funds / remaining costs). RUS4 and RUS6 are 50% funded right now, but if someone sponsored both of them at 50% they would jump to 75%, not 100%, because the general fund is at 50% and 30€ won't swing that much.This changes it to (in effect) distribute the general funds first, add direct payments, and then redistribute any overflow as general funds. I think it makes more sense, especially if allowing direct payments for a server without sponsoring it. Those payments might be much smaller compared to the total and this makes them actually show up as intended.
Live state at time of PR:

State with these changes at time of PR:
