Unfortunately there are just too many permutations to make it simple but I would recommend that if you want to get to the core of it the TL;DR is here:
and read the Appendices. That pretty much shows were we are going with this, but if you want to understand some of the nuances you pretty much have to dig in. Also, be sure to look at VDP-67 and VDP-26.1 for specifics about Longevity Dealflow compensation.