LandShare

LandShare Smart Contract Audit Report

Share
Share
EVMEVM
RWA / Tokenization / ReFiRWAVaults
EVMEVM
RWA / Tokenization / ReFiRWA+1

QuillAudits audited the LandShare smart contracts on EVM between Jul 30, 2024 and Aug 12, 2024. The audit found 11 issues: 5 high, 1 low, 5 informational, of which 8 resolved and 3 acknowledged.

Project Description

The project comprises a suite of smart contracts designed to facilitate secure cross-chain token transfers and staking using Chainlink's Cross-Chain Interoperability Protocol (CCIP). Users initiate cross-chain messages via the CrossChainSender, which are received and processed by the CrossChainReceiver, subsequently interacting with the CrossChainVault to deposit bridged tokens. The CrossChainVault remains synchronized with the MasterChef staking protocol, and upon withdrawal requests, tokens are transferred back to the user using the CCIPTokenSender, ensuring seamless cross-chain operations and robust security.

Timeline

S1
Jul 30, 2024
S2
Aug 12, 2024

Scope of Audit

The scope of this audit was to analyze the Landshare Contract for quality, security, and correctness.

Methodology: the QuillAudits smart contract audit process.

speedometer
0
50%
60%
70%
90%
100%
94.9%
AUDIT SCORE
icon

High

Medium

Low

Informational

open0000
acknowledged0003
partially resolved0000
resolved5012

High Severity Issues

Inflation Attack in deposit Function

Resolved
arrow-right
Description

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.

Contract

contracts/v1/CrossChainVault.sol

Recommendation

To prevent this inflation attack take into account only tokens that were sent to contract with deposit instruction and do not account tokens send directly to contract. This can be achieved by creating additional variable like for example tokenBalance - and adjust value of variable with token withdrawals and deposits.

Potential Gas Limit Exploitation in CrossChainSender

Resolved
arrow-right
Description

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.

Contract

contracts/v1/CrossChainSender.sol

Recommendation

Set a maximum gas limit that users can specify to prevent excessive gas usage. Alternatively, modify the financial model to require users to pay for their own CCIP transaction fees, ensuring that any excessive gas costs are borne by the users and not the admin.

The onBehalfOf Parameter in CrossChainSender Allows Unauthorized Withdrawals

Resolved
arrow-right
Description

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.

Contract

contracts/v1/CrossChainSender.sol

Recommendation

Remove the onBehalfOf parameter from the transfer function in the CrossChainSender contract. Ensure that onBehalfOf is always set to msg.sender to prevent unauthorized withdrawals and to maintain user control over the timing and execution of their token unstaking.

Incorrect Financial Model for Sending Cross-Chain Transactions Leads to Potential LINK Drain

Resolved
arrow-right
Description

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.

Contract

contracts/v1/CrossChainSender.sol

Recommendation

Revise the financial model to require users to cover the CCIP message fees instead of the admin. This change will ensure that users bear the cost of their transactions and mitigate the risk of malicious users draining LINK tokens from the protocol.

Unauthorized "Harvest" Call Allows Users to Drain Admin-Provided LINK and Receive Call Fees

Resolved
arrow-right
Description

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.

Contract

contracts/v1/CrossChainSender.sol

Recommendation

Restrict the "Harvest" instruction so that only the admin can execute it, ensuring that only the entity paying the bridge fees can initiate the harvest. This prevents unauthorized users from exploiting the system to drain LINK and receive call fees.

Low Severity Issues

Informational Issues

Appendix

Disclaimer

LandShare

LandShare

High Severity Issues
Low Severity Issues
Informational Issues
Appendix
Disclaimer
View Report PDF

Get an Audit done today for your Smart Contract

Join 1500+ leaders who secured themselves from losing Billion Dollars

cta-banner
cta-banner-bgcta-banner-bg-mobile

Related audits

WE SECURE EVERYTHING YOU BUILD.

From day-zero risk mapping to exchange-ready audits, QuillAudits helps projects grow with confidence. Smart contracts, dApps, infrastructure, compliance: secured end to end.

QuillAudits Logo


ISO 27001Circle Alliance Program
Uniswap FoundationAethiropt-collectivePolygon SPNBNB Chain Kickstart

All Rights Reserved. © 2026. QuillAudits - LLC