Submitted by rvierdiiev
Severity: Medium
The sponsor function allows a caller to delegate their shares to the special address. In this case, the caller losses the ability to win prizes. The previous version of code had the sponsor function, which allowed the deposit of funds on behalf of the owner and delegate all users funds to the SPONSORSHIP_ADDRESS. As result, an attacker had the ability to deposit small amount of funds (or 0) on behalf of user and make them delegate to the SPONSORSHIP_ADDRESS.
The PoolTogether team has fixed that issue by removing this function. So now, the attacker cant directly call sponsor for any address.
However, there is another function, sponsorWithPermit. This function allows anyone to provide a valid permit for asset and then do the sponsoring. Its possible that a user will create a permit for other purposes (to just run the depositWithPermit function). In this case, an attacker (which can be some other web portal) can reuse this permit and make the user delegate all of their balance to the SPONSORSHIP_ADDRESS, instead of just depositing.
This issues stands, because currently the user cant be sure how their signed message (permit) will be used. A user can sign the permit to deposit, but it will be used to deposit and delegate to the sponsorship address.
PierrickGT (PoolTogether) commented:
Note: For full discussion, see here.
