You've not really given enough information to tell what sort of range you want, i.e. whether it is capped, whether you want geometric progression, etc.
First thing you want to do is derive a number proportional to the amount of speed you want to lose (it doesn't have to be the same, but it should decrease as the speed increases to make it proportional to your loss). The standard way to do that is to take the reciprocal:
temp = 1 / currentVelocity;
Now, for 100 you will have 0.01, for 200 you'll have 0.005, for 300 you'll have 0.0033 and so on.
Now you just need to adjust that number to whatever you really want, by multiplying it. So
k = 3000;
newVelocity = temp * k;
will give you your 20 for 300, but it will give you 15 for 200 rather than 10. This may be fine for you, in that case you don't need to read further. You can adjust k as you like but you may not get numbers the way you like them unless you do a little more, such as implement geometric progression, or change the base for increase. I'm not going to go into geometric progressions here, but if you want to change the base, you do it as follows:
base = 100;
temp = 1 / (currentVelocity - base);
if (temp < 0) temp = 0; //adjust temp so never less than zero, cannot gain force!
k = 2000;
velocityLoss= temp * k;
if (velocityLoss > currentVelocity) //(1) or make currentVelocity an unsigned int
velocityLoss = currentVelocity; //(2)
This will provide you with the range you originally asked for in your question, 300 -> loss of 10, 200 -> loss of 20. FYI 100 ->loss of 40, and 50 -> loss of 80(!) which means you'd need to restrict your subtraction -- which is what I've done in lines (1) and (2).
There are other ways of approaching this whole problem, of course, which I'm sure those more mathematically adept than I, will post here.
log(myVelocity + 1) * N
? \$\endgroup\$