Please note: This discussion started over Codius and I’ll explain the issue with the Codius use case in mind. However, it could be applied to any subscription model using SPSP pull payments where you want to provide a fallback pointer just in case the primary server is not available or where multiple parties want to contribute to the overall price of a service.
Problem: I’ve been working on an update of Codius that allows for pull payments. If the host support pull payments and the user is willing to pay via pull, the host will request a pull payment pointer on upload and only run the pod/contract for the first pull interval. On expiry, it will try to pull again and if that is possible, it will extend the pod’s life, otherwise it will shut it down.
Especially in the smart contract scenario, it makes sense to include multiple fallback pull payment pointers such that every party in the contract can be certain that as long as their pointer is available and funded, the contract will continue. But also in the general hosting scenario it makes sense to include multiple pointers as fallback option for server outages or if a community wants to jointly contribute to a project.
Having multiple parties involved in a payment process opens the door for attacks and raises a lot of questions. Here is what I’ve already collected, but I’m sure there is even more to consider.
Questions:
-
Who is allowed to add additional payment pointers to a pod? Only the uploader or anybody?
-
How does a second user (not the uploader) request the information to set up a payment pointer accepted by the host?
-
How is the payment order? Does the host always try the uploader’s pointer first and then continues with the pointer that was added next or does it randomly select a pointer to pull from? Another scenario could be [1,2,3] and then [2,3,1] during the next cycle and so on.
-
Is there a limit to how many pointers can be added?
-
If a pointer does not work, is it immediately removed from the list?
-
Pulling is triggered on expiry but if there are 1000 pointers of which 999 are attackers that are not working, the pod will continue to run for the time that the 999 are all tested, basically being hosted for free during that time. Should the pulling process start before expiry and account for the number of pointers?
-
Does the uploader have to power to shut down the pod to ultimately end an attack? If yes, how is that realized?