Not calculating the cost when sending transaction crosschain wilth ZL could lead to user loses in the form of Temple tokens or overpaying transaction fees.
The protocol uses LZ's OApp in TempleTeleporter
to send cross chain messages that burns Temple tokens on the current chain and mints them on the destination chain. It uses OTF in templeGold
to send TGLD crosschain.
In both cases tokens are burned on the current chain and minted on the destination chain. Both use _lzSend
to send the message.
The first problem is than in both cases the user passes the fee amount. This could cause loses of Temple Tokens and TGLD if the fee amount is NOT enough to execute the transaction on the target chain (mint to tokens on the target chain), because tokens would be burned on the current chain.
Another issue here is that if a user sends more gas for the target chain transaction the excess would NOT be refunded. As stated in the LZ docs the refund address passed in _lzSend
is only in case the transaction reverts.
"The refund address in case the send call reverts."
https://docs.layerzero.network/v2/developers/evm/oapp/overview#message-execution-options
Loss of user funds
Manual review, LZ Docs
For the TempleTeleporter
check if msg.value
is greater than quote amount
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.