Glorious Garnet Tadpole
Medium
there is slippage check in the function swap but there is no slippage protection in the function swapRWAtoStbc/swapRWAtoStbcIntent. As a result, users can get less usd0 tokens than expected.
there is minAmountOut parameter in the function swap but there is no minAmountOut parameter in the function swapRWAtoStbc/swapRWAtoStbcIntent.
No response
rwa token oracle price against usd can decrease before the user transaction.
-
Let’s assume, 1 rwa token oracle price is 1 usd. Alice calls the function swapRWAtoStbc with 100 rwa tokens to get 100 usdc.
-
Before alice’s function swapRWAtoStbc execution, 1 rwa token oracle price is updated to 0.9 usd.
-
As 1 rwa token oracle price is updated to 0.9 usd, so alice gets 90 usdc for 100 rwa tokens which is unexpected/unfair for alice because alice’s expectation was to get 100 usdc for 100 rwa token.
users can get less usd0 than expected.
No response
put minAmountOut parameter check in the function swapRWAtoStbc/swapRWAtoStbcIntent.