If you’re talking about the channelLastN property in config.js, then this value finds its way into the BitrateController.lastN field. The semantics of this field is the maximum number of endpoints that the bridge will ever consider forwarding towards a specific receiver. If the bandwidth estimation is low, then the number of forwarded endpoints will be smaller (this is what we call dynamic LastN).
As for your 2b question, concretely, you can have a look at the TrackBitrateAllocation.improve method; there you can allocate as much bandwidth as possible for the on-stage participant at the first step. I’m talking about steps here because the bwd algorithm is an iterative improvement process: in the first step each track is given the opportunity to improve i.e. forward a better quality or encoding (with the legacy simulcast implementation in Chrome, you have 9 encodings or qualities, 3 simulcast streams for spatial adaptivity with 3 temporal layers each), within the specific constraints that are passed as an argument. Same thing happens in the second step, and so on and so forth, until there’s no further improvement possible for any of the tracks that are considered for forwarding. No further improvement possible here means that the bridge either sends max quality or that there’s not enough available bandwidth for a next improvement step.
I hope this illuminates things a bit further. Please let us know if you have any further questions, we’re happy to answer!