Skip to content
This repository was archived by the owner on Oct 8, 2024. It is now read-only.
This repository was archived by the owner on Oct 8, 2024. It is now read-only.

Potential Price Overflow #25

Open
Open
@hexonaut

Description

@hexonaut

There are a couple of places where the Oracle price can bump up against an upper bound. First and foremost we are restricted to a price of at most ~10^15 due to storing the price as a uint112 in the Feed. This should probably be increased as we already have a UNI LP that is getting close to this (WBTC-ETH). It is currently priced at ~10^9, and if we were to onboard an LP where the underlying token has even less decimals then we may run into this limit.

Beyond the uint112, https://github.com/makerdao/dss/blob/master/src/spot.sol#L98 restricts the upper bound on a reported oracle price to ~10^23. I suggest we both increase the precision of the Feed as well as add a test to make sure we do not add any oracles beyond 10^14 in price which gives us 9 orders of magnitude buffer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions