sherlock-audit / 2023-12-ubiquity-judging

2 stars 2 forks source link

GatewayGuardians - Ubiquity Pool: TWAP price oracle manipulation to steal collateral tokens #212

Closed sherlock-admin2 closed 6 months ago

sherlock-admin2 commented 6 months ago

GatewayGuardians

high

Ubiquity Pool: TWAP price oracle manipulation to steal collateral tokens

Summary

Impact

Test result: ok. 1 passed; 0 failed; 0 skipped; finished in 1.44s

Ran 1 test suites: 1 tests passed, 0 failed, 0 skipped (1 total tests)

- Formula that calculates collateralAmount from the uAD amount and collateral price:
```solidity
uint collateralAmount = dollarAmount
                        .mul(UBIQUITY_POOL_PRICE_PRECISION)
                        .div(10 ** poolStorage.missingDecimals[collateralIndex])
                        .div(poolStorage.collateralPrices[collateralIndex]);

Tool used

Manual Review

Recommendation

Duplicate of #56

sherlock-admin2 commented 6 months ago

1 comment(s) were left on this issue during the judging contest.

auditsea commented:

REF #080

sherlock-admin2 commented 6 months ago

1 comment(s) were left on this issue during the judging contest.

auditsea commented:

REF #080