Skip to content

fix(contracts): remove msg.value != _value check in depositTransaction#219

Open
KyrinCode wants to merge 1 commit intodevfrom
fix-force-tx
Open

fix(contracts): remove msg.value != _value check in depositTransaction#219
KyrinCode wants to merge 1 commit intodevfrom
fix-force-tx

Conversation

@KyrinCode
Copy link
Copy Markdown

This check prevents force inclusion value transfers on CGT chains. In CGT mode, msg.value must be 0, which forces _value to also be 0. This blocks legitimate use of existing L2 balance via deposit transactions.

The upstream ethereum-optimism does not have this check. Removing it allows EOAs to force include native token (OKB) transfers on L2 using their existing L2 balance, without any L1→L2 asset bridging.

Safety: mint is determined by msg.value (=0), so no tokens are created. The EVM layer validates sender has sufficient L2 balance before transferring.

This check prevents force inclusion value transfers on CGT chains.
In CGT mode, msg.value must be 0, which forces _value to also be 0.
This blocks legitimate use of existing L2 balance via deposit transactions.

The upstream ethereum-optimism does not have this check.
Removing it allows EOAs to force include native token (OKB) transfers
on L2 using their existing L2 balance, without any L1→L2 asset bridging.

Safety: mint is determined by msg.value (=0), so no tokens are created.
The EVM layer validates sender has sufficient L2 balance before transferring.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant