Kokomo Finance Hack Analysis

PUBLISHED ON
Apr 16, 2024
WRITTEN BY
Gul Hameed
DURATION
5 min
CATEGORY
DeFi, hack analysis
Gaming
Wallet
DeFi
Kokomo Finance Hack Analysis

Kokomo Finance, a lending protocol that had recently launched on Optimism, rug pulls users and disappears with approximately $4 million worth of tokens. The project’s token, KOKO, had only been launched less than 36 hours before the rug. The rug occurred through changes made by the project’s deployer address, which rugged Wrapped Bitcoin deposits. The project deleted its website, Twitter, GitHub, and Medium soon after.

Hack Impact

Kokomo Finance has taken off with approximately $4 million worth of user funds, leaving users unable to withdraw their funds. The project rugged Wrapped Bitcoin deposits, leaving almost $2M of tokens in its pools on Optimism.

Background

The KOKO Token deployer, with address 0x41BE, created a malicious cBTC contract. They modified the reward speed and paused borrowing. Next, they replaced the implementation contract with the malicious one using the function below. Another address, 0x5a2d, approved the cBTC contract to spend 7010 sonne WBTC. After the implementation contract was switched to the malicious cBTC contract, the attacker used the 0x804edaad method to transfer sonne WBTC to address 0x5C8d. Finally, the address 0x5C8d swapped 7010 sonne WBTC for 141 WBTC (~4M) in profit.

Code

Security function deployed on Kokomo Finance

Steps to reproduce

  • The attacker deployed a contract called cBTC, then changed its implementation to a malicious contract. The attacker then called the 0x804edaad method to transfer tokens to a different address and ultimately swapped those tokens for profit.

Transaction Analysis

The four addresses currently hold the stolen funds:

Rugpull Indicators

Here are some indicators to look for in a smart contract that may indicate it could be a rugpull:

  • Anonymous or unknown team: A team that is anonymous or unknown should be a red flag. Why? as they may not have any reputation to uphold and can disappear easily.
  • Unaudited code: A smart contract that has not been audited or reviewed by reputable third-party auditors increases the risk of vulnerabilities and potential exploits.
  • Centralized control: A smart contract that gives excessive control to the owner or a small group of individuals can lead to potential misuse of funds or a rugpull.
  • Lack of transparency: A rugpull often involves a lack of transparency or information on the project, such as unclear tokenomics or a lack of information on the team or project roadmap.
  • Unrealistic promises: Projects that make unrealistic promises of high returns or quick profits without a clear explanation of how these returns will be generated should be approached with caution.
  • Lack of liquidity: If a project has low liquidity or a small number of holders, it may be easier for a rugpull to occur as there may not be enough holders to prevent a large-scale dump.
  • Sudden changes or delays: A sudden change in the project roadmap or significant delays in project milestones without proper communication to investors can be a warning sign of a potential rugpull.

Conclusion

Kokomo Finance’s rugpull highlights the need for thorough security audits and proper measures in decentralized finance. The rug occurred via the deployer address. It’s crucial to audit and secure all protocol aspects.

Explore further Hack Analysis:

Hack Analysis on Euler Finance

Zunami Hack Analysis

BonqDAO Hack Analysis

Beanstalk Hack Analysis & POC

DeFiGeek Community JAPAN Hack Analysis

Cream Finance Hack: What Motivates Hackers To Return Stolen Funds?

related reports

subscribe to our newsletter !

State of security

Zunami Hack Analysis
Read More
Bonq DAOhack analysis
Read More