Theory behind topup

In the future we will describe the theory that topup is based on here.