import { ChainId, Token, TokenAmount } from "./primitives.js"; import { PointsProgramPnL } from "./positions.js"; import { Address } from "viem"; //#region src/model/rewards.d.ts /** * One claimable token reward, denominated and priced. * * Both tokens arrive resolved, so a consumer neither looks one up nor * reassembles one out of the loose fields a source sends. */ export interface MerklReward { /** Where the reward is claimed. */ readonly source: "merkl" | "turtle"; readonly chainId: ChainId; /** Market pool whose depositors the campaign rewards. */ readonly pool: Address; /** That pool's share token — what the campaign is keyed on. */ readonly poolToken: Token; /** * The incentive token being handed out, how much of it is claimable * (distributed minus already claimed, always > 0) and what that is worth. * * Priced by the source, not by the market oracles: a campaign's incentive * token is rarely collateral in the pool it incentivises, so the oracles * usually do not know it — GEAR, which most Gearbox campaigns pay in, among * them. `valueUsd` is `null` for a token the source does not price either. */ readonly amount: TokenAmount; } /** Points have no token and no price, and are not claimed. */ export interface PointsReward extends Omit { readonly points: PointsProgramPnL; } export type Reward = MerklReward | PointsReward; //#endregion