Thanks for your bug report and this great post!
The reason for the incorrect payout amounts resides in the Steem node's logic. We have a total_payout_value field that comes from the node, but it does not contain the beneficiaries part for paid out posts. So, if 100% goes to the beneficiaries, the node returns a payout of $0.
On Steemit your post payout is shown as:
(which is not really correct)
I've spent a few hours on this today and came to an acceptable solution I think:
It's still not 100% accurate, because it's impossible to know the exact values afterwards. I now use the curator_payout_value muliplied by two as total payout in those cases. The 'returned payout' can't be calculated for this, so I just show it as 0%.
If that won't be fixed in the node, I need to think about building an own solution that is purely based on reward shares (with a 'steem per mvests' history db in mind).
RE: G