You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm a bit puzzled how pool fee events are supposed to work.
In order to properly track pool balances on swap and liquidity events, the aggregate swap fee percentage needs to be known. This is initialized to a default value from the ProtocolFeeController and may be updated later on. Updates to both the default values and the pool specific value emit proper events, so these are not a problem.
However if the pool is created with protocolFeeExempt set, I can't see a way to properly retrieve this information. It is not included in the pool registration event, not can it be retrieved from the protocol fee controller in a reliable fashion. While it does internally store this information in the isOverride flag, this can be changed later on if the fee is updated. The end result is that there is no way to reliably retrieve the fee information for newly created pools unless running an archive node.
I hope I'm missing something here, maybe someone can shed some light on how this is supposed to work, with the goal being able to track pool balances.
The text was updated successfully, but these errors were encountered:
Thanks for bringing this up. I believe we still haven't faced this case live, because all pools come from Balancer pools and this was a feature intended for pool creators (which are still not live).
I think that case might not be covered as you point out. If we emitted an event on the fee controller with the initial aggregate swap fee percentage, would that work?
We can't update the vault at this point because it's immutable, so there's no way to add or modify existing events.
Hey, thanks for the quick response. Yes, I believe that should work fine. Let me have another closer look and I will get back to you with a definite answer tomorrow.
Hello,
I'm a bit puzzled how pool fee events are supposed to work.
In order to properly track pool balances on swap and liquidity events, the aggregate swap fee percentage needs to be known. This is initialized to a default value from the ProtocolFeeController and may be updated later on. Updates to both the default values and the pool specific value emit proper events, so these are not a problem.
However if the pool is created with protocolFeeExempt set, I can't see a way to properly retrieve this information. It is not included in the pool registration event, not can it be retrieved from the protocol fee controller in a reliable fashion. While it does internally store this information in the isOverride flag, this can be changed later on if the fee is updated. The end result is that there is no way to reliably retrieve the fee information for newly created pools unless running an archive node.
I hope I'm missing something here, maybe someone can shed some light on how this is supposed to work, with the goal being able to track pool balances.
The text was updated successfully, but these errors were encountered: