Skip to content

Commit

Permalink
doc: comment to notice compatible LST token type (#69)
Browse files Browse the repository at this point in the history
* doc: comment to notice compatible LST token type

* doc: notice native restaking virtual token address

* doc: fix typo

* doc: fix typo

* Update src/core/Vault.sol

Co-authored-by: Max <[email protected]>

* Update src/core/ExocoreGateway.sol

Co-authored-by: Max <[email protected]>

* Update src/core/ExocoreGateway.sol

---------

Co-authored-by: Max <[email protected]>
  • Loading branch information
adu-web3 and MaxMustermann2 authored Aug 1, 2024
1 parent 654c9e9 commit eac5558
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/core/ExocoreGateway.sol
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,13 @@ contract ExocoreGateway is
}

/// @inheritdoc IExocoreGateway
/// @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.
/// @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,
Expand Down
4 changes: 4 additions & 0 deletions src/core/Vault.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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, 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 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();
Expand Down

0 comments on commit eac5558

Please sign in to comment.