From e9fa79918021ff25c5452c2feaac293b54e98936 Mon Sep 17 00:00:00 2001 From: adu Date: Thu, 1 Aug 2024 10:42:32 +0800 Subject: [PATCH 1/7] doc: comment to notice compatible LST token type --- src/core/ExocoreGateway.sol | 4 ++++ src/core/Vault.sol | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/core/ExocoreGateway.sol b/src/core/ExocoreGateway.sol index 2f6503d6..4be67c88 100644 --- a/src/core/ExocoreGateway.sol +++ b/src/core/ExocoreGateway.sol @@ -170,6 +170,10 @@ contract ExocoreGateway is } /// @inheritdoc IExocoreGateway + /// @dev tokens can only be normal reward-bearong LST tokens like wstETH, eETH, jitoSol... + /// And they are not intended to be: 1) rebasing tokens like stETH, since we assume staker's + /// balance would not change if nothing is done after deposit, 2) fee-on-transfer tokens, since we + /// assume Vault would count for the amount that staker transfers to it. function addOrUpdateWhitelistTokens( uint32 clientChainId, bytes32[] calldata tokens, diff --git a/src/core/Vault.sol b/src/core/Vault.sol index 57c9acc6..9ab83e30 100644 --- a/src/core/Vault.sol +++ b/src/core/Vault.sol @@ -34,6 +34,10 @@ contract Vault is Initializable, VaultStorage, IVault { /// @notice Initializes the Vault contract. /// @param underlyingToken_ The address of the underlying token. /// @param gateway_ The address of the gateway contract. + /// @dev Vault only works with normal ERC20 like reward-bearing LST tokens like wstETH, eETH. + /// And It is not intended to be used for: 1) rebasing token like stETH, since we assume staker's + /// balance would not change if nothing is done after deposit, 2) fee-on-transfer token, since we + /// assume Vault would count for the amount that staker transfers to it. function initialize(address underlyingToken_, address gateway_) external initializer { if (underlyingToken_ == address(0) || gateway_ == address(0)) { revert Errors.ZeroAddress(); From 949e2e334ccd83559d881d302230991ba46abc59 Mon Sep 17 00:00:00 2001 From: adu Date: Thu, 1 Aug 2024 10:51:19 +0800 Subject: [PATCH 2/7] doc: notice native restaking virtual token address --- src/core/ExocoreGateway.sol | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/core/ExocoreGateway.sol b/src/core/ExocoreGateway.sol index 4be67c88..ea8b3a8e 100644 --- a/src/core/ExocoreGateway.sol +++ b/src/core/ExocoreGateway.sol @@ -170,10 +170,13 @@ contract ExocoreGateway is } /// @inheritdoc IExocoreGateway - /// @dev tokens can only be normal reward-bearong LST tokens like wstETH, eETH, jitoSol... + /// @notice Tokens can only be normal reward-bearong LST tokens like wstETH, eETH, jitoSol... /// And they are not intended to be: 1) rebasing tokens like stETH, since we assume staker's /// balance would not change if nothing is done after deposit, 2) fee-on-transfer tokens, since we /// assume Vault would count for the amount that staker transfers to it. + /// @notice If we want to activate client chain's native restaking, we should add the corresponding virtual + /// token address to the whitelist, bytes32(bytes20(0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE)) for Ethereum + /// native restaking for example. function addOrUpdateWhitelistTokens( uint32 clientChainId, bytes32[] calldata tokens, From 9ac7777158de9d6c1577005cb466fda3b1b63432 Mon Sep 17 00:00:00 2001 From: adu Date: Thu, 1 Aug 2024 10:57:09 +0800 Subject: [PATCH 3/7] doc: fix typo --- src/core/Vault.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/Vault.sol b/src/core/Vault.sol index 9ab83e30..c3f7de71 100644 --- a/src/core/Vault.sol +++ b/src/core/Vault.sol @@ -34,7 +34,7 @@ contract Vault is Initializable, VaultStorage, IVault { /// @notice Initializes the Vault contract. /// @param underlyingToken_ The address of the underlying token. /// @param gateway_ The address of the gateway contract. - /// @dev Vault only works with normal ERC20 like reward-bearing LST tokens like wstETH, eETH. + /// @dev Vault only works with normal ERC20 like reward-bearing LST tokens like wstETH, rETH. /// And It is not intended to be used for: 1) rebasing token like stETH, since we assume staker's /// balance would not change if nothing is done after deposit, 2) fee-on-transfer token, since we /// assume Vault would count for the amount that staker transfers to it. From f62434fdacb569ff7712044ae1e2c685fd6ee8a8 Mon Sep 17 00:00:00 2001 From: adu Date: Thu, 1 Aug 2024 10:57:55 +0800 Subject: [PATCH 4/7] doc: fix typo --- src/core/ExocoreGateway.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/ExocoreGateway.sol b/src/core/ExocoreGateway.sol index ea8b3a8e..0e5eacf0 100644 --- a/src/core/ExocoreGateway.sol +++ b/src/core/ExocoreGateway.sol @@ -170,7 +170,7 @@ contract ExocoreGateway is } /// @inheritdoc IExocoreGateway - /// @notice Tokens can only be normal reward-bearong LST tokens like wstETH, eETH, jitoSol... + /// @notice Tokens can only be normal reward-bearong LST tokens like wstETH, rETH, jitoSol... /// And they are not intended to be: 1) rebasing tokens like stETH, since we assume staker's /// balance would not change if nothing is done after deposit, 2) fee-on-transfer tokens, since we /// assume Vault would count for the amount that staker transfers to it. From 6d01a8902f0b5cd7bf6da89450aa8208c4d0fd67 Mon Sep 17 00:00:00 2001 From: adu Date: Thu, 1 Aug 2024 11:13:22 +0800 Subject: [PATCH 5/7] Update src/core/Vault.sol Co-authored-by: Max <82761650+MaxMustermann2@users.noreply.github.com> --- src/core/Vault.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/Vault.sol b/src/core/Vault.sol index c3f7de71..c5fc99ba 100644 --- a/src/core/Vault.sol +++ b/src/core/Vault.sol @@ -37,7 +37,7 @@ contract Vault is Initializable, VaultStorage, IVault { /// @dev Vault only works with normal ERC20 like reward-bearing LST tokens like wstETH, rETH. /// And It is not intended to be used for: 1) rebasing token like stETH, since we assume staker's /// balance would not change if nothing is done after deposit, 2) fee-on-transfer token, since we - /// assume Vault would count for the amount that staker transfers to it. + /// assume Vault would account for the amount that staker transfers to it. function initialize(address underlyingToken_, address gateway_) external initializer { if (underlyingToken_ == address(0) || gateway_ == address(0)) { revert Errors.ZeroAddress(); From 3f46ffb319a80868ef31a94fe70d353b4f81a54d Mon Sep 17 00:00:00 2001 From: adu Date: Thu, 1 Aug 2024 11:13:50 +0800 Subject: [PATCH 6/7] Update src/core/ExocoreGateway.sol Co-authored-by: Max <82761650+MaxMustermann2@users.noreply.github.com> --- src/core/ExocoreGateway.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/ExocoreGateway.sol b/src/core/ExocoreGateway.sol index 0e5eacf0..13b2de4c 100644 --- a/src/core/ExocoreGateway.sol +++ b/src/core/ExocoreGateway.sol @@ -173,7 +173,7 @@ contract ExocoreGateway is /// @notice Tokens can only be normal reward-bearong LST tokens like wstETH, rETH, jitoSol... /// And they are not intended to be: 1) rebasing tokens like stETH, since we assume staker's /// balance would not change if nothing is done after deposit, 2) fee-on-transfer tokens, since we - /// assume Vault would count for the amount that staker transfers to it. + /// assume Vault would account for the amount that staker transfers to it. /// @notice If we want to activate client chain's native restaking, we should add the corresponding virtual /// token address to the whitelist, bytes32(bytes20(0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE)) for Ethereum /// native restaking for example. From 5c00ab095dc967ee94a6a35532de26c9bc56095b Mon Sep 17 00:00:00 2001 From: adu Date: Thu, 1 Aug 2024 11:33:07 +0800 Subject: [PATCH 7/7] Update src/core/ExocoreGateway.sol --- src/core/ExocoreGateway.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/ExocoreGateway.sol b/src/core/ExocoreGateway.sol index 13b2de4c..c696ba50 100644 --- a/src/core/ExocoreGateway.sol +++ b/src/core/ExocoreGateway.sol @@ -170,7 +170,7 @@ contract ExocoreGateway is } /// @inheritdoc IExocoreGateway - /// @notice Tokens can only be normal reward-bearong LST tokens like wstETH, rETH, jitoSol... + /// @notice Tokens can only be normal reward-bearing LST tokens like wstETH, rETH, jitoSol... /// And they are not intended to be: 1) rebasing tokens like stETH, since we assume staker's /// balance would not change if nothing is done after deposit, 2) fee-on-transfer tokens, since we /// assume Vault would account for the amount that staker transfers to it.