Failing to send enough gas in TempleTeleporter::teleport
, so the receiving endpoint contract can execute the functions required, in this case mint
will make the transaction revert on the destination chain.
In TempleTeleporter::teleport
, the gas amount to use is gathered from the user using TempleTeleport::quote
. If the gas changes drastictly or the user passes in arbitrary amount to send that isn't enough to fulfill the actions on the receiving endpoint, the sending contract will execute it's actions, but the receiving contract will revert.
In the case of Temple, TempleTeleporter::teleport
will burn the tokens on the sending contract, and mint them on the receiving contract. If the transaction reverts on the receiving contract, the user's tokens will be burnt but not minted on the receiving contract leading to loss of funds.
Here's a PoC add it into the test file TempleGoldLayerZero.t.sol
Foundry
Add a minimum gas amount, or handle a refund mechanism incase of reverts happening to prevent loss of 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.