dOrgTech/OpenRaise

Potentially incorrect collateralRecieved on _executeSell()

Opened this issue · 0 comments

We emit a TokenSold event with a value that is calculated by rewardForSell() rather than the actual returned value.

Front-running (or just another order being executed first) would result in a different value received here, resulting in an incorrect value in the event.

We'll need to actually get the value returned from the execution.

If we reject on unexpected price (user choice) or implement order batching, this could become irrelevant.