Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
7b03393
feat(cgt): add function specification to system config
hexshire Jul 24, 2025
bbd9dff
feat(cgt): add portal modifications
hexshire Jul 24, 2025
8cb2082
feat(cgt): block donateETH function
hexshire Jul 24, 2025
e5b1231
feat(cgt): messengers and bridges update
hexshire Jul 25, 2025
9c02927
feat(cgt): fee vaults update
hexshire Jul 25, 2025
c227a12
feat(cgt): new predeploys
hexshire Jul 25, 2025
02e3027
feat(cgt): weth to wna
hexshire Jul 25, 2025
abbbb0f
feat(cgt): wip address review comments
hexshire Jul 25, 2025
a26d921
feat(cgt): address review comments
hexshire Jul 25, 2025
30ae7e6
chore(cgt): undo changes on interop spec
hexshire Jul 29, 2025
f73dfe1
chore(cgt): apply correct fork name
hexshire Jul 29, 2025
b361e96
chore(cgt): clarify weth behavior
hexshire Jul 29, 2025
ce638e6
chore(cgt): fix liquidity controller invariants
hexshire Jul 29, 2025
95fc943
chore(cgt): add custom gas token flag detail
hexshire Jul 29, 2025
4246e7c
chore: run linters
hexshire Jul 29, 2025
fd737c5
chore: use jovian folder
hexshire Aug 4, 2025
2598c19
Update specs/protocol/jovian/predeploys.md
hexshire Aug 5, 2025
42adecb
Update specs/protocol/jovian/predeploys.md
hexshire Aug 5, 2025
33bf6b4
chore(cgt): address review comment
hexshire Aug 6, 2025
012a212
chore(cgt): address review comment
hexshire Aug 6, 2025
afcebbe
chore(cgt): address review comment
hexshire Aug 6, 2025
681c8d2
chore(cgt): address review comment
hexshire Aug 6, 2025
ec3aac6
Update specs/protocol/jovian/bridges.md
hexshire Aug 11, 2025
3c516ef
Update specs/protocol/jovian/optimism-portal.md
hexshire Aug 11, 2025
22f9879
chore(cgt): address review comment
hexshire Aug 11, 2025
00abcfb
chore(cgt): address review comments
hexshire Aug 13, 2025
839c883
chore(cgt): address review comments
hexshire Aug 13, 2025
a25aa9d
feat(cgt): bridge spec (#48)
hexshire Aug 13, 2025
0787e74
chore(cgt): new cgt bridges spec
hexshire Aug 13, 2025
cb1830b
chore(cgt): remove bridge spec
hexshire Aug 15, 2025
aa94a2b
chore(cgt): update cgt flag location
hexshire Aug 15, 2025
67dc17f
chore: remove unnecessary block and run linters
hexshire Aug 19, 2025
74b292e
chore: add l1block details
hexshire Aug 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion specs/interop/managed-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ the file containing the jwt secret should be provided to the supervisor instance
## Node `->` Supervisor

Events that a supervisor should subscribe to, originating from the node, handled by the supervisor. For the used types,
refer [this](#Types) section.
refer [this](#types) section.
Comment thread
hexshire marked this conversation as resolved.

Every event sent from the node is of type `ManagedEvent` whose fields are populated with the events that occurred. All
non-null events are sent at once. The other fields are omitted.
Expand Down
19 changes: 19 additions & 0 deletions specs/protocol/jovian/bridges.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Bridges

<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents**

- [Overview](#overview)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

## Overview

ETH bridging functions MUST revert when Custom Gas Token mode is enabled and the function involves ETH transfers.
Comment thread
hexshire marked this conversation as resolved.
This revert behavior is necessary because when a chain operates in Custom Gas Token mode, ETH is no longer the native
asset used for gas fees and transactions. The chain has shifted to using a different native asset entirely.
Allowing ETH transfers could create confusion about which asset serves as the native currency, potentially leading
to user errors and lost funds. Additionally, the custom gas token's supply is managed independently through
dedicated contracts (`NativeAssetLiquidity` and `LiquidityController`), and combining ETH bridging with custom gas
token operations introduces additional complexity to supply management and accounting.
13 changes: 13 additions & 0 deletions specs/protocol/jovian/messengers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Cross Domain Messengers

<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents**

- [Message Passing](#message-passing)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

## Message Passing

The `sendMessage` function MUST revert when Custom Gas Token mode is enabled and `msg.value > 0`.
42 changes: 42 additions & 0 deletions specs/protocol/jovian/optimism-portal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Optimism Portal

<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents**

- [Definitions](#definitions)
- [Custom Gas Token Flag](#custom-gas-token-flag)
- [Rationale](#rationale)
- [Function Specification](#function-specification)
- [isCustomGasToken](#iscustomgastoken)
- [donateETH](#donateeth)
- [depositTransaction](#deposittransaction)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

## Definitions

### Custom Gas Token Flag

The **Custom Gas Token Flag** (`isCustomGasToken`) is a boolean value that indicates
whether the chain is operating in Custom Gas Token mode.

## Rationale

The OptimismPortal's ETH-related logic must revert when Custom Gas Token mode is enabled to prevent ETH from
acting as the native asset. Since the client side does not discern native asset supply creation, allowing
ETH deposits would incorrectly imply that it can be minted in the chain.

## Function Specification

### isCustomGasToken

Returns true if the gas token is a custom gas token, false otherwise.

### donateETH

- MUST revert if `isCustomGasToken()` returns `true` and `msg.value > 0`.

### depositTransaction

- MUST revert if `isCustomGasToken()` returns `true` and `msg.value > 0`.
45 changes: 45 additions & 0 deletions specs/protocol/jovian/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

- [Execution Layer](#execution-layer)
- [Consensus Layer](#consensus-layer)
- [Smart Contracts](#smart-contracts)
- [Core L2 Smart Contracts](#core-l2-smart-contracts)
- [Custom Gas Token](#custom-gas-token)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

Expand All @@ -14,3 +17,45 @@ This document is not finalized and should be considered experimental.
## Execution Layer

## Consensus Layer

## Smart Contracts

- [Predeploys](./predeploys.md)
- [Bridges](./bridges.md)
- [Cross Domain Messengers](./messengers.md)
- [System Config](./system-config.md)
- [Withdrawals](./withdrawals.md)
- [Optimism Portal](./optimism-portal.md)

### Core L2 Smart Contracts

#### Custom Gas Token

The Custom Gas Token (CGT) feature allows OP Stack chains to use a native asset other than ETH as the gas
currency. This implementation introduces a streamlined approach with minimal core code intrusion through a
single `isCustomGasToken()` flag.

Key components:

- **NativeAssetLiquidity**: A predeploy contract containing pre-minted native assets, deployed only for
CGT-enabled chains.
- **LiquidityController**: An owner-governed mint/burn router that manages supply control, deployed only for
CGT-enabled chains.
- **ETH Transfer Blocking**: When CGT is enabled, all ETH transfer flows in bridging methods are disabled via
the `isCustomGasToken()` flag.
- **ETH Bridging Disabled**: ETH bridging functions in `L2ToL1MessagePasser` and `OptimismPortal` MUST revert
when CGT mode is enabled to prevent confusion about which asset is the native currency.
- **Native Asset Bridging**: Custom Gas Token chains use dedicated CGT bridges (`L1CGTBridge` and
`L2CGTBridge`) for native asset transfers between L1 ERC20 tokens and L2 native assets.
- **WETH as ERC20**: ETH can still be bridged as WETH using the standard `OptimismMintableERC20` bridging
path through `L2StandardBridge`.

OP Stack chains that use a native asset other than ETH (or the native asset of the settlement layer)
introduce custom requirements that go beyond the current supply management model based on deposits and
withdrawals. This architecture decouples and winds down the native bridging for the native asset, shifting
the responsibility for supply management to the application layer. The chain operator becomes responsible
for defining and assigning meaning to the native asset, which is managed through a new set of predeployed
contracts.

This approach preserves full alignment with EVM equivalence and client-side compatibility as provided by the
standard OP Stack. No new functionalities outside the execution environment are required to make it work.
Loading