Lido
wstETH on Starknet

A deployment verification for bridging Lido's wstETH to Starknet through StarkGate. We checked audit coverage, roles, on-chain state and deployment scripts against Lido's guidelines for rollup bridges.
report id
0299
category
Cross-chain & Bridges
language
Cairo
final report
November 14, 2024
lines of code
0
Content

Download audit report

1

Executive Summary

This document outlines the deployment verification and audit reports’ assessment by Nethermind Security for Lido wstETH (Wrapped Staked ETH to Starknet through StarkGate, the canonical bridge of Starknet.

The verification reported in this document assess compliance with the following key areas:

  • Audit Report Verification: Section 4.1 provides verification of audit report existence, scope compliance, vulnerability fixes, and final commits.
  • Role Model Verification: Section 4.2 outlines the findings on defined roles, verifying the presence of members assigned to each respective role.
  • State Investigation: Section 4.3 details collected information, including slot values and the most relevant state variables for each inspected contract, with the latest transaction hashes where updates occurred.
  • Deployment Script Check: Section 4.4 provides insights on deployment scripts for Ethereum and Starknet contracts.
  • Documentation Check: Section 8 evaluates documentation across contexts such as bridge architecture, updates, and deployment procedures.
  • wstETH Rollup Bridging Guide: Section 4.5 reports on the verification of control measures aligning with Lido’s best practices, including pause functionality and lock-and-mint bridge mechanisms.
Total findings
0
Fixed
0
Acknowledged
0
Mitigated
0
Unresolved
0

Findings by severity

  • Critical0
  • High0
  • Medium0
  • Low0
  • Informational0
  • Best Practices0

2

Audited Files

This report encompasses the verification of the following deployed contracts:

Audit Reports

3

Summary of Issues

This report is a deployment verification: it does not classify issues. The result of each check is in System Overview.

4

System Overview

4.1 Audit report verification

Description: The Nethermind Security team verified the presence of three audit reports. The investigation relies on scope compliance, fixing vulnerabilities, and the final commit review (checking if the recommendations were applied correctly). The outcome of this investigation is listed below:

  • Lido Starknet Governance Forwarder - This audit was conducted by QuillAudits for the BridgeExecutor contract implemented in the Cairo language. The initial commit hash is 80545985b65e151729cfb9a0b4173a7a102b4e0e. The report consists of five issues classified into different severity risks: High (1), Medium (1), and Low (3). All of them were fixed, except for one Low. The commit a4965a1663beb28ca4913aacfcf8775e330c35e4 contains all the fixes for the issues, except for one low issue with the status Acknowledged. Report typo: Page 3 summarizes the number of issues, their severities, and statuses. However, it lacks one Low severity issue and its status.
  • StarkGate 2.0 bridge and L2 ERC20: This audit was conducted in October 2023 by Zellic for several contracts: TokenBridge, PermissionedERC20, StarknetTokenBridg, StarkgateManager, StarkgateRegistry, and StarkgateEthBridge. The initial commit hash is 78b73afe5de30a0cd6d7e05bce8ca110be57d10a. Zellic team detected six issues classified into Medium (1), Low (2), and Informational (3). The final commit hash eedee8304e8c407c2e0e03c83187dbc5dcc6787e contains all the fixes for issues, with the exception of two low severity issues with the status Acknowledged. Remarks: The commit hash that contains the deployed contracts is not the final commit hash described in the audit report. The deployed versions corresponds to the commit 5a10fd263d29cd032b7229691d043520edae0737 . The differences between the two versions can be seen in the following link.
  • StarkGate 2.0 bridge and L2 ERC20: This audit was conducted in October 2024 by Zellic for all Cairo and Solidity code in the src directory. The initial commit hash is 5a10fd263d29cd032b7229691d043520edae0737. Zellic team detected one issue classified into High (1) and the final commit hash 45941888479663ac93e898cd7f8504fa9066c54c contains the fix for it.

4.2 Role Model Verification

4.2.1 StarkGate: wstETH bridge

Both sides of the bridge use a Role Model composed of multiple roles with separate responsibilities. Each of these roles is administered by another role in charge of managing the role’s members. Roles are identified by their bytes32 identifiers, which are defined as public constant hash digests. The following table lists the existing roles and their corresponding hashes:

Role AdminValue
GOVERNANCE_ADMIN03711C9D994FAF6055172091CB841FD4831AA743E6F3315163B06A122C841846
UPGRADE_GOVERNOR0251E864CA2A080F55BCE5DA2452E8CFCAFDBC951A3E7FFF5023D558452EC228
APP_ROLE_ADMIN03E615638E0B79444A70F8C695BF8F2A47033BF1CF95691EC3130F64939CEE99
APP_GOVERNOR00D2EAD78C620E94B02D0A996E99298C59DDCCFA1D8A0149080AC3A20DE06068
OPERATOR023EDB77F7C8CC9E38E8AFE78954F703AEEDA7FFFE014EEB6E56EA84E62F6DA7
TOKEN_ADMIN0128D63ADBF6B09002C26CAF55C47E2F26635807E3EF1B027218AA74C8D61A3E
SECURITY_ADMIN026BD110619D11CFDFC28E281DF893BC24828E89177318E9DBD860CDAEDEB6B3
SECURITY_AGENT037693BA312785932D430DCCF0F56FFEDD0AA7C0F8B6DA2CC4530C2717689B96

The admin relationship between these roles is expected to adhere to the following table:

RoleRole Admin
GOVERNANCE_ADMINGOVERNANCE_ADMIN
UPGRADE_GOVERNORGOVERNANCE_ADMIN
APP_ROLE_ADMINGOVERNANCE_ADMIN
APP_GOVERNORAPP_ROLE_ADMIN
OPERATORAPP_ROLE_ADMIN
TOKEN_ADMINAPP_ROLE_ADMIN
SECURITY_ADMINSECURITY_ADMIN
SECURITY_AGENTSECURITY_ADMIN

4.2.2 L1 Bridge

For the L1 Endpoint, the following two roles contain at least one member:

  • GOVERNANCE_ADMIN - This role has the authority to assign an account as proxy governor and clears pending governor candidate. It can also remove an account from proxy governor role and clears pending governor candidate. Additionally, only this role can add and remove members from the roles GOVERNANCE_ADMIN, UPGRADE_GOVERNOR, and APP_ROLE_ADMIN.
  • SECURITY_ADMIN - This role has the ability to unset the withdrawal limit for a token.

The only member of these two roles is the account 0x015277f49d5dD035A5F3Ce34aD5eBfDBaCA0C6Ec.

4.2.3 L2 Bridge

For the L2 Endpoint, the following three roles contain at least one member:

  • GOVERNANCE_ADMIN - This is the only role that can add and remove members from the roles GOVERNANCE_ADMIN, UPGRADE_GOVERNOR, and APP_ROLE_ADMIN.
  • UPGRADE_GOVERNOR - This role can add a new implementation data, remove existing implementation data, and replace the nonfinalized current implementation data to one that was previously added and whose activation time had passed.
  • SECURITY_ADMIN - This role has the ability to disable withdrawal limit for a token.

The only member of these three roles is the account 0x45653a585ec600d7f050279376d353f84c7d6d09cf225aefbcb83bfaf4abb07.

4.2.4 StarkGate: wstETH Token

For the L2 token, the following three roles contain at least one member; however, one of them is not used in the current implementation:

  • GOVERNANCE_ADMIN - This role exclusively has the authority to add and remove members from both GOVERNANCE_ADMIN and UPGRADE_GOVERNOR.
  • UPGRADE_GOVERNOR - This role alone can add new implementation data, remove existing implementation data, and replace the non-finalized current implementation data to one that was previously added and whose activation time had passed.
  • SECURITY_ADMIN - (This role is not used in the current implementation)

The only member of these three roles is the account 0x45653a585ec600d7f050279376d353f84c7d6d09cf225aefbcb83bfaf4abb07.

4.2.5 Governance Forwarder

The Governance Forwarder contract uses two roles for executing critical actions.

Besides Cancel operations, all the other operations for managing the Governance Forwarder contract must be executed through messages sent by the Ethereum Governance Executor.

4.3 State Investigation

In this section, the Nethermind Security team presents the information collected during the storage inspection. The information includes the slots and values for the most relevant state variables of each contract, together with the latest transaction where each variable was updated.

4.3.1 L1 Bridge

The following table presents the governance slots for entities (GovernanceInfoStruct struct). The constant PROXY_GOVERNANCE_TAG is the string key used in the Governance storage mapping governanceInfo. The value stored in the constant is:

PROXY_GOVERNANCE_TAG ="StarkEx.Proxy.2019.GovernorsInformation"

For simplicity, the label MEMBER_ADDR_L1 in the tables below represents the only member set as effective governor and the address is 0x015277f49d5dD035A5F3Ce34aD5eBfDBaCA0C6Ec.

Last Update

State VariableSlotValueLast Update
at Txn Hash
governanceInfo[PROXY_GOVERNANCE_TAG].effectiveGovernors[MEMBER_ADDR_L1]0x90b92208de9555671961e2b66c6af94c0b25f16282e9f6cd28c527610659567d10x3403a8...73030d
governanceInfo[PROXY_GOVERNANCE_TAG].candidateGovernor0x45f38e273862f8834bd2fe7a449988f63de55a7a5b685dea46ccedeb69cf0e270x00x3403a8...73030d
governanceInfo[PROXY_GOVERNANCE_TAG].initialized0x01b0dddd7d759bd205fef59d2fa4288af3a4d6c44d638e1157ef86b32e9e1c1f10x430625...e55f91

Governance slots for entities

The table below presents the storage slots used throughout the Proxy pattern. They define an arbitrary location to avoid overlapping by the logical contracts.

State VariableSlot
IMPLEMENTATION_SLOT0x177667240aeeea7e35eabe3a35e18306f336219e1386f7710a6bf8783f761b24
L2_BRIDGE_TAGhash of STARKNET_TOKEN_BRIDGE_L2_TOKEN_CONTRACT
UPGRADE_DELAY_SLOT0xc21dbb3089fcb2c4f4c6a67854ab4db2b0f233ea4b21b21f912d52d18fc5db1f
FINALIZED_STATE_SLOT0x7d433c6f837e8f93009937c466c82efbb5ba621fae36886d0cac433c5d0aa7d2
tokenSettings()[token].maxTotalBalance0x3041252d52563574c35b8d1cd49a52a0cc144f208981902e6ce7a5ba4a6058f4

Storage slots for the Proxy pattern

The table below presents the state variables related to the proxy with their respective values and transaction hashes of the last update.

Last Updated

State VariableValueLast Updated
at Txn Hash
IMPLEMENTATION_SLOT0x6ad74d4b79a06a492c288ef66ef868dd981fdc850xcd8680...49d026
L2_BRIDGE_TAG0x0088eedbe2fe3918b69ccb411713b7fa72079d4eddf291103ccbe41e78a9615c0xe26bb9...ff6734
UPGRADE_DELAY_SLOT259200At deployment transaction
FINALIZED_STATE_SLOT0It never changed
tokenSettings()[token].maxTotalBalance1157920892373161954235709850086879078532699846656405640394575840079131296399350x1e48c9...4746bc

Values stored in the state variables associated to the proxy

The following two tables provide an overview of role-based access control, identifying the administrators for SECURITY_ADMIN and GOVERNANCE_ADMIN roles. The first table displays the storage slots where the administrators’ addresses are held, specifying the slot associated with each administrator role.

State VariableSlot
_roles()[SECURITY_ADMIN].members[MEMBER_ADDR_L1]0x11f2d9aee0769e146db4b38e9cdfa21aa126ce369acbce687dce5816c9ef09a7
_roles()[SECURITY_AGENT].adminRole0x133e8fc3bf3b8cbe8741215d94714cce4d113437771c895d8581377f86bc9b7a
_roles()[SECURITY_ADMIN].adminRole0x2c11a1f9c63817dbb9f0faa966615764d2db5d6e008269e948a99e0b52181c24
_roles()[UPGRADE_GOVERNOR].adminRole0x3504a568a75815c7d149918f124b8511ce97b33034fa85f36f1c13e849386cce
_roles()[TOKEN_ADMIN].adminRole0xb92d8dcbe87ba2b1e5aaf88aae12a6f89f52f6ff057743f29c5ffdb55498b6f8
_roles()[OPERATOR].adminRole0xb30300bed82b2e0ff889fe81a4b0a9ad17f79a0b7b748f3da5b523151d502317
_roles()[GOVERNANCE_ADMIN].adminRole0xa5fdb349cc4ffac7e8ce7d3b075149d1bc847367d814e69a9beca89ef02db8b1
_roles()[APP_ROLE_ADMIN].adminRole0xfad5851dfcf56d90e05c22302d339e27ef0eb32d2866743a1bd2461c6925a7f8
_roles()[APP_GOVERNOR].adminRole0x789965849d43665eb0fa09b289ebd3629b94e51d8eb419502fa992de138405fd
_roles()[GOVERNANCE_ADMIN].members[MEMBER_ADDR_L1]0xd84cccb3683fef6766d20d4e907b11b3fa6189200aac33443ea861c67af0dc5d

Storage slots where the administrator’s addresses are held

The table below describes an overview of the role-based access control with the values in each state variable. These values were set at transaction 0x4eb13c...7baa6e.

For simplicity, the values for role_admin are presented with the respective role name in the table. Their values are listed below:

  • GOVERNANCE_ADMIN: 0x03711c9d994faf6055172091cb841fd4831aa743e6f3315163b06a122c841846
  • APP_ROLE_ADMIN: 0x03e615638e0b79444a70f8c695bf8f2a47033bf1cf95691ec3130f64939cee99
  • SECURITY_ADMIN: 0x026bd110619d11cfdfc28e281df893bc24828e89177318e9dbd860cdaedeb6b3
State VariableValueLast Updated at Txn Hash
_roles()[SECURITY_ADMIN].members[MEMBER_ADDR_L1]10x4eb13c...7baa6e
_roles()[SECURITY_AGENT].adminRoleSECURITY_ADMIN0x4eb13c...7baa6e
_roles()[SECURITY_ADMIN].adminRoleSECURITY_ADMIN0x4eb13c...7baa6e
_roles()[UPGRADE_GOVERNOR].adminRoleGOVERNANCE_ADMIN0x4eb13c...7baa6e
_roles()[TOKEN_ADMIN].adminRoleAPP_ROLE_ADMIN0x4eb13c...7baa6e
_roles()[OPERATOR].adminRoleAPP_ROLE_ADMIN0x4eb13c...7baa6e
_roles()[GOVERNANCE_ADMIN].adminRoleGOVERNANCE_ADMIN0x4eb13c...7baa6e
_roles()[APP_ROLE_ADMIN].adminRoleGOVERNANCE_ADMIN0x4eb13c...7baa6e
_roles()[APP_GOVERNOR].adminRoleAPP_ROLE_ADMIN0x4eb13c...7baa6e
_roles()[GOVERNANCE_ADMIN].members[MEMBER_ADDR_L1]10x4eb13c...7baa6e

Role-based access control overview

4.3.2 L2 Bridge

The following table shows the slots for the most relevant state variables related to the bridge.

State variableSlot
l1_bridge0x00c88ee7a00e0b95f1138ef53d396c4327eeed7f9677bbd02ce82a663537b1cf
erc20_class_hash0x03e4b2efa9f3dc5a5ca304578e8f83c116445fc36a80508f598770ab9d0ba8fa
l2_token_governance0x03acd88ba6181ba1fb253286b276575767587130253bbbed7f7270cd11e8be7d
l1_l2_token_map(0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0)0x54ff3721ea40be0e7c25189adedd9b4c064814f232a61fa25fc4158d5aafbf7
l2_l1_token_map(0x042b8f0484674ca266ac5d08e4ac6a3fe65bd3129795def2dca5c34ecc5f96d2)0x4ab3d9efee6d7e88294d6bb5bd78219cff02c9dcad28d271c118b937d75b1e5
daily_withdrawal_limit_pct0x031b6e2ac42e0e554bf70a1d3d890fda8a700de6068f723a0ec603cac893a1e4
l2_token0x01dc79e2fd056704ede52dca5746b720269aaa5da53301dff546657c16ca07af
upgrade_delay0x003fc801c47df4de8d5835f8bfd4d0b8823ba63e5a3f278086901402d680abfc
finalized0x00cfc0e4c73ce8e46b07c3167ce01ce17e6c2deaaa5b88b977bbb10abe25c9ad

Storage slots for the most state variables for the L2 bridge

The following table shows the values for the most relevant state variables related to the bridge. Last updated at

State variableValueLast updated at
Txn Hash
l1_bridge10927356099723947265287305345487209652037177570190x067f58...5140c3
erc20_class_hash0It never changed
l2_token_governance0It never changed
l1_l2_token_map(0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0)18862128896296311881894971558488835347387561489211117266867569879276301575220x434be2...c0cb72 0x434be2...c0cb72
l2_l1_token_map(0x042b8f0484674ca266ac5d08e4ac6a3fe65bd3129795def2dca5c34ecc5f96d2)726330175714135941764069406682033110407748398240
daily_withdrawal_limit_pct50x434be2...c0cb72
l2_token18862128896296311881894971558488835347387561489211117266867569879276301575220x75a942...dc6f05
upgrade_delay0At deployment transaction
finalized0It never changed

Values Stored in the State Variables Associated to the Bridge

The following table outlines the storage slots used in the L2 endpoint for the role model. The storage variable role_admin stores the admin ID for each role ID in the corresponding slots listed in the table. Moreover, the table also presents the slots where the role_members variable stores a value of 1, confirming the specified role for the account MEMBER_L2_BRIDGE=0x45653a585ec600d7f050279376d353f84c7d6d09cf225aefbcb83bfaf4abb07.

State variableSlot
role_admin(APP_GOVERNOR)0x55f3055e2322652ee76c141ee039dd148f75ca61fd2419f0b15e898fe58ebbb
role_admin(APP_ROLE_ADMIN)0x61f2cbdd29b41cddc7201657f27649d1b4f82f3a902b74c423e85cd873ba383
role_admin(GOVERNANCE_ADMIN)0x51ff9d8e3b9d9153881c6d021c07e41e820360c3abbff54b127a8bc6d613574
role_admin(OPERATOR)0x3357edccf7145387e0368a3ae6bc29ac2faed2e804582512b065eaec608d8f9
role_admin(TOKEN_ADMIN)0x2db6a3aac3da6dac69be905507cfea3f35f35d16e4f8724a63fbcd4f1b7b28d
role_admin(UPGRADE_GOVERNOR)0x67eebb8a37da29031c921351ac6573033c0e3db1d2f205e01a4339afd272a14
role_admin(SECURITY_ADMIN)0x37ab142dd955dadabd954354586ff943a15e7f4c5ae4eaaac1dee2539377465
role_admin(SECURITY_AGENT)0x2d2fdbaf84c6c5ba492118bd3c1fb52ddbc6801331cb9ff654f7684398cec56
role_members(GOVERNANCE_ADMIN, MEMBER_L2_BRIDGE)0x6178675768bb1b18f5efbe571ca463249bcbbc56f6389b56ecbd862a7363205
role_members(UPGRADE_GOVERNOR, MEMBER_L2_BRIDGE)0x6ba59b7522f54b6ae9459b798b25f5a2e372360dafbd4dba776947c716bc709
role_members(SECURITY_ADMIN, MEMBER_L2_BRIDGE)0x151991a0cf89dd4cb2a2cfac842779667cb01c79e3673c7bfc567ff8174919b

Slots for Role Model Implementation in the L2 Endpoint of the Bridge

The table below reveals the current values for role_admin and role_members for a specified role and their last update. As can be noted, MEMBER_L2_BRIDGE is the only member for the three roles: GOVERNANCE_ADMIN, UPGRADE_GOVERNOR, and SECURITY_ADMIN. For convenience, the values for role_admin are presented with the respective role name in the table. Their values are listed below:

  • GOVERNANCE_ADMIN: 1556789761824654631941645422192241267775035395971414146468438977535375841350
  • APP_ROLE_ADMIN: 1763460991315895633316329146706412950670706354561043417663623424241752141465
  • SECURITY_ADMIN: 1095121239723352770772166591718737686966204345253119027477952598736384210611
State variableValueLast Updated at Txn Hash
role_admin(APP_GOVERNOR)APP_ROLE_ADMIN0x434be2...c0cb72
role_admin(APP_ROLE_ADMIN)GOVERNANCE_ADMIN0x434be2...c0cb72
role_admin(GOVERNANCE_ADMIN)GOVERNANCE_ADMIN0x434be2...c0cb72
role_admin(OPERATOR)APP_ROLE_ADMIN0x434be2...c0cb72
role_admin(TOKEN_ADMIN)APP_ROLE_ADMIN0x434be2...c0cb72
role_admin(UPGRADE_GOVERNOR)GOVERNANCE_ADMIN0x434be2...c0cb72
role_admin(SECURITY_ADMIN)SECURITY_ADMIN0x434be2...c0cb72
role_admin(SECURITY_AGENT)SECURITY_ADMIN0x434be2...c0cb72
role_members(GOVERNANCE_ADMIN, MEMBER_L2_BRIDGE)10x434be2...c0cb72
role_members(UPGRADE_GOVERNOR, MEMBER_L2_BRIDGE)10x434be2...c0cb72
role_members(SECURITY_ADMIN, MEMBER_L2_BRIDGE)10x434be2...c0cb72

Current Values and Last Updates for role_admin and role_members in Specified Roles

4.3.3 StarkGate: wstETH Token

The following table shows the slots for the most relevant state variables related to the L2 token.

State variableSlot
permitted_minter0x1390569bb0a3a722eb4228e8700301347da081211d5c2ded2db22ef389551ab
upgrade_delay0x003fc801c47df4de8d5835f8bfd4d0b8823ba63e5a3f278086901402d680abfc
finalized0x00cfc0e4c73ce8e46b07c3167ce01ce17e6c2deaaa5b88b977bbb10abe25c9ad

Slots for the L2 wstETH token

The table below reveals the values stored in the state variables permitted_minter, upgrade_delay, and finalized.

Last updated at

State variableValueLast updated at
at Txn Hash
permitted_minter2419397445738757360752830461762744704477102451845266111460970951396416146840x6ee3c9...c86acf
upgrade_delay0At deployment transaction
finalized0At deployment transaction

Current Values and Last Updates for the L2 wstETH token

The following table shows the slots and current values for the role model implemented in the L2 StarkGate: wstETH Token.

State variableSlot
role_admin(GOVERNANCE_ADMIN)0x51ff9d8e3b9d9153881c6d021c07e41e820360c3abbff54b127a8bc6d613574
role_admin(UPGRADE_GOVERNOR)0x67eebb8a37da29031c921351ac6573033c0e3db1d2f205e01a4339afd272a14
role_members(GOVERNANCE_ADMIN, MEMBER_L2_BRIDGE)0x6178675768bb1b18f5efbe571ca463249bcbbc56f6389b56ecbd862a7363205
role_members(UPGRADE_GOVERNOR, MEMBER_L2_BRIDGE)0x6ba59b7522f54b6ae9459b798b25f5a2e372360dafbd4dba776947c716bc709

Slots for the Role Model Implementation in the L2 wstETH token

As indicated in the table above, MEMBER_L2_BRIDGE in role_members is the only member for GOVERNANCE_ADMIN and UPGRADE_GOVERNOR roles. The address for MEMBER_L2_BRIDGE is

0x45653a585ec600d7f050279376d353f84c7d6d09cf225aefbcb83bfaf4abb07
State variableValueLast updated at Txn Hash
role_admin(GOVERNANCE_ADMIN)GOVERNANCE_ADMIN0x6c86a5...de61a5
role_admin(UPGRADE_GOVERNOR)GOVERNANCE_ADMIN0x6c86a5...de61a5
role_members(GOVERNANCE_ADMIN, MEMBER_L2_BRIDGE)10x6c86a5...de61a5
role_members(UPGRADE_GOVERNOR, MEMBER_L2_BRIDGE)10x6c86a5...de61a5

Current Values and Last Updates for role_admin and role_members - L2 wstETH token

The value stored for GOVERNANCE_ADMIN is:

1556789761824654631941645422192241267775035395971414146468438977535375841350

4.3.4 Starknet governance forwarder

StarkGate: Starknet governance forwarder - Mainnet

Address: 0x07ba4bb6a9ec398598c9c08424af6bdb83f56e78ffc8f07f0da0dfae8deca432

Class hash: 0x0611bf8ac1d6e31031e37e428c48547b8be4179d3d047d95fde9452d6c7a6a15, corresponding to the commit a4965a1663beb28ca.

The following two tables show the slots and current values for state variables that were set at transaction 0x07d925...eacd71.

State variableSlot
grace_period0x00c087fc777ac0972310ae93465273c06e090a0a854ff345ff505e9026f74aab
guardian0x03bcb4375b910093bcf636b6b2f26b26eda2a29ef5a8ee7de44b5743c3bf9a28
minimum_delay0x02e4019d18ae4a4b56836bf8a3d2640c37c5e30eeedc078039977e2077e73576
delay0x004f5c4824d6fe4ecb5e00033e433ffbfd69fc213c4f1e41b731944f129687e5
maximum_delay0x02886b30d4a1385ad9f9fcace02b5c03a634c32385436d5d94ed4fe49b71fee0
ethereum_governance_executor0x01dfe3f85d5823443b30a33c01355b7d453bc48eee894156fc9e9fba2e01292b

Slots for the Starknet Governance Forwarder

The GUARDIAN is the only role that can cancel actions and the currently assigned account is:

1628889469176486951891799519361523237603513148881369604904406283515871767630
State variableValueLast updated at Txn Hash
grace_period360000x07d925...eacd71
guardianGUARDIAN0x07d925...eacd71
minimum_delay4800x07d925...eacd71
delay6000x07d925...eacd71
maximum_delay72000x07d925...eacd71
ethereum_governance_executor4039533067330261119845148342813776915417567245670x07d925...eacd71

Current Values and Last Updates for the State Variables - Starknet Governance Forwarder

4.4 Deployment Script Check

4.4.1 StarkGate: wstETH Bridge

No deployment scripts are provided for the Ethereum or Starknet contracts. However, scripts for compiling the contracts in the expected version are provided. In the case of Starknet, the class hash is already declared, so only a DEPLOY transaction using the class hash is needed.

4.4.2 Governance Forwarder

Declare and deployment scripts are provided for the GovernanceForwarder contract.

4.5 wstETH Rollup Bridging Guide

This section explores how the StarkGate: wstETH bridge adheres to the baseline recommendations encouraged in the bridging guide created by the Network Expansion Workgroup.

4.5.1 R-1: Audited Code and Verifiable Deployment

A third party audited the contracts, and the relevant issues discovered were fixed. However, the deployed code does not correspond to the specific commit where the code was audited or the fixes were applied. The contracts on the Ethereum Mainnet are verified, and their code can be checked from block explorers. However, contracts on Starknet have not been verified.

4.5.2 R-2: “Lock and Mint” Bridge Mechanics

The StarkGate: wstETH uses a “Lock and Mint” mechanism.

4.5.3 R-3: Usage of Canonical Bridge

StarkGate has been developed by Starkware and is considered the canonical bridge for Starknet.

4.5.4 R-4: L2 wstETH Token Upgradable

The proxy architecture is not widely used in Starknet due to the existence of the class hash concept. Accounts can change their class hash through system calls. The wstETH token deployed on Starknet includes an upgradability mechanism that allows changing its behavior if needed.

4.5.5 R-5: Bridging L1 Lido DAO Decisions

At the current moment, there is no Governance Forwarder contract. The Starknet contract is managed by the account:

0x45653a585ec600d7f050279376d353f84c7d6d09cf225aefbcb83bfaf4abb07

4.5.6 R-6: Dedicated Upgradable Bridge Instances

The reviewed contracts are solely used for bridging wstETH. Other tokens have their own bridge or use the MultiToken StarkGate bridge. Both endpoints were designed with upgradable capabilities.

4.5.7 R-7: Pausable Deposits and Withdrawals

The bridge does not implement direct functionality for pausing/unpausing. However, similar results could be achieved through the “limits” functionality.

4.5.8 R-8: Support of ERC-2612 Permit Enhanced with EIP-1271

The StarkGate: wstETH token does not implement the ERC-2612 or EIP-1271.

5

Risk Rating Methodology

The risk rating methodology used by Nethermind Security follows the principles established by the OWASP Foundation. The severity of each finding is determined by two factors: Likelihood and Impact.

Likelihood measures how likely the finding is to be uncovered and exploited by an attacker. This factor will be one of the following values:

  1. High: the issue is trivial to exploit and has no specific conditions that need to be met;
  2. Medium: the issue is moderately complex and may have some conditions that need to be met;
  3. Low: the issue is very complex and requires very specific conditions to be met.

When defining the likelihood of a finding, other factors are also considered. These can include but are not limited to motive, opportunity, exploit accessibility, ease of discovery, and ease of exploit.

Impact is a measure of the damage that may be caused if an attacker exploits the finding. This factor will be one of the following values:

  1. High: the issue can cause significant damage, such as loss of funds or the protocol entering an unrecoverable state;
  2. Medium: the issue can cause moderate damage, such as impacts that only affect a small group of users or only a particular part of the protocol;
  3. Low: the issue can cause little to no damage, such as bugs that are easily recoverable or cause unexpected interactions that cause minor inconveniences.

When defining the impact of a finding, other factors are also considered. These can include but are not limited to data and state integrity, loss of availability, financial loss, and reputation damage. After defining the likelihood and impact of an issue, the severity is determined according to the table below.

Impact / LikelihoodLowMediumHigh
HighMediumHighCritical
MediumLowMediumHigh
LowInfo / Best PracticesLowMedium
UndeterminedUndeterminedUndeterminedUndetermined

To address issues that do not fit a High, Medium or Low severity, Nethermind Security also uses three more finding severities: Informational, Best Practices, and Undetermined.

  1. Informational findings do not pose any risk to the application, but they carry some information that the audit team intends to pass to the client formally;
  2. Best Practice findings are used when some piece of code does not conform with smart contract development best practices;
  3. Undetermined findings are used when we cannot predict the impact or likelihood of the issue.

6

Issues

This report is a deployment verification: it does not classify issues. The result of each check is in System Overview.

7

Documentation Evaluation

Software documentation refers to the written or visual information that describes the functionality, architecture, design, and implementation of software. It provides a comprehensive overview of the software system and helps users, developers, and stakeholders understand how the software works, how to use it, and how to maintain it. Software documentation can take different forms, such as user manuals, system manuals, technical specifications, requirements documents, design documents, and code comments. Software documentation is critical in software development, enabling effective communication between developers, testers, users, and other stakeholders. It helps to ensure that everyone involved in the development process has a shared understanding of the software system and its functionality. Moreover, software documentation can improve software maintenance by providing a clear and complete understanding of the software system, making it easier for developers to maintain, modify, and update the software over time. Smart contracts can use various types of software documentation. Some of the most common types include:

  • Technical whitepaper: A technical whitepaper is a comprehensive document describing the smart contract’s design and technical details. It includes information about the purpose of the contract, its architecture, its components, and how they interact with each other;
  • User manual: A user manual is a document that provides information about how to use the smart contract. It includes step-by-step instructions on how to perform various tasks and explains the different features and functionalities of the contract;
  • Code documentation: Code documentation is a document that provides details about the code of the smart contract. It includes information about the functions, variables, and classes used in the code, as well as explanations of how they work;
  • API documentation: API documentation is a document that provides information about the API (Application Programming Interface) of the smart contract. It includes details about the methods, parameters, and responses that can be used to interact with the contract;
  • Testing documentation: Testing documentation is a document that provides information about how the smart contract was tested. It includes details about the test cases that were used, the results of the tests, and any issues that were identified during testing;
  • Audit documentation: Audit documentation includes reports, notes, and other materials related to the security audit of the smart contract. This type of documentation is critical in ensuring that the smart contract is secure and free from vulnerabilities.

These types of documentation are essential for smart contract development and maintenance. They help ensure that the contract is properly designed, implemented, and tested, and they provide a reference for developers who need to modify or maintain the contract in the future.

8

Remarks & Test Suite

8.1 StarkGate: wstETH Bridge

This section checks the public documentation available for the bridge.

Documentation explaining the bridge architecture and flows can be found in this link. However, there is no documentation specifically detailing the deployment, initialization, and multiple updates that have been done to the wstETH bridge.

8.2 Governance Forwarder

The README file in the contract’s repository provides information about the contract. Instructions on how to execute the provided scripts can also be found there. This information can be complemented with the Aave Governance Crosschain Bridges documentation, which inspired this contract.

As auditors, we recommend that any changes or updates made to the audited codebase undergo a re-audit or security review to address potential vulnerabilities or risks introduced by the modifications. By conducting a re-audit or security review of the modified codebase, you can significantly enhance the overall security of your system and reduce the likelihood of exploitation. However, we do not possess the authority or right to impose obligations or restrictions on our clients regarding codebase updates, modifications, or subsequent audits. Accordingly, the decision to seek a re-audit or security review lies solely with you.

This report is based on the scope of materials and documentation provided by you to Nethermind in order that Nethermind could conduct the security review outlined in 1. Executive Summary and 2. Audited Files. The results set out in this report may not be complete nor inclusive of all vulnerabilities. Nethermind has provided the review and this report on an as-is, where-is, and as-available basis. You agree that your access and/or use, including but not limited to any associated services, products, protocols, platforms, content, and materials, will be at your sole risk. Blockchain technology remains under development and is subject to unknown risks and flaws. The review does not extend to the compiler layer, or any other areas beyond the programming language, or other programming aspects that could present security risks. This report does not indicate the endorsement of any particular project or team, nor guarantee its security. No third party should rely on this report in any way, including for the purpose of making any decisions to buy or sell a product, service or any other asset. To the fullest extent permitted by law, Nethermind disclaims any liability in connection with this report, its content, and any related services and products and your use thereof, including, without limitation, the implied warranties of merchantability, fitness for a particular purpose, and non-infringement. Nethermind does not warrant, endorse, guarantee, or assume responsibility for any product or service advertised or offered by a third party through the product, any open source or third-party software, code, libraries, materials, or information linked to, called by, referenced by or accessible through the report, its content, and the related services and products, any hyperlinked websites, any websites or mobile applications appearing on any advertising, and Nethermind will not be a party to or in any way be responsible for monitoring any transaction between you and any third-party providers of products or services. As with the purchase or use of a product or service through any medium or in any environment, you should use your best judgment and exercise caution where appropriate. FOR AVOIDANCE OF DOUBT, THE REPORT, ITS CONTENT, ACCESS, AND/OR USAGE THEREOF, INCLUDING ANY ASSOCIATED SERVICES OR MATERIALS, SHALL NOT BE CONSIDERED OR RELIED UPON AS ANY FORM OF FINANCIAL, INVESTMENT, TAX, LEGAL, REGULATORY, OR OTHER ADVICE.