You could start with something like this:
Set scale to self.y
But that makes the scaling ridiculous. So we can reduce the effect
Set scale to self.y/500
That's better in that size difference from the top to the bottom is less drastic. But it's still not perfect since it's too small. You can fix that with an offset:
Set scale to self.y/500 +1
Now you can fine tune it by tweaking the values till you get a result you like.
Another way to do it would be to make the formula From two different scales at two different ys. Then just use some algebra to make an exact equation. You could also use lerp here as well.