PEAKDEFI Ethereum fund hacked, attacker exploited same-block referral weight update flaw

On December 5, an Ethereum fund operated by DeFi asset management protocol PEAKDEFI was attacked, with losses of about $33,800. The attacker exploited a referral commission settlement vulnerability, causing the fund contract to pay out 33,819.89 USDC, about 99.97% of all referral commissions for Cycle 19.
On-chain analysis shows the flaw is related to the referral weight snapshot mechanism. At the end of Cycle 19, the contract recorded the current block height as the settlement snapshot via nextPhase(), but the PRT balance records used to calculate referrers' commission shares could still be updated within the same block. After Cycle 20 began, the attacker obtained funds through a flash loan and minted PRT, allocating it to designated referrers so the newly added referral weight was counted in the Cycle 19 commission settlement. After the allocation was completed, the temporarily minted PRT was destroyed, and the flash loan principal was fully repaid in the same transaction.
AI-translated summary. Check important details with the original source.
