Open hats-bug-reporter[bot] opened 1 month ago
I think you were thinking of stuff like an AMM or limit order. But here splitting and merging are fully cancellable actions (if you split, you can merge back and get your underlying tokens, if you merge you can split back and get your conditional tokens), so there is no problem if they are executed after a delay (I think due to gas prices being high).
But what if you have a bundle of 2 txs:
In this case, if the tx executes after some time, it might be unfavorable to split and exchange. That's why probably, it's worth to provide an opportunity for the traders to specify deadline block. On front-end side this could be defaulted by specifying type(uint256).max
or 0, since the regular users won't be affected.
In this case, that's on the exchange to propose a deadline.
Github username: @Rassska Twitter username: m_Rassska Submission hash (on-chain): 0x88839fabc47e6c6bd8cda12ff6ad21bc7800c14d2ee23168bfd90b810d20eb2f Severity: low
Description:
Description
Router::splitPosition()
,Router::mergePositions()
do not allow users to specify desired point in time from which the intention will be invalidated. This might lead to unintentional executions at a later point in time.Unfavorable Scenario
Mitigation Steps
deadline
param in:Router::splitPosition()
Router::mergePositions()