balancer-v2-monorepo icon indicating copy to clipboard operation
balancer-v2-monorepo copied to clipboard

[WIP] Use relayer balance for exits in vault actions (BPT in).

Open jubeira opened this issue 1 year ago • 0 comments

See #945.

This initial draft replaces BPT amount in for the relayer balance when a sentinel value (0xa11) is found in the amount.

Some notes:

  • Only for exits, when BPT in is given.
  • Does it make sense to implement this for tokens given out? On paper we only care about the amount of tokens given out in those cases, not how much BPT we use. In other words we'd be ignoring the operation kind, which sounds counter-intuitive.
  • It doesn't make much sense to use all relayer balance when sender is not relayer, so we should probably revert if that's not the case when the sentinel value is found.
  • Do we want to extend the sentinel value functionality to other operations as well? It'll probably mean an extra else if when we look for chained references as in this draft.

Input is welcome!

jubeira avatar Sep 13 '22 13:09 jubeira