hats-finance / SeeR-PM-0x899bc13919880db76edf4ccd72bdfa5dfa666fb7

1 stars 0 forks source link

Unfavorable actions might be executed due to the lack of `deadline` #138

Open hats-bug-reporter[bot] opened 1 month ago

hats-bug-reporter[bot] commented 1 month ago

Github username: @Rassska Twitter username: m_Rassska Submission hash (on-chain): 0x88839fabc47e6c6bd8cda12ff6ad21bc7800c14d2ee23168bfd90b810d20eb2f Severity: low

Description:

Description

Unfavorable Scenario

Mitigation Steps

clesaege commented 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).

Rassska commented 1 month ago

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.

clesaege commented 1 month ago

In this case, that's on the exchange to propose a deadline.