ContestManager
is the owner of Pot
, so managerCut
goes to ContestManager
, and the person who deployed ContestManager
has no way getting these funds from the ContestManager
contract and these funds are stuck here.
A person (let, Sam) deploys the ContestManager
contract. Now , ContestManager
deploys the Pot
contract , so ContestManager
is the owner of Pot
. Whenever Pot::closePot
is called , managerCut
is sent to the owner of the pot , i.e. , ContestManager
. But there is no function in ContestManager
which lets it's owner (Sam) take out the funds.
Proof of Concepts
Owner(of Pot
, i.e. , ContestManager
) creates and funds the pool
Player 1 claims
Deadline passes
Owner calls closePot
Owner(Contest Manager) gets his 10%
Owner of Contest Manager (here , user) gets nothing
Place this in TestMyCut.t.sol
Owner of ContestManager
contract gets no funds and the managerCut
from all contests is stuck inside ContestManager
Manual review , Foundry Tests
Make functions which owner of Contest Manager can use to pull out the funds corresponding to a particular token
Add these functions to ContestManager.sol
Owner can input address of the contest in getToken()
to get the token corresponding to that contest , then use receiveCut()
to pull out the funds.
In the Pot::closePot
, instead of transferring managerCut
to msg.sender
(which is ContestManager
) , transfer it to tx.origin
(which is owner of ContestManager
) . Make the following change :
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.