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
Issue: the "pools" table is not correctly populating the associated x/y ID ticker values for the respective liquidity pool ID.
Each LP pair has their own ID. For example, ERG/ergopad would have its own unique value and ergopad/ERG would have something else despite the asset ticker ID being the same - they are just switched.
If we run the following for the above example....
select
distinct p.pool_id,
p.x_id,
a_x.ticker as x_ticker,
p.y_id,
a_y.ticker as y_ticker,
a_x.ticker || '/' || a_y.ticker as ticker
from pools p
LEFT JOIN assets a_x ON a_x.id = p.x_id
LEFT JOIN assets a_y ON a_y.id = p.y_id
where (a_x.ticker = 'ergopad' or a_y.ticker = 'ergopad')
and (a_x.ticker = 'ERG' or a_y.ticker = 'ERG')
;
Despite being different pool IDs, the x_id and y_id columns are populating the same values for both and creating an incorrect output for the final ticker column.
The text was updated successfully, but these errors were encountered:
Eeysirhc
changed the title
Backend DB mislabeling x/y id and ticker values in "pools" table
Backend DB incorrectly populating x/y IDs in "pools" table
Apr 2, 2022
Issue: the "pools" table is not correctly populating the associated x/y ID ticker values for the respective liquidity pool ID.
Each LP pair has their own ID. For example, ERG/ergopad would have its own unique value and ergopad/ERG would have something else despite the asset ticker ID being the same - they are just switched.
If we run the following for the above example....
We get the following results:
Row 1
Row 2
Despite being different pool IDs, the x_id and y_id columns are populating the same values for both and creating an incorrect output for the final ticker column.
The text was updated successfully, but these errors were encountered: