external_incentive.gno
CancelExternalIncentive
func CancelExternalIncentive(
cur realm,
targetPoolPath string,
incentiveId string
)CancelExternalIncentive cancels an external incentive that has not started yet, removing it and refunding the reward tokens and the GNS deposit to the creator. Callable by admin, governance, or the incentive creator.
Halt check: reverts while the Withdraw halt scope is active.
Parameters
cur
realm
Current realm context; callers use cross(cur) when crossing into this realm.
targetPoolPath
string
Pool path containing the incentive.
incentiveId
string
Unique incentive identifier to cancel.
CollectExternalIncentivePenalty
CollectExternalIncentivePenalty collects accumulated warm-up penalties after EndExternalIncentive has finalized the incentive, sending them to refundAddress. Only the incentive creator or admin may call it.
Halt check: reverts while the Withdraw halt scope is active.
Parameters
cur
realm
Current realm context; callers use cross(cur) when crossing into this realm.
targetPoolPath
string
Pool path containing the incentive.
incentiveId
string
Unique incentive identifier whose penalty is collected.
refundAddress
address
Address receiving the collected penalty amount.
Return Values
int64
int64
Penalty amount transferred, capped by the staker's available reward-token balance.
CreateExternalIncentive
CreateExternalIncentive creates an external reward incentive for a pool.
Any caller may create an incentive after satisfying the token, duration, start-time, reward-minimum, and GNS-deposit checks.
Halt check: reverts while the Staker halt scope is active.
Parameters
cur
realm
Current realm context; callers use cross(cur) when crossing into this realm.
targetPoolPath
string
Pool path whose liquidity providers will receive the incentive.
rewardToken
string
Registered token path used to pay the incentive.
rewardAmount
int64
Total reward amount deposited, in reward-token units.
startTimestamp
int64
Incentive start time as an inclusive Unix timestamp.
endTimestamp
int64
Incentive end time as an inclusive Unix timestamp.
EndExternalIncentive
EndExternalIncentive finalizes an external incentive once its end timestamp has passed, sending the unclaimable/remainder reward portion and GNS deposit to the explicit refundAddress. Only the incentive creator or admin may call it; an outstanding exit checkpoint for this incentive must be collected or forfeited first.
Halt check: reverts while the Withdraw halt scope is active.
Parameters
cur
realm
Current realm context; callers use cross(cur) when crossing into this realm.
targetPoolPath
string
Pool path containing the incentive.
incentiveId
string
Unique incentive identifier to finalize.
refundAddress
address
Address receiving the refundable reward tokens and GNS deposit.
Last updated