hats-finance / SeeR-PM-0x899bc13919880db76edf4ccd72bdfa5dfa666fb7

1 stars 0 forks source link

Scaler Market: Reduced Collateral Return on Edge Case Split Positions #130

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

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

Github username: @https://github.com/MustafaAlam Twitter username: @TheMustafaAlam Submission hash (on-chain): 0x9530a70fd2aba40d83a7c1751bc1f661fb5b4e9214b7b26ffd5cd1e594a69423 Severity: high

Description: Description\ Scaler market is giving back one less collateral token for each split position when the answer resolves just above the DOWN token or just below the UP token.

Attack Scenario\ Conditional tokens are ERC 1155 and can only be dealt in whole numbers. In a scaler market, when the answer resolves just above the DOWN token or just below the UP token, the calculation leads to a fraction and the redeemed tokens always give one collateral token less than the initial deposit. Moreover, this one collateral token for every split position is stuck in the contract ConditionalTokens.sol forever.

Attachments

  1. Proof of Concept (PoC) File

  2. Revised Code File (Optional)

Files:

clesaege commented 1 week ago

As per contest rules, are excluded: