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

Timelock functionality for xToken is applied on all existing balance #80

Open
code423n4 opened this issue Dec 20, 2021 · 0 comments
Open
Labels
1 (Low Risk) Assets are not at risk. State handling, function incorrect as to spec, issues with comments bug Something isn't working sponsor acknowledged Technically the issue is correct, but we're not going to resolve it for XYZ reasons

Comments

@code423n4
Copy link
Contributor

Handle

0x0x0x

Vulnerability details

Proof of Concept

When new tokens are minted for an address, also the existing balance of that given address is timelocked.

For example, if another protocol would want to use NFTXInventoryStaking and make deposits possible through their protocol, then any deposit will update timelock duration for others and would make it possible to frontrun withdraws by using deposit.

Recommended Mitigation Steps

This can be avoided by tracking timelock period for each mint, but it will cost more gas and make the code base more complicated.

Alternatively, add warnings for other protocols about this behaviour

@code423n4 code423n4 added 1 (Low Risk) Assets are not at risk. State handling, function incorrect as to spec, issues with comments bug Something isn't working labels Dec 20, 2021
code423n4 added a commit that referenced this issue Dec 20, 2021
@0xKiwi 0xKiwi added the sponsor acknowledged Technically the issue is correct, but we're not going to resolve it for XYZ reasons label Dec 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 (Low Risk) Assets are not at risk. State handling, function incorrect as to spec, issues with comments bug Something isn't working sponsor acknowledged Technically the issue is correct, but we're not going to resolve it for XYZ reasons
Projects
None yet
Development

No branches or pull requests

2 participants