The quote()
function in the TempleTeleporter
contract would returns an incorrect fee estimation due to the use of an incorrect payload bytes.
The quote()
function uses abi.encodePacked(_to, _amount)
as payload bytes for quoting. However, the actural payload bytes in teleport()
is abi.encodePacked(to.addressToBytes32(), amount)
, which is equivalent to abi.encode(_to, _amount)
.
As a result, users would receive an incorrect fee estimation from quote()
.
Since the fee quotation in quote()
is incorrect, using this value as the msg.value
in teleport()
might cause the transaction to fail. This could result in unnecessary gas fees for the user and compromise their experience.
Manual review
Update the payload calculation in quote()
as follows:
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.