<!-- canonical: https://0xsimao.com/findings/metazero-i-revert-gas-destination-peer -->

# Send should revert if the gas limit has not been set for a destination chain (peer)

Crit/High · Three Sigma · Omnichain RWA tokenisation · 27th January, 2024

Finding 3S-MetaZero-H01 of the MetaZero Omnichain NFTs security review.

- Protocol: https://metazero.gg/
- Report: /reports/metazero-i
- Source: https://cdn.sanity.io/files/qoqld077/production/1b1ab4ff365756fe1d86767f1e06744407570f5a.pdf

---

### Description

[send()](https://github.com/threesigmaxyz/metazero-issues-external/blob/master/src/ONFTV2-721C.sol#L98) allows users to send messages with 0 gas limit if the gasLimit mapping has not be
seen for a certain peer. This will likely make the transaction revert on the destination chain,
losing the funds. POC [here](https://github.com/threesigmaxyz/metazero-issues-external/blob/master/test/test.t.sol#L93).

### Recommendation

Revert if trying to send a message to _dstEid whose gas limit was not yet set.

### Status

Addressed in 98f36e9.

---

Related findings:

- [triggerSendFrom() will send all the ETH in the destination chain where sendFrom() is called to the refundAddress in the LzCallParams argument](https://0xsimao.com/findings/tapioca-dao-eth-refund-params-argument): Tapioca DAO
- [Exercise option cross chain message in the (m)TapiocaOFT will always revert in the destination, losing debited funds in the source chain](https://0xsimao.com/findings/tapioca-dao-exercise-revert-losing-debited): Tapioca DAO
- [`borrowing::liquidate()` sends the wrong liquidation index to the destination chain, overwritting liquidation information and getting collateral stuck](https://0xsimao.com/findings/autonomint-liquidate-liquidation-index-stuck): Autonomint
- [_crossTransfer(...) should revert if users specify routerByDomain[destDomain] as destination](https://0xsimao.com/findings/fuji-finance-transfer-revert-specify-dest): Fuji Finance
