Proxy's fallback function forwards the entire gas left to the delegateCall that might be fully consumed by the call.
And no gas will be left for executing the remaining statements of the fallback function.
Inside Proxy#fallback
method, the contract delegates the call to the implementation.
in the following line
the contract forwards all gas left from the transaction to the delegate call, which will not let the execution complete if the entire gas is consumed by the delegate call
Even if the delegate call transaction is valid and gets completely executed but leaves less gas than needed for the following lines to execute, the transaction will fail and the user will face a denial of service
Manual review
There are two possible solutions
Either use some magical number or decide a number by your best judgment for reserving the gas amount for executing the next instructions
Use the 63/64 gas rule to forward gas to delegate call
Relevant Links:
63/64 rule in ganache : https://github.com/trufflesuite/ganache-cli-archive/issues/367
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.