Skip to content

Commit

Permalink
correct inaccuracy
Browse files Browse the repository at this point in the history
  • Loading branch information
soilking committed Apr 12, 2024
1 parent df93425 commit 23d1f3f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 2 additions & 2 deletions projects/subgraph-bean/src/BeanstalkHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,15 +122,15 @@ export function handleSunrise(event: Sunrise): void {

// Update price, liquidity, and deltaB in the pool
updatePoolValues(
BEAN_3CRV.toHexString(),
bean.pools[i],
event.block.timestamp,
event.block.number,
ZERO_BI,
ZERO_BD,
liquidity.minus(pool.liquidityUSD),
deltaB
);
updatePoolPrice(BEAN_3CRV.toHexString(), event.block.timestamp, event.block.number, price);
updatePoolPrice(bean.pools[i], event.block.timestamp, event.block.number, price);

weightedPrice = weightedPrice.plus(price.times(liquidity));
totalLiquidity = totalLiquidity.plus(liquidity);
Expand Down
8 changes: 8 additions & 0 deletions projects/subgraph-bean/subgraph.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,14 @@ dataSources:
file: ../subgraph-core/abis/BeanstalkPrice.json
- name: CurvePrice
file: ../subgraph-core/abis/CurvePrice.json
- name: UniswapV2Pair
file: ../subgraph-core/abis/UniswapV2Pair.json
- name: Bean3CRV
file: ../subgraph-core/abis/Bean3CRV.json
- name: CalculationsCurve
file: ../subgraph-core/abis/CalculationsCurve.json
- name: ERC20
file: ../subgraph-core/abis/ERC20.json
eventHandlers:
- event: Sunrise(indexed uint256)
handler: handleSunrise
Expand Down

0 comments on commit 23d1f3f

Please sign in to comment.