Skip to content
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

chore(protocol): add assumption desc. for IBridgedERC20 #17546

Merged
merged 2 commits into from
Jun 12, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions packages/protocol/contracts/tokenvault/IBridgedERC20.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,19 @@ pragma solidity 0.8.24;

/// @title IBridgedERC20
/// @notice Interface for all bridged tokens.
/// @dev To facilitate compatibility with third-party bridged tokens, sometimes it might be
/// necessary to implement an intermediary adapter contract which should conform to this interface,
/// enabling effective interaction with third-party contracts.
/// @dev Here is the list of assumptions that guarantees that the bridged token can be bridged back
/// to it's canonical counterpart (by-default it is, but in case a third-party "native" token is set
/// and used in our bridge):
/// - The token should be ERC-20 compliant
/// - The token should not be rebasing token
/// - If the bridged token is not directly deployed by the Bridge (ERC20Vault), - for example a USDT
/// token bytecode deployed on Taiko to support native tokens - it might be necessary to implement
/// an intermediary adapter contract which should conform mint() and burn() interfaces, so that the
/// ERC20Vault can call these actions on the adapter
/// - If the bridged token is not directly deployed by the Bridge (ERC20Vault), but conforms the
/// mint() and burn() interface and the ERC20Vault has the right to perform these actions (has
/// minter/burner role)
/// - If the bridged token is directly deployed by our Bridge (ERC20Vault)
/// @custom:security-contact [email protected]
interface IBridgedERC20 {
/// @notice Mints `amount` tokens and assigns them to the `account` address.
Expand Down