Eocene | Security (@EoceneSecurity) header
Eocene | Security (@EoceneSecurity) profile picture

💡Smart contract audit 💡Attack analysis 💡Web3 security research 💡On-chain monitor and alert Powered by Eocene Research | @EoceneNI | @EoceneMI

Joined August 2012
The root cause of EFVault attack:
2
1
151
8/ Simultaneously, the attacker transferred all the YUNA-DEPOSIT-CERT tokens to a contract that has not called the stakeTokens function before, and then called unstakeTokens to retrieve the YUNA tokens, bypassing the lockup time verification:
88
5/ The value of _staker.rewardDebt is initialized in the stakeTokens function and is determined by the balance of YUNA-DEPOSIT-CERT tokens:
1
33
4/ The quantity of reward tokens is obtained by multiplying the balance of the caller's YUNA-DEPOSIT-CERT tokens by the reward coefficient and subtracting _staker.rewardDebt:
1
27
3/ The harvest operation transfers reward tokens to the caller, and the quantity of tokens is calculated using calcHarvestTot:
1
22
2/ The stakeTokens function in the FarmCerts contract: When the caller's YUNA-DEPOSIT-CERT token is not equal to 0, it triggers a harvest operation:
1
27
3/ Then swapped CFC Token to SAFE Token, and then swapped SAFE Token to USDT:
1
112
2/ The attacker transferred the CFC Token to the liquidity pool, then took it out through the skim function, and repeated this operation many times, which eventually led to a sharp decrease in the CFC Token in the liquidity pool and a sharp rise in price:
1
26