balancer-subgraph
balancer-subgraph copied to clipboard
PoolShare entity with user being the pool itself
There seems to be a bug in the data as there exist a PoolShare entity where the user is the pool itself. Here is an example query and output:
{
poolShares(where: {userAddress: "0x5e37910cfb8de1b14ec4e4bac0bec27c35dc07d5"}) {
id
balance
poolId {
id
}
}
}
{
"data": {
"poolShares": [
{
"balance": "0",
"id": "0x5e37910cfb8de1b14ec4e4bac0bec27c35dc07d5-0x5e37910cfb8de1b14ec4e4bac0bec27c35dc07d5",
"poolId": {
"id": "0x5e37910cfb8de1b14ec4e4bac0bec27c35dc07d5"
}
}
]
}
}
How is this possible? Are the BPTs sent to the pool itself upon user's liquidity withdrawal?
@benesjan Yes BPTs are sent to the pool itself, that's the reason you see it on poolShares. Do you see this being an issue? Pool shares with 0 value would not appear in the UI but we could remove it from the subgraph.
Hello, I think it makes the data a bit inconsistent for 3rd parties (it caused us issues as croco.finance). For that reason I think filtering that would be a good idea. Thank you