function delegate(address _vault, address _to) external {
_delegate(_vault, msg.sender, _to);
}
function sponsor(address _from) external {
_delegate(msg.sender, _from, SPONSORSHIP_ADDRESS);
}
Look carefully, TwabController#delegate can also perform the same activity, "delegating to the sponsor address" by filled _to is SPONSORSHIP_ADDRESS.
This means PrizeVault#sponsor becomes useless.
Impact
The “delegate to sponsor address” feature has become more flexible.
Users can choose to delegate to a sponsor whenever they want without needing to deposit again, this contrasts with the PrizeVault#sponsor function which requires depositing assets simultaneously.
Delegate to the sponsor without
PrizeVault#sponsor
function.Low/Info issue submitted by Laksmana
Summary
without
PrizeVault#sponsor
function. anyone can Delegate to the sponsor addressVulnerability Detail
The
PrizeVault#sponsor
is function that do deposit&mint while delegating to the sponsor's address..that function trigger
twabController.sponsor
.Look carefully,
TwabController#delegate
can also perform the same activity, "delegating to the sponsor address" by filled_to
isSPONSORSHIP_ADDRESS
.This means
PrizeVault#sponsor
becomes useless.Impact
The “delegate to sponsor address” feature has become more flexible. Users can choose to delegate to a sponsor whenever they want without needing to deposit again, this contrasts with the
PrizeVault#sponsor
function which requires depositing assets simultaneously.Therefore
PrizeVault#sponsor
becomes useless.Code Snippet
https://github.com/sherlock-audit/2024-05-pooltogether/blob/1aa1b8c028b659585e4c7a6b9b652fb075f86db3/pt-v5-vault/src/PrizeVault.sol#L558-L571
https://github.com/sherlock-audit/2024-05-pooltogether/blob/1aa1b8c028b659585e4c7a6b9b652fb075f86db3/pt-v5-twab-controller/src/TwabController.sol#L524-L526
Tool used
Manual Review
Recommendation