Skip to content

Commit

Permalink
Merge pull request #159 from mkflow27/main
Browse files Browse the repository at this point in the history
`userData` clarification for joins & exits
  • Loading branch information
mikemcdonald authored Oct 25, 2023
2 parents 15813e3 + 1d9e766 commit 8807731
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/reference/joins-and-exits/pool-exits.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ Let's say that you want to allow a 1% slippage. After computing how many tokens
### `userData`

userData is a highly versatile field; as such, it needs to be encoded for its specific use case. For exits, userData encodes a `ExitKind` to tell the pool what style of exit you're performing. Since pool types are customizable, not every pool necessarily uses the same `ExitKind`, so it's important to keep track of what each pool type can handle.
::: info
When encoding `userData` for pools that include their own BPT as part of the pool's tokens, the BPT are not included in the `userData`.
:::

#### WeightedPool ExitKinds

Expand Down
3 changes: 3 additions & 0 deletions docs/reference/joins-and-exits/pool-joins.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ Let's say that you want to allow a 1% slippage. After computing how many tokens
### `userData`

userData is a highly versatile field; as such, it needs to be encoded for its specific use case. For joins, userData encodes a `JoinKind` to tell the pool what style of join you're performing. Not every pool uses every `JoinKind`, so it's important to keep track of what each pool type can handle.
::: info
When encoding `userData` for pools that include their own BPT as part of the pool's tokens, the BPT are not included in the `userData`, except for `INIT` joins where they need to be included.
:::

#### WeightedPool JoinKinds

Expand Down

1 comment on commit 8807731

@vercel
Copy link

@vercel vercel bot commented on 8807731 Oct 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.