BakeLand

BakeLand Smart Contract Audit Report

Share
Share
BeraChainBeraChain
GameFiDiamond ProxyCross chain+5
BeraChainBeraChain
GameFiDiamond Proxy+6

QuillAudits audited the BakeLand smart contracts on BeraChain between Apr 2, 2025 and Jun 24, 2025. The audit found 37 issues: 2 high, 9 medium, 17 low, 9 informational, of which 35 resolved and 2 acknowledged.

Project Description

The Bakeland contract is a cross-chain DeFi protocol built on
a Diamond upgradeable architecture, integrating LayerZero
and Wormhole for seamless cross-chain operations. The
system enables users to participate in staking pools, conduct
cross-chain raids, and manage token delegations across
multiple chains.
At its core, the protocol implements a unique raiding
mechanism where users can stake BUDS tokens in pools and
participate in risk-based raiding activities. The system
leverages LayerZero’s OApp protocol for cross-chain
messaging and Wormhole’s query response system for secure
state verification. This dual-bridge approach ensures reliable
cross-chain communication while maintaining data integrity.

Timeline

S1
Apr 2, 2025
S2
Jun 24, 2025

Scope of Audit

The scope of this Audit was to analyze the Bakeland Smart Contracts for quality, security, and correctness.

Methodology: the QuillAudits smart contract audit process.

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

High

Medium

Low

Informational

open0000
acknowledged0011
partially resolved0000
resolved29168

High Severity Issues

Signature replay in both updateGlobalState() and get PoolData()

Resolved
arrow-right
Description

Replaying the signature in both updateGlobalState(), getPoolData() is possible if done within 5 min utes of response/signature creation. The parseAndVerifyQueryResponse() returns r of type ParsedQueryResponse, which contains nonce, this nonce is not used in the function implementation to validate that this response uses a new nonce. This should be noted that the nonce needs to be different for every wormhole query request. So that the nonce in the bytes response can be different, which can be used in the contract for nonce vali dation. The impact of this issue can allow a malicious user to update the data according to the past data. Even if this attack works within the 5 minutes of response/signature creation, it should be noted that the actions/calls that increase protocol tvl can happen within these 5 minutes, which has the ability to impact the calculations for pool APR and saturation as these state updates will happen on this/current chains.

Contract

StateUpdate.sol

Recommendation

For this nonce validation, the contract should maintain uint InContractNonce variable in the contract, which should be checked against the r.nonce in the updateGlobalState()/getPoolData() function. the InContractNonce will be increased for every updateGlobalState()/getPoolData() call and should match the nonce of the current wormhole query request. If r.nonce and the InContractNonce are not same, then the transaction should revert, assuming that the signature is getting reused.

Cross chain signature replay in both updateGlobal State() and getPoolData()

Resolved
arrow-right
Description

Generally, the signature and response for the contract deployed on the Chain 2, for example, will be used on Chain 1. In case there are another chain, Chain 4, where the contract is deployed and the response and sig natures are generated for that chain to use on Chain 3, Then these responses and signatures can be used on chain 1 because there are no checks happening for the received response in both update GlobalState() and getPoolData()

Contract

StateUpdate.sol

Recommendation

The r.responses[i].chainId should be used in the for{} loop of updateGlobalState()/getPoolData() to check if it matches the expected chain ID. For this, a variable like uint expectedChainId can be main tained in the contract storage (depending on the requirement, the setter method can be added to change it by an authorized account). This maintained expectedChainId will be compared with the r.responses[i].chainId to check that it's coming from the expected chain

Medium Severity Issues

Low Severity Issues

Informational Issues

Appendix

Disclaimer

BakeLand

BakeLand

High Severity Issues
Medium 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