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

feat: remove asset holder allowlist, with additional fixes #864

Merged
merged 21 commits into from
Dec 7, 2023

Conversation

pcarranzav
Copy link
Member

No description provided.

pcarranzav and others added 16 commits November 23, 2022 21:37
BREAKING CHANGE: Staking.setAssetHolder is removed and the assetHolders mapping is deprecated.
- Add a comment about the risk of tx being confirmed late causing tokens to be burnt (TRST-L-1)
- Return early to avoid emitting an event if query fees are zero
- Remove comment about only valid senders being able to call collect().

BREAKING CHANGE: collect() does not emit AllocationCollected if query fees are zero
fix: improvements from Trust audit (TRST-L-1 and recommendations)
@codecov
Copy link

codecov bot commented Oct 11, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (1e593cf) 92.60% compared to head (afe7f9f) 92.69%.
Report is 20 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #864      +/-   ##
==========================================
+ Coverage   92.60%   92.69%   +0.08%     
==========================================
  Files          47       47              
  Lines        2368     2394      +26     
  Branches      432      435       +3     
==========================================
+ Hits         2193     2219      +26     
  Misses        175      175              
Flag Coverage Δ
unittests 92.69% <100.00%> (+0.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

tmigone
tmigone previously approved these changes Oct 11, 2023
Copy link
Contributor

@tmigone tmigone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor nits.

contracts/staking/StakingExtension.sol Show resolved Hide resolved
contracts/staking/StakingExtension.sol Outdated Show resolved Hide resolved
contracts/l2/staking/L2Staking.sol Outdated Show resolved Hide resolved
@pcarranzav pcarranzav force-pushed the pcv/require-epoch-for-collect branch from 3fe1edb to 3882b35 Compare October 12, 2023 17:42
@pcarranzav pcarranzav marked this pull request as ready for review October 16, 2023 14:18
tmigone
tmigone previously approved these changes Oct 24, 2023
Copy link
Contributor

@tmigone tmigone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link

openzeppelin-code bot commented Dec 6, 2023

feat: remove asset holder allowlist, with additional fixes

Generated at commit: afe7f9f0e595c60df44ed9fdeb8079d9cde2df24

🚨 Report Summary

Severity Level Results
Contracts Critical
High
Medium
Low
Note
Total
1
1
0
18
32
52
Dependencies Critical
High
Medium
Low
Note
Total
0
0
0
1
23
24

For more details view the full report in OpenZeppelin Code Inspector

* @param _tokensIn Amount of tokens used to mint signal
* @return Amount of tokens that would be recovered after minting and burning signal
*/
function tokensToSignalToTokensNoTax(bytes32 _subgraphDeploymentID, uint256 _tokensIn)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol @ that name

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tokensToSignalToTokensNoTaxFinalFinalVersion4.docx

Copy link
Contributor

@tmigone tmigone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good but we are not testing the GNS round attack no?

Copy link
Contributor

@tmigone tmigone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nvm, just saw the test

@pcarranzav pcarranzav merged commit 5bdc078 into main Dec 7, 2023
13 checks passed
@pcarranzav pcarranzav deleted the pcv/require-epoch-for-collect branch December 7, 2023 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants