USDT0 engaged Guardian to review the security of the USDT to USDT0 migration on Arbitrum. From the 16th of January to the 20th of January, a team of 5 auditors, peer reviewed by 8 auditors reviewed the source code in scope.
- Published
- Review window
- January 16 to 20, 2025
- Language
- Solidity
- Chains
- Arbitrum
- Sector
- Stablecoins
- 0 Critical
- 0 High
- 0 Medium
- 5 Low
- 5 Informational
Scope
Overview
USDT0 engaged Guardian to review the security of the USDT to USDT0 migration on Arbitrum. From the 16th of January to the 20th of January, a team of 5 auditors, peer reviewed by 8 auditors reviewed the source code in scope.
Findings 10
-
L-01 Low Missing Storage Gaps Storage Acknowledged
Description
The current storage layout for
TetherTokenV2ArbitrumisArbitrumExtension->EIP3009, as it inherits these 2 contracts:abstract contract TetherTokenV2Arbitrum is ArbitrumExtension, EIP3009 {.However the issue here is that
ArbitrumExtensionis used as a parent contract forTetherTokenV2Arbitrum, but it lacks a gap, as it's gap is insideTetherTokenV2Arbitrummeaning the storage layout is:l2Gateway -> l1Address -> _authorizationStates -> gap49 -> gap48Adding a variable inside
TetherTokenV2Arbitrumwould cause a storage collision between it andEIP3009's map:_authorizationStates.Recommendation
Introduce a storage gap in the
ArbitrumExtensioncontract to ensure no storage collisions if variables were to be added to that contract in future upgrades.Resolution
USDT0 Team: Acknowledged.
-
L-02 Low Incorrect Confirmations Comment Documentation Resolved
Description
In the runbook it is mentioned as a step to:
Adjust send confirmations for ETH-to-Arbitrum from100M to 20 blocks after migration. However the configuration for the Ethereum and Arbitrum connection includes 100 Billion confirmations from the Arbitrum-to-ETH connection.The configuration is correct as it prevents users from bridging their USDT back from arbitrum to ETH before the migration is completed. However this is not in agreement with the comments directionality or magnitude of the confirmations.
The exact magnitude of the confirmations count is not important as long as it is sufficiently large, however the desired direction of the large confirmations configurations should be corrected in the comment.
Recommendation
Update the runbook to read:
Adjust send confirmations for Arbitrum-to-ETH from 100B to 20 blocksafter migration.Resolution
USDT0 Team: Resolved.
-
L-03 Low In Flight Bridges Are Halted Warning Resolved
Description
As a part of the migration process bridges through the Arbitrum gateway will cease to function on the Arbitrum side, however will still be possible from the Ethereum side.
This may be especially harmful for users who have initiated bridges from Ethereum to Arbitrum through the gateway right before the migration takes place.
Any users in this scenario will experience a loss of funds as their USDT on Arbitrum can no longer be credited with the
bridgeMintfunction and their USDT on Ethereum cannot be retrieved from the custom gateway contract.Recommendation
In the migrate function of the
ArbitrumExtensionV2contract assign thel1Addressstorage value to address(0) after the migration has been initiated by the gatewayoutboundTransferinvocation.This will trigger refund logic in the
L2ArbitrumGatewaycontract where a l2 to l1 token withdrawal is initiated to refund the user upon the l2 receipt of their gateway bridge.Notice that users will still have to wait 7 days to recoup their funds bridged through the gateway this way.
Therefore consider putting forth a DAO proposal in the future to disable the gateway on Ethereum using the setGateways function on the
L1GatewayRoutercontract to assign the new gateway for the USDT address to the DISABLEDaddress(1).Resolution
USDT0 Team: Resolved.
-
L-04 Low Incorrect _EIP712NameHash Logical Error Resolved
Description
The
_EIP712NameHashfunction is overridden to return the_newNamevalue, however thenamefunction returns the hardcoded value ofsuper.name()in the case where the_newNameis assigned to an empty string.This will mislead signers and result in the crafting of invalid signatures based on the result of the
namefunction.Recommendation
Correct the
_EIP712NameHashfunction to be the hash of thenamefunction.Resolution
USDT0 Team: Resolved.
-
L-05 Low Signatures Invalidated By Name Update Unexpected Behavior Acknowledged
Description
Signers can create signatures with specific deadlines with
ERC20Permit. The signature is typically expected to be valid until the deadline is reached.However since the
_EIP712NameHashfunction is now overridden to return the latest_newNamevalue a name update with theupdateNameAndSymbolfunction will invalidate all signatures that were previously made based on the previous name but not yet used.Recommendation
There is a trade off between using the original name of the token for the domain separator and allowing it to be updated. If the invalidation of past signatures is an acceptable downside to achieve the intuitiveness of using the current
name()value in the domain separator, then no changes are necessary.However note that the
DOMAIN_SEPARATORis exposed as a public function through theERC20PermitUpgradeablecontract. This is what will be used by signers and therefore it is unlikely to be beneficial to base the separator on the currentname()value for intuitiveness.If this behavior of unexpectedly invalidating signatures upon name updates is unacceptable: For new deployments of the
OFTExtensionit is fine to keep the same_EIP712NameHashfunction without an override, since this immutable value is the desired USDT0 name which the contract is initialized with.However for the
ArbitrumExtensionV2upgrade, the_EIP712NameHashcan be overridden, but return an immutable hash which is the hash of the initial name that is assigned in themigratefunction. Notice however that this update upon migration will also unexpectedly invalidate signatures, but only once during the migration.Otherwise no function override can be used and the original token name can continue to exist in the domain separator, making no signatures invalid.
Resolution
USDT0 Team: Acknowledged. 12
-
I-01 Informational Depeg Risk Warning Acknowledged
Description
During the migration for approximately 7 days, USDT0 on Tether will be un-redeemable for USDT on Ethereum.
This may introduce heightened risk of a depeg event for USDT0 on the Arbitrum network during this period.
Although technically this is the same delay a user would typically have to wait to redeem their USDT on Arbitrum for USDT on Ethereum through the gateway, the lack of a static redemption mechanism during the in motion migration period may incite turbulence in the market.
Recommendation
Be aware of this risk and consider preparing a response plan in the event that a depeg event occurs during the migration.
Resolution
USDT0 Team: Acknowledged.
-
I-02 Informational Bridging From Arbitrum After Migration Warning Acknowledged
Description
During the migration process before the l2 to l1 transaction has been confirmed and executed on Ethereum the USDT0 on Arbitrum is technically unbacked in the Ethereum OFT Adapter contract.
If any USDT0 is allowed to bridge back to ETH from Arbitrum during this period using the
LayerzeroOFT pathway, it will cause a dearth in the backing ETH USDT for USDT0 on Ink which can prevent redemptions.This behavior is planned to be solved by assigning a restrictively high confirmations count for bridges coming from Arbitrum to Ethereum.
This is an acceptable solution so long as users are aware that if they bridge USDT from Ethereum to Arbitrum via LayerZero that they cannot immediately bridge back until the migration is complete.
Recommendation
Be aware that users may still bridge from Ethereum to Arbitrum during the migration period. If this is acceptable behavior then ensure that these users or integrators are aware that they cannot bridge back to Ethereum until the migration is complete.
Resolution
USDT0 Team: Acknowledged.
-
I-03 Informational Unnecessary Require Statement Superfluous Code Resolved
Description
The
bridgeBurnfunction implements a require statement which asserts thatisMigratingis true. HoweverisMigratingis immediately assigned to true in themigratefunction and therefore this require statement performs no useful validation and is not needed.Instead the
onlyAuthorizedSenderaccess control modifier prevents future bridges through the gateway via thebridgeBurnmethod as thel2Gatewayvariable is assigned as the OFT contract after theoutboundTransferinvocation.Recommendation
Consider removing the require statement in the
bridgeBurnfunction entirely as it is unnecessary.Resolution
USDT0 Team: Resolved.
-
I-04 Informational Address Aliasing Allows Blocklist Bypass Access Control Acknowledged
Description
The
TetherTokenV2Arbitrumcontract includes several functions which have theonlyNotBlockedmodifier. These functions are intended to be uncallable by a blocked account, however l1 to l2 messages allow an address that is blocked on both l1 and l2 networks to call them.This is because Arbitrum l1 to l2
retryableTicketsuse an aliased msg.sender, shifted by anOFFSETof0x1111000000000000000000000000000000001111. Thus the sender will not be a blocked address and these invocations are allowed.Specifically, since the
transferWithAuthorizationfunctions do not rely on the msg.sender as a signer, sender, or receiver a blacklisted address can call these addresses through aliasing.Recommendation
There is no difference between a blacklisted address invoking this from l1 and the owner of the blacklisted address simply calling the function from a different address.
Furthermore the main functionality of a blocked address being unable to transfer funds is still held through the
_beforeTokenTransferfunction. Therefore this is meant only as an informational note.Resolution
USDT0 Team: Acknowledged.
-
I-05 Informational Name Update Risk Documentation Acknowledged
Description
The update of the USDT token’s name to USDT0 on Arbitrum may cause unexpected behavior for other applications relying on USDT in either their Smart Contracts or Frontends.
Recommendation
During our review no protocols were identified that would be directly impacted on-chain. However ideally integrators can be made aware of this update and are able to make appropriate changes if necessary. If anything this finding can serve as documentation for this risk.
Resolution
USDT0 Team: Acknowledged.
No findings match.
More from USDT0
All 20 reportsPut your code through the same review.
This review started with a conversation about scope. Tell us what you are building and we will plan yours with you.
