Kokomo Finance Hack Analysis

PUBLISHED ON

April 16, 2024

WRITTEN BY

Gul Hameed

DURATION

5 Min

CATEGORY

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 rug pull:

  • 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 rug pull.

  • Lack of transparency: A rug pull 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 rug pull 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 rug pull.


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?

Tell
us about your Project

Related Blogs

Terms & Condition | Privacy Policy
Copyright © 2024 BlockApex. All rights reserved.
Clients & Partners
0 +
Clients & Partners
0 +
Clients & Partners
0 +

Access the
Audit Checklist