LandShare

QuillAuditsFiles named in the report

Audit · firm’s term: audit report

QuillAudits reviewed Landshare on 30 Jul 2024: 11 findings, 0 critical; 8 marked fixed, 3 open.

No open critical findings
Open the reportOpen Landshare’s security record

Report hosted on quillaudits.com.

Trustblock does not review code.

Findings11

Statuses are the security firm’s own, from its report.

SeverityOpenAcknowledgedFixed
Critical000
High005
Medium000
Low303
HighIncorrect Financial Model for Sending Cross-Chain Transactions Leads to Potential LINK DrainFixed

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.

HighInflation Attack in deposit FunctionFixed

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.

HighPotential Gas Limit Exploitation in CrossChainSenderFixed

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.

HighThe onBehalfOf Parameter in CrossChainSender Allows Unauthorized WithdrawalsFixed

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.

HighUnauthorized "Harvest" Call Allows Users to Drain Admin-Provided LINK and Receive Call FeesFixed

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.

LowExistence of Test Code in Contract Enables Potential Centralization and CensorshipFixed

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.

LowFunction Can Be Set as ExternalFixed

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

LowUnused Function _isContract in Contract CodeFixed

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.

Contracts in scope

No deployed address is recorded for this audit.

The report names a repository or files. Open the report to see its scope.

Repository and files the report names (8)

  • contracts/v1/CrossChainVault.sol
  • CrossChainSender.sol
  • contracts/v0/CCIPTokenSender.sol
  • CrossChainReceiver.sol
  • contracts/v1/CrossChainSender.sol
  • CrossChainVault.sol
  • CCIPTokenSender.sol
  • contracts/v1/CrossChainReceiver.sol

Part of Landshare’s security record

Landshare
Audits1 audit by 1 firmLast audit Jul 2024, by QuillAudits.
Critical findingsNo open critical findingsIn 1 report.
Open Landshare’s security record

Security firm

QuillAudits

350 projects reviewed · 459 reports · latest Apr 2025

See QuillAudits’s audits

Something 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