forked from omni/tokenbridge-contracts
-
Notifications
You must be signed in to change notification settings - Fork 7
feat: USDS migration for xDAI bridge #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
zengzengzenghuy
wants to merge
50
commits into
xdaibridge
Choose a base branch
from
feat/xdai-usds-migration
base: xdaibridge
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
allemanfredi
requested changes
Feb 17, 2025
contracts/upgradeable_contracts/erc20_to_native/BridgeRouter.sol
Outdated
Show resolved
Hide resolved
contracts/upgradeable_contracts/erc20_to_native/BridgeRouter.sol
Outdated
Show resolved
Hide resolved
contracts/upgradeable_contracts/erc20_to_native/BridgeRouter.sol
Outdated
Show resolved
Hide resolved
contracts/upgradeable_contracts/erc20_to_native/BridgeRouter.sol
Outdated
Show resolved
Hide resolved
contracts/upgradeable_contracts/erc20_to_native/XDaiBridgePeripheral.sol
Outdated
Show resolved
Hide resolved
contracts/upgradeable_contracts/erc20_to_native/BridgeRouter.sol
Outdated
Show resolved
Hide resolved
…ePeripheralForUsdsPreUsdsUpgrade for transition bridge upgrade phase
…ignaturesAndSwapToDAI
allemanfredi
requested changes
Mar 26, 2025
contracts/upgradeable_contracts/erc20_to_native/XDaiForeignBridge.sol
Outdated
Show resolved
Hide resolved
contracts/upgradeable_contracts/erc20_to_native/XDaiForeignBridge.sol
Outdated
Show resolved
Hide resolved
contracts/upgradeable_contracts/erc20_to_native/XDaiForeignBridge.sol
Outdated
Show resolved
Hide resolved
contracts/upgradeable_contracts/erc20_to_native/XDaiForeignBridge.sol
Outdated
Show resolved
Hide resolved
contracts/upgradeable_contracts/erc20_to_native/XDaiForeignBridge.sol
Outdated
Show resolved
Hide resolved
contracts/upgradeable_contracts/erc20_to_native/XDaiForeignBridge.sol
Outdated
Show resolved
Hide resolved
contracts/upgradeable_contracts/erc20_to_native/XDaiForeignBridge.sol
Outdated
Show resolved
Hide resolved
cducrest
reviewed
Apr 4, 2025
…d ForeignBridgeErcToNative.onExecuteMessage, add check on message length in Message.hashMessage
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
Background: https://forum.gnosis.io/t/gip-118-should-sdai-be-replaced-by-susds-in-the-bridge/9354
How
relayTokens
function and claim tokenexecuteSignatures
(to receive DAI) /executeSignaturesUSDS
(to receive USDS) to xDAI bridge,safeExecuteSignaturesWithAutoGasLimit
to AMB/Omnibridge.daiToken()
to USDS andsDaiToken()
to sUSDS.executeSignatures
and BridgeRouter'sexecuteSignatures
will always receive DAIexecuteSignaturesUSDS
and BridgeRouter'sexecuteSignaturesUSDS
will receive USDS post upgrade, while BridgeRouter'sexecuteSignaturesUSDS
will revert pre upgrade.swapSDAIToUSDS()
is a one time function that is called during the upgrade and changes the collateral from DAI to USDS.New contracts
Modified contracts
Fork Test
https://github.com/gnosischain/tokenbridge-contracts/blob/feat/xdai-usds-migration/test/foundry/forkTest.sh
Bridge validator test (Check if bridge validator continues to work after bridge migration & xDAI can be still be minted on Gnosis Chain)
https://github.com/gnosischain/xdai-bridge-test
Reference