Lido – Security Review of Oracle V5 update
Lido partnered with Composable Security to conduct a thorough security review of the Oracle V5 update to prepare for upcoming Pectra hard fork. Basic […]
We spent several days identifying and verifying selected threats during the Tapioca contest. 4 high severity findings were confirmed.
Project type: Ominichain Money Market
Service: Key threat based audit (contest on Sherlock).
Results: We have identified 4 HIGH severity issues related to the integration with LayerZero V2. Removing the vulnerabilities increased user security and prevented stealing their tokens on any chain.
TapiocaDAO is a decentralized platform offering an omnichain money market that enables users to mint, borrow, lend, and leverage assets across multiple blockchain networks.
Its core products include Singularity, an isolated risk borrowing and lending market, and Yieldbox, a permissionless token vault. The platform also introduces USDO, a decentralized over-collateralized stablecoin, and utilizes the TAP token as the backbone of its token economy.
Visit website: https://www.tapioca.xyz/
This particular iteration was mostly due to their integration with the new V2 version of LayerZero. The subjects of the test were selected contracts from two Tapioca repositories (Tapioca-bar and TapiocaZ), published in Sherlock’s repository.
GitHub repository: https://github.com/sherlock-audit/2024-02-tapioca/
CommitID: dc2464f420927409a67763de6ec60fe5c028ab0e
They have already hired a couple of auditors and companies for a security review before the contest on Sherlock including:
WARNING: Even multiple audits do not provide a 100% guarantee of eliminating all vulnerabilities. Many of these companies have excellent specialists.
We have already researched security of LayerZero V1, identified the threats, and prepared a security checklist for projects integrating with LayerZero V1. Therefore, we decided to spend one week to explore the security threats arising from the newer version.
Initial challenges and constraints:
Defined objectives:
We focused only on the integration with LayerZero V2 to learn the differences from V1 and leverage our expertise. As for every smart contract security review, thorough threat modeling was performed.
We also used diagrams to visually present the flow of LayerZero messages being cross-chain transferred.
The results allowed us to select the most important attack vectors that need to be verified.
The following attacker goals were identified as the most important:
Threat scenarios that might allow achieve attacker goals compromising the security:
A time-boxed security review outlined 6 potential threats, of which 4 were confirmed to exist within the project, particularly in aspects related to the integration with LayerZero V2.
Key findings:
_srcChainSender
parameter allows to impersonate the sender.executeModule
function allows to steal the tokens._lzCompose
with multiple compose messagesThe time-boxed security review of the smart contracts revealed vulnerabilities in direct calls to modules, a notable point given Tapioca’s modular design. One intriguing finding was a function that, while appearing to be a legitimate feature, was actually being exploited to circumvent authorization protocols.
The advent of LayerZero V2 introduces enhanced capabilities for applications built upon it, but as always: with great power comes a great responsibility. Embracing the advanced features of LayerZero V2 necessitates a heightened commitment to security and diligence.
By devoting only a week and full focus on integrations with LayerZero V2, we took 7th place among other great specialists.
Meet Composable Security
Get throughly tested by the creators of Smart Contract Security Verification Standard
Let us help
Get throughly tested by the creators of Smart Contract Security Verification Standard