Skip to content

use REFERENCE_WALLET for get_stats simulations#39

Merged
hylevi merged 2 commits intomainfrom
fix/simulation-fee-payer
Jan 30, 2026
Merged

use REFERENCE_WALLET for get_stats simulations#39
hylevi merged 2 commits intomainfrom
fix/simulation-fee-payer

Conversation

@hylevi
Copy link
Contributor

@hylevi hylevi commented Jan 30, 2026

get_stats() was failing with "Return data not found" when using new_random_keypair() because the random pubkey doesn't exist on-chain.

Now uses REFERENCE_WALLET as the simulation fee payer.

…ions

Simulation-only methods like get_stats() were failing with "Return data
not found" when clients were created with new_random_keypair(), because
the random pubkey doesn't exist on-chain.

This uses the existing build_simulation_transaction pattern with
REFERENCE_WALLET (already designated for simulation use) to decouple
the fee payer from the client's keypair.
@hylevi hylevi changed the title fix(clients): use REFERENCE_WALLET as fee payer for get_stats simulat… fix: use REFERENCE_WALLET for get_stats simulations Jan 30, 2026
@hylevi hylevi changed the title fix: use REFERENCE_WALLET for get_stats simulations use REFERENCE_WALLET for get_stats simulations Jan 30, 2026
@hylevi hylevi marked this pull request as ready for review January 30, 2026 02:05
@hylevi hylevi requested a review from 0xPlish January 30, 2026 02:06
Copy link
Contributor

@0xPlish 0xPlish left a comment

Choose a reason for hiding this comment

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

No issues here, but I just realized - can't we just use the ProtocolStateStrategy's underlying ExchangeContext to get xSOL NAV?

@levicook
Copy link

No issues here, but I just realized - can't we just use the ProtocolStateStrategy's underlying ExchangeContext to get xSOL NAV?

We can -- this was just a bonus bugfix.

I think this fn wasn't generally being called.

@hylevi hylevi self-assigned this Jan 30, 2026
@hylevi hylevi merged commit 29ae4f3 into main Jan 30, 2026
3 checks passed
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.

3 participants