The UpliftOnlyExample
contract is vulnerable to sandwich attacks around Chainlink oracle price updates, allowing attackers to profit from predictable price changes during heartbeat updates. This could lead to value extraction from the protocol over time.
In the UpliftOnlyExample
contract, the getPoolLPTokenValue
function relies on Chainlink oracle prices to determine deposit values. The vulnerability exists because:
Chainlink oracles have predictable update patterns:
Updates occur on fixed heartbeat intervals
Price deviations up to 0.5% are allowed before forced updates
Updates are visible on-chain
Attack flow:
While fees reduce profitability, the attack remains viable:
Can be executed repeatedly on heartbeat updates
Can be performed across multiple assets and pools
Cumulative profits can be significant over time
Loss of funds - The protocol gradually loses value to attackers who can reliably extract profits by sandwiching oracle updates.
Manual Review
Several mitigations could be implemented:
Use more responsive oracles like Pyth:
Implement profit caps on quick withdrawals where if a user withdraws within x time of depositing they can only withdraw the proportional amount up to the original deposit value. So if a user is withdrawing 100% of the nft's value they can get at most 100% of the original deposit value. If they are withdrawing 50% of the nft's value they can get at most 50% of the original deposit value. This would prevent the user from profiting from the price change and instead any profit would be donated to the pool.
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.