The ixStageYield method on the YtPosition class creates a transaction instruction that stages accrued yield. This computes earned interest and emissions based on the current SY exchange rate and moves them into the position’s staged balance.
You must call ixStageYield before collecting interest or emissions. Without staging, there is nothing to collect.
Usage
Required Parameters
Returns
Returns a TransactionInstruction that reads the current SY exchange rate via CPI and updates the position’s staged interest and emission trackers.
You can stage and collect in the same transaction by adding both instructions sequentially.