Claiming Stacking rewards happens through calling the claim-stacking-reward function in the contract, which accepts a reward cycle and checks both the entitled STX reward from miners and the amount of CityCoins to return, then transfers them to the user.
Type: Read-only Function
Input: userId as uint and targetCycle as uint
Returns: entitledStackingReward as uint, or default (u0)
Returns the amount of STX a user can claim in a given reward cycle in uSTX. This method will only return a positive value if:
the current block height is in a subsequent reward cycle
the Stacker locked up CityCoins in the target reward cycle
the Stacker locked up enough CityCoins to receive at least one uSTX