Skip to content

add tempo support with aggregator hook handling#68

Draft
ciyengar3 wants to merge 8 commits intomainfrom
tempo-testnet
Draft

add tempo support with aggregator hook handling#68
ciyengar3 wants to merge 8 commits intomainfrom
tempo-testnet

Conversation

@ciyengar3
Copy link
Contributor

No description provided.

@ciyengar3 ciyengar3 marked this pull request as draft February 19, 2026 19:33
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ciyengar3 and others added 7 commits February 19, 2026 14:51
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
pathUSD is definitionally $1, so we skip the oracle pool lookup and
return a static price of 1 for the Tempo testnet. All other networks
fall through to the existing getNativePriceInUSD path.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
getAggregatorHookAddress → getUSDStableStableAggregatorHookAddress
isAggregatorPool → isUSDStableStableAggregatorPool

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…okAddress

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… for TVL

Update ABI to reflect two-value return type and compute pool TVL by
converting each amount with its token's actual decimals rather than
hardcoding 18.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ools

poolManager.totalValueLockedETH/USD was being set before the
pseudoTotalValueLocked override, so it accumulated the swap-delta-based
pool TVL instead of the hook-reported value. Move the poolManager update
to after the aggregator override block.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Comment on lines +197 to +198
poolManager.totalValueLockedETH = poolManager.totalValueLockedETH.plus(pool.totalValueLockedETH)
poolManager.totalValueLockedUSD = poolManager.totalValueLockedETH.times(bundle.ethPriceUSD)
Copy link
Collaborator

@matteenm matteenm Feb 19, 2026

Choose a reason for hiding this comment

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

so here we're saying that external liquidity that is accessible by v4 hooks should count as poolManager liquidity, even though technically it's not value locked in the pool manager?

Copy link
Collaborator

Choose a reason for hiding this comment

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

(not that i have a strong opinion on this, i think there is an argument that it should include it.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah yeah that makes sense, probably should just forgoe it

Comment on lines +191 to +192
token0.totalValueLockedUSD = token0.totalValueLocked
token1.totalValueLockedUSD = token1.totalValueLocked
Copy link
Collaborator

Choose a reason for hiding this comment

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

token level tvl will not include the external liquidity?

@ciyengar3 ciyengar3 changed the title add tempo testnet support with aggregator hook handling add tempo support with aggregator hook handling Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants