I am a software developer tasked with solving a problem programmatically, but I'm limited in what I remember about statistics and am not sure how to properly word my question to search for the answer. Thanks in advance for your help.
Problem I have a list of people that each have a particular salary amount. I also have a bucket of money. I want to distribute the bucket of money to everyone based on their salary, with the lowest earners getting the highest amount and the highest earners getting the least.
Example
Person A - $4.00
Person B - $5.00
Person C - $6.00
Person D - $20.00
The bucket of money is $100.00
FYI, my dataset is made up of almost 3000 records, so the above example is very simplified.
Is there a formula/algorithm that can help me figure this out ?

You might try making it proportional to the reciprocal of the person's earnings. In the example, we have $$S=\frac14+\frac15+\frac16+\frac1{20}=\frac23$$
So then A would get $$\frac{1/4}{2/3}=\frac38=37.5\%$$ of the pot, B would get $30\%$, C would get $25\%$ and D would get $7.5\%$.
There's no way to defend this mathematically, of course. It does guarantee that persons earning less get more of the pot, though.