orca_whirlpools_docs::orca_whirlpools_core

Function collect_rewards_quote

pub fn collect_rewards_quote(
    whirlpool: WhirlpoolFacade,
    position: PositionFacade,
    tick_lower: TickFacade,
    tick_upper: TickFacade,
    current_timestamp: u64,
    transfer_fee_1: Option<TransferFee>,
    transfer_fee_2: Option<TransferFee>,
    transfer_fee_3: Option<TransferFee>,
) -> Result<CollectRewardsQuote, &'static str>
Expand description

Calculate rewards owed for a position

§Paramters

  • whirlpool: The whirlpool state
  • position: The position state
  • tick_lower: The lower tick state
  • tick_upper: The upper tick state
  • current_timestamp: The current timestamp
  • transfer_fee_1: The transfer fee for token 1
  • transfer_fee_2: The transfer fee for token 2
  • transfer_fee_3: The transfer fee for token 3

§Returns

  • CollectRewardsQuote: The rewards owed for the 3 reward tokens.