The current FIFO withdrawal implementation in UpliftOnlyExample opens attack paths to drain the contract of BPT tokens completely
1- Current Implementation (Safe):
Naturally reverts on underflow if amountLeft > 0 when i reaches 0
Built-in protection against withdrawing more than owned
The problem is that its not the intended design to have FILO, so we assumed that the loop actually runs in FIFO and there is no issue with the implementation
2- FIFO (Intended design):
Loop completes even if amountLeft > 0
No natural revert mechanism
Allows withdrawing more than owned balance
Draining of BPT tokens from UpliftOnlyExample
add explicit balance validation:
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.