Zopa interview question

Implement a rate calculation system.