Assuming that you use PG’s predicate architecture, what happens after an exit is finalized, is that the funds under the exit get sent to predicateAddress
and then Predicate(predicateAddress).onExitFinalized
gets called.
What if a predicate existed that sent X% of the funds to the user and the rest to the operator, as fees?
This should be able to abstract all the potential complexity involving fees.
To take this a step further, if you could do ‘nested’ predicates, you could make it so that the last predicate in the predicates-chain would apply the fee.
I do not have a concrete proposal/spec for this, just expressing the idea.
I’m also a fan of not making fees part of the protocol, since they can be part of the operator’s authentication logic with their users. The operator could check “has user paid $X this month?”. If so include payment, otherwise censor by default.