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
Description: Description Minter.sl provides Native ROSE token as well as ERC20 tokens as base tokens for liquid staking. The users can call deposit functions of NativeMinter.sol to deposit native ROSE token to get the exact staking tokens. Similarly, if the user wants to deposit ERC20 token like USDT/USDC, etc then they can call deposit function of ERC20Minter.sol which is implemented as below:
The issue here is that, the base token can be any token including USDT i.e fee on transfer tokens.
Some tokens have a fee on transfer, for example USDT. Usually such fee is not enabled but could be re-enabled at any time. With this fee enabled the functions interacting with Fee on transfer tokens would receive slightly less tokens than the amounts requested.
Some ERC20 tokens(e.g. STA,PAXG, USDC,USDT) allow for charging a fee any time transfer()or transferFrom() is called.
In above ALL highlighted functions, Tokens with a fee on transfer is not supported which can cause accounting errors. The end user while transferring and claiming his base tokens can receive less tokens than expected.
Recommendations
Check the balanceOf() tokens before and after a safeTransfer() or safeTransferFrom() in case of base token. Use the difference as the amount of tokens sent/received.
The text was updated successfully, but these errors were encountered:
Minter contracts are supposed to work only with protocol tokens, that can be staked (either gas tokens – ROSE, ZETA, SEI on corresponding chains or ERC20 versions on sidechains, e.g. ERC20 WROSE on BNB Chain, ERC20 ZETA on Ethereum, etc.).
Stablecoins with possible fee on transfer are not supposed to be used as base tokens in Minter.
Github username: --
Twitter username: --
Submission hash (on-chain): 0xa55345ec35527c62257af4e8bccb5d41c5fe773e19ad85ec6acf763936ddcab4
Severity: medium
Description:
Description
Minter.sl
provides Native ROSE token as well as ERC20 tokens as base tokens for liquid staking. The users can call deposit functions ofNativeMinter.sol
to deposit native ROSE token to get the exact staking tokens. Similarly, if the user wants to deposit ERC20 token like USDT/USDC, etc then they can call deposit function ofERC20Minter.sol
which is implemented as below:For owner withdrawal of ERC20 base token, withdraw() function is implemented as:
For redeem of staking tokens and to get back the base token, redeem is implemeted as:
For owner withdrawal and user withdrawal, its implemented as:
The issue here is that, the base token can be any token including USDT i.e fee on transfer tokens.
Some tokens have a fee on transfer, for example USDT. Usually such fee is not enabled but could be re-enabled at any time. With this fee enabled the functions interacting with Fee on transfer tokens would receive slightly less tokens than the amounts requested.
Some ERC20 tokens(e.g. STA,PAXG, USDC,USDT) allow for charging a fee any time transfer()or transferFrom() is called.
In above ALL highlighted functions, Tokens with a fee on transfer is not supported which can cause accounting errors. The end user while transferring and claiming his base tokens can receive less tokens than expected.
Recommendations
Check the balanceOf() tokens before and after a safeTransfer() or safeTransferFrom() in case of base token. Use the difference as the amount of tokens sent/received.
The text was updated successfully, but these errors were encountered: