Lucene search

K
code423n4Code4renaCODE423N4:2021-12-POOLTOGETHER-FINDINGS-ISSUES-105
HistoryDec 12, 2021 - 12:00 a.m.

Reward stuck if promotion cancel before all past reward claimed

2021-12-1200:00:00
Code4rena
github.com
4

Handle

gzeon

Vulnerability details

Impact

When owner call cancelPromotion, the contract

  1. Delete the promotion struct (L132)
  2. Return all token reserved for future epochs (L133)

If there are token left for previous epochs, they will be stuck in the contract as the promotion struct is gone.

#Proof of Concept

Recommended Mitigation Steps

Set numberOfEpochs instead, i.e.
_promotions[_promotionId].numberOfEpochs = _getCurrentEpochId(_promotion)+1;


The text was updated successfully, but these errors were encountered:

All reactions