The send
function in the TempleGold
contract lacks sufficient validation for the fees specified in the _fee
parameter. This oversight can lead to potential vulnerabilities or disruptions in cross-chain token transfers due to unreasonable fees or insufficient user funds.
The send
function facilitates cross-chain transfers of Temple Gold tokens (TGLD) and interacts with the LayerZero endpoint. However, it fails to adequately validate the following aspects related to fees within the _fee parameter.
The function does not verify whether the fees specified in _fee
are reasonable or within expected ranges. This can lead to users inadvertently specifying excessively high or invalid fees, affecting transaction viability or user experience.
There is no validation to ensure that the user initiating the transfer has sufficient funds to cover the fees specified in _fee
. This oversight can result in transaction failures or incomplete transfers if users do not provide adequate funds upfront.
See the following code:
Specifying unreasonable fees can lead to transaction rejections or failures, disrupting cross-chain transfer operations. Inadequate fee validation may result in unexpected costs for users, affecting trust and usability of the contract. Exploitation of fee validation gaps could potentially be leveraged by malicious actors to manipulate transaction outcomes or disrupt contract operations.
Manual Review
Validate that the user initiating the transfer has sufficient token balances to cover the fees specified in _fee
. This can prevent transaction failures due to insufficient funds.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.