Original title:"Chengdu Chain an: YFV blackmail incident analysis"
Source: Chengdu Chain security
YFV is a DeFi project based on Ethereum. Earlier today, YFV officially announced that it was being blackmailed. Using the contract loophole of Staking, the attacker can reset the YFV locked by the user at will.

It added that the incident may be linked to the recent "Pool0" incident, in which the blackmailers were most likely "angry farmers" who did not get their money back.
& have spent
Vulnerability analysis & NBSP;
There is an stakeholder function for the contract that enables the attacker to mortgage any user as shown below:

The lastStakeholder [stakeholder for] = block.timestamp; The statement updates laseStakeTimes[User] for the user address map. However, it is widely verified that the user can withdraw the mortgage for longer than lastStakeholder [Account]+72 hours. As shown in the figure below:

Unfrozenstakeholder Time is shown as follows:


To sum up, malicious users can pledge small amounts of funds to normal users, thus locking the funds of normal users.
Based on the information on the chain, we found two suspected attacks, as shown below:
0xf8e155b3cb70c91c70963daaaf5041dee40877b3ce80e0cbd3abfc267da03fc9
0x8ae5e5b4f5a026bc27685f2b8cbf94e9e2c572f4905fcff1e263df24252965db
One of them is shown in the figure below:

Both transactions come from the same address and are minima. From this we can basically say that this is a test lock problem trade.
& have spent
Summary & have spent
For this event, the root cause is that the code audit before going online was not done well. This incident is actually a loophole at the business level.
According to the experience of Chengdu Lianan in code audit, some project parties did not provide complete project related information when conducting code audit, which made code audit unable to find some business vulnerabilities and led to heavy losses after going online.
Chengdu Lianan · Security Laboratory hereby reminds all project parties that security is the cornerstone of development and code audit is the prerequisite for going online.
Welcome to join the official BlockBeats community:
Telegram Subscription Group: https://t.me/theblockbeats
Telegram Discussion Group: https://t.me/BlockBeats_App
Official Twitter Account: https://twitter.com/BlockBeatsAsia