Repository navigation
4.3.0: Prevent unregistering RSR and document governance trust #1298
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -132,6 +132,7 @@ contract AssetRegistryP1 is ComponentP1, IAssetRegistry { | |
| IERC20Metadata erc20 = asset.erc20(); | ||
|
|
||
| require(address(erc20) != address(main.rToken()), "cannot unregister RToken"); | ||
| require(address(erc20) != address(main.rsr()), "cannot unregister RSR"); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| require(_erc20s.contains(address(erc20)), "no asset to unregister"); | ||
| require(assets[erc20] == asset, "asset not found"); | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Script executed:
Repository: reserve-protocol/protocol
Length of output: 17456
Script executed:
Repository: reserve-protocol/protocol
Length of output: 28471
Script executed:
Repository: reserve-protocol/protocol
Length of output: 23744
Script executed:
Repository: reserve-protocol/protocol
Length of output: 31871
Use one ERC20 value throughout
unregister.If an RSR plugin returns another token for the guard and RSR for later calls, P0 can still unregister RSR. Cache the getter result and use it throughout the function.
Suggested fix