Skip to content

Conversation

@zone-live
Copy link
Contributor

@zone-live zone-live commented Dec 11, 2025

Explanation

Adds a generic non_evm_staking state structure to support staking APY data for non-EVM chains (starting with Tron).

Tron staking uses a different approach than EVM pooled staking, so rather than forcing Tron into the existing pooled_staking structure (which would require nullable vault-specific fields and some conditional logic), this introduces a minimal state that can accommodate any non-EVM chain.

The idea next is for the mobile client to:
1 - Call EarnController.refreshNonEvmStakingApy() with Tron witness API fetcher
2 - Use the selectors in selectEarnTokens to populate earnToken.experience.apr with the Tron APY
3- Get rid of the useTronStakeApy hook calls from components

References

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

Note

Add generic non-EVM staking state with APY refresh/getter, expose selectors/exports, and update tests and selector typings.

  • EarnController:
    • Add generic non_evm_staking state/types and metadata; initialize with {}.
    • New methods: refreshNonEvmStakingApy({ chainId, apyFetcher }) and getNonEvmStakingApy(chainId).
  • Selectors:
    • Add selectNonEvmStaking, selectNonEvmStakingForChainId, selectNonEvmStakingApyForChainId.
    • Tighten return typings for several existing lending selectors.
  • Exports:
    • Export new non-EVM staking types, defaults, and selectors via index.ts.
  • Tests:
    • Add tests for non-EVM staking methods and selectors; update state derivation snapshots to include non_evm_staking.

Written by Cursor Bugbot for commit 31d118f. This will update automatically on new commits. Configure here.

@zone-live zone-live requested a review from a team as a code owner December 11, 2025 14:24
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