Audit · firm’s term: audit report
QuillAudits reviewed Landshare on 30 Jul 2024: 11 findings, 0 critical; 8 marked fixed, 3 open.
Report hosted on quillaudits.com.
Trustblock does not review code.
Statuses are the security firm’s own, from its report.
| Severity | Open | Acknowledged | Fixed |
|---|---|---|---|
| Critical | 0 | 0 | 0 |
| High | 0 | 0 | 5 |
| Medium | 0 | 0 | 0 |
| Low | 3 | 0 | 3 |
In the CrossChainSender contract, the admin pays for the Chainlink Cross-Chain Interoperability Protocol (CCIP) call fees in the transfer function. However, this fee is incurred even if the transaction reverts. A malicious user could exploit this by sending a withdraw message with a large amount to bypass contract protections, knowing that the transaction might revert due to insufficient tokens in the CrossChainVault contract. Despite the transaction reverting, the admin would still pay for the CCIP call, leading to a potential drain of LINK tokens from the CrossChainSender, causing financial loss for the protocol and risking a denial of service (DoS) if the LINK balance is depleted.
The deposit function in the contract allows users to deposit tokens and receive shares representing their stake in the pool. The current implementation calculates shares based on the formula (_amount * totalShares) / pool when totalShares is not zero. This can lead to an inflation attack, where an attacker can manipulate the share calculation to their advantage.
According to CCIP documentation, the gasLimit specifies the maximum amount of gas that CCIP can consume to execute ccipReceive() on the destination blockchain. This gas limit directly influences the fee for sending a message, and any unspent gas is not refunded. In the CrossChainSender.sol transfer instruction, users can specify the gas limit to be sent. Since the admin sponsors these CCIP transactions, a malicious user could set an excessively high gas limit, leading to a significant drain of ETH from the contract.
In the CrossChainSender contract, the onBehalfOf parameter can be set to any user, enabling one user to withdraw tokens on behalf of another user. This creates a vulnerability where an attacker can force unauthorized withdrawals, causing the target user to pay a withdrawal fee if the tokens are withdrawn before a set time. The withdrawal fee is a percentage value, and for users with large investments, this fee can sum up to significant amounts, leading to substantial financial losses. Additionally, it is inappropriate and insecure for an attacker to decide when another user's tokens should be unstaked, as this undermines the user's control over their investments and timing of withdrawals.
User A can initiate a "Harvest" instruction in CrossChainSender.sol and set themselves as _onBehalfOf. The cost for bridging this transaction is paid by the admin, but the user receives the call fee. This allows the user to exploit the system by repeatedly initiating harvest calls, draining the admin-provided LINK in CrossChainSender contract, and collecting call fees without making any actual investments.
The setSimRevert function allows the contract owner to toggle the simulation of a revert condition for testing purposes. This function can be exploited by the admin to block upcoming transfers and disallow users from depositing, thereby introducing centralization and enabling potential censorship of transactions. This capability undermines the decentralized nature of the contract and can lead to trust issues among users.
Several functions are currently defined as a public function, which consumes more gas than necessary. Since these functions are only intended to be called by the contract owner, it can be set to external to save on gas costs.Following functions are affected: • CrossChainSender.sol: setMinimumAmount, withdraw, withdrawToken • CrossChainReceiver.sol: withdrawETH, withdrawToken • CrossChainVault.sol: withdrawETH, withdrawToken • CCIPTokenSender.sol: withdrawETH, withdrawToken
The function _isContract, which checks whether a given address is a contract, is defined but not utilized anywhere within the contract code. This function is intended to prevent contracts from being targeted; however, since it is not called, it adds unnecessary complexity to the codebase without providing any functional benefit.
The report names a repository or files. Open the report to see its scope.
Repository and files the report names (8)
350 projects reviewed · 459 reports · latest Apr 2025
See QuillAudits’s auditsSomething wrong on this page? A missing report, a wrong date, a finding that was fixed since. Tell us and we check it against its source.
Tell us