Open hats-bug-reporter[bot] opened 1 month ago
that approval is not needed, you can test the deployed smart contracts on the frontend and check that split/merge/redeem work as expected
The router holds the token during this call. So no approval is needed.
Github username: @cpp-phoenix Twitter username: 0xrochimaru Submission hash (on-chain): 0xd3b947b574497463ce79ccf434f28752c63998c4f24975cf0272b369ecd7c9d1 Severity: high
Description: Description\ In methods
_splitPosition()
,mergePositions()
&_redeemPositions()
wrapped1155Factory.unwrap()
is used to unwrap a wrapped1155 token. But it doesn't approve the wrapped1155Factory contract with the amount to be unwrapped.Attack Scenario\ Because of the insufficient approval the transaction will fail as the
Router.sol
token should approvewrapped1155Factory
contract to use x amount ofwrapped1155
tokens.Recommendations\