Hi
I’m trying to develop a version 2.0 of payment splitter since v1.0 has been deprecated
in that version, I would like to use an ERC20 as shares and make it dynamic (on v1.0 the share distribution is static at deployment time)
I have the naive algorithm looping all stakeholders when a payment arrives. This should be unacceptable since will be O(n)
Can you help me develop the O(1) withdraw algorithm?
Thanks