-
Notifications
You must be signed in to change notification settings - Fork 383
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Long Term] Balancer V3 Wishlist/Brainstorm #2210
Comments
Small things to add:
Things to remove:
Things to maybe remove (potentially to make space):
Large things to maybe add:
|
|
Expand PoolRegistered event to include as an optional argument the factory address (allows us to create a registry of pools be able to differentiate between different types without having to listen for pool creation events on each factory) |
This would be helpful in the context of composability and chaining several join/exit/swap transactions using internal balances. Right now we have to keep moving balances out of internal balances when chaining several joins/exits together, which increases gas cost. |
@brunoguerios I'm not sure I follow, are you suggesting the minted BPT be deposited as user balance in a join, and burnt from user balance during an exit? |
No - actually I'd like for the user to be able to choose if the BPT they get from a join transaction is kept as internal balance or if it's sent to the recipient's address.
Giving a bit more context, being able to set |
I'd love to see a feature in the vault swap functions, where the vault optionally calls a hypothetical This would be helpful for making For a reference for how this is implemented well, Uniswap V3 pools have this feature. It is equally (or more) difficult to predict beforehand what the expected amount in will be for an exact-out uniswap V3 pool swap, but external contracts don't need to do that math themselves, because the callback tells you exactly how much the pool is expecting. The most useful parameters to this callback would be, imo:
Other advantages include the external contract not needing ERC20 approvals, because the external contract could voluntarily send the assets, rather than the vault trying to Note that even if the "paying the vault" half of this is out of scope or nonviable, purely knowing how much the vault expects, without having to replicate that math, would be incredibly helpful. |
Yes, that is sort of what I meant except using different language. This is not currently possible because a) the Vault does not know about BPT (which is why @ejmahler that's a very interesting feature request, thank you very much. As noted, that currently does not exist in V2, but we do have a tool to let you predict exact swap amounts without having to replicate any of the math yourself. The What the queries do under the hood is actually perform the swap/join/exit operation and then revert it, but critically without requiring that you hold the tokens to begin with in order to simulate. This uses built-in query capabilities in the Vault and Pools, but these are relatively involved and are out of scope of this discussion. If you want to learn more, take a look at this article by @0xSkly. |
Doesn't necessarily need to wait for v3, but it seems that people would really appreciate pools having view functions for pricing
|
I know @nventuro has his own list, so I'll let him chime in first before I put thoughts out there
The text was updated successfully, but these errors were encountered: