Lending system, written in TotalJS