You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 26, 2023. It is now read-only.
github-actionsbot opened this issue
Feb 21, 2023
· 0 comments
Labels
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelMediumA valid Medium severity issueRewardA payout will be made for this issue
Double-entry point (Two Address) token might raise some issues
Summary
Two address tokens exist in the blockchain, a token which has two addreses. For example, Synthetix’s ProxyERC20 contract is such a token which exists in many forms (sUSD, sBTC, ... ). TUSD, which famously caused a potential attack on Compound is another good example. Double-entry point (Two Address) token might raise some issues such as double spending and quicker reaching of openQTokenWhitelist.TOKEN_ADDRESS_LIMIT().
Vulnerability Detail
When addToken() is called by the owner in TokenWhitelist.sol, it only checks the token has not been whitelisted prior to whitelisting the token and incrementing tokenCount. There could be a scenario where the two addresses (of Double entry point token) are being registered successfully in two separate instances.
Impact
This will speed up TOKEN_ADDRESS_LIMIT being reached by taking up double slots. Additionally, it could lead to double execution when fundBountyToken() is called by the proxy in DepositManagerV1.sol.
Either redesign assets registration and limit any double entry point token if necessary by detecting a proxy pattern or balance checking when the asset is being transferred in order to prevent double spending (or transfer).
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelMediumA valid Medium severity issueRewardA payout will be made for this issue
RaymondFam
medium
Double-entry point (Two Address) token might raise some issues
Summary
Two address tokens exist in the blockchain, a token which has two addreses. For example, Synthetix’s ProxyERC20 contract is such a token which exists in many forms (sUSD, sBTC, ... ). TUSD, which famously caused a potential attack on Compound is another good example. Double-entry point (Two Address) token might raise some issues such as double spending and quicker reaching of
openQTokenWhitelist.TOKEN_ADDRESS_LIMIT()
.Vulnerability Detail
When
addToken()
is called by the owner in TokenWhitelist.sol, it only checks the token has not been whitelisted prior to whitelisting the token and incrementingtokenCount
. There could be a scenario where the two addresses (of Double entry point token) are being registered successfully in two separate instances.Impact
This will speed up
TOKEN_ADDRESS_LIMIT
being reached by taking up double slots. Additionally, it could lead to double execution whenfundBountyToken()
is called by the proxy in DepositManagerV1.sol.Code Snippet
File: TokenWhitelist.sol#L25-L32
File: DepositManagerV1.sol#L36-L74
Tool used
Manual Review
Recommendation
Either redesign assets registration and limit any double entry point token if necessary by detecting a proxy pattern or balance checking when the asset is being transferred in order to prevent double spending (or transfer).
Duplicate of #530
The text was updated successfully, but these errors were encountered: