Designing Efficient And Secure Algorithms For Payment Channel Networks