Nick Johnson
Aug 8, 2017 · 1 min read

The pseudocode does indeed assume dividends are in the same currency — but it’d be fairly easy to modify so it works in ether or in a second token currency; you just need to keep an ‘unpaid dividends’ total for each user.

The function to pay out dividends needs to be executed for both sender and recipient of a transfer before making the transfer; that eliminates the issue you describe.

And thanks for the kind words!