MoonPay interview question

How would you build a risk function