Submitted by Breeje, also found by Arz, HChang26, and immeas
Any user can use mint function in ousgInstantManager contract to mint OUSG tokens by providing USDC token. It calls internal function _mint where the main logic resides.
OUSG Price Stability:
The contract depends on the OUSG price obtained from an oracle, which is heavily constrained (as per Readme) to ensure stability.
As per RWAOracleRateCheck Oracle, constraints includes:
These constraints ensure relative stability of the OUSG price.
Calculation Assumptions:
The calculation of the amount of OUSG tokens to mint assumes a fixed conversion rate of 1 USDC = 1 USD.
Key point: The _getMintAmount function calculates the OUSG amount based on the provided USDC amount and the OUSG price obtained from the oracle (by just upscaling and dividing).
Here, there are no validation checks implemented regarding the current USDC price.
Consider Alices attempt to mint OUSG tokens by providing 100,000 USDC, assuming no minting fees and OUSG price of 105e18 USD. The calculation yields: 100_000e36 / 105e18 which is approximately 95_000e18 or 95_000 OUSG tokens for the 100_000 USDC provided.
However, in the event of a USDC depeg, where USDCs value deviates from 1 USD:
This scenario leads to Alice getting close to 95_000 OUSG tokens again for 100_000 USDC provided. But this time, 100_000 USDC can be worth as low as 87_000 USD if we take recent depeg event in March 2023, where USDC price went as low as 87 cents (reference).
This way, contract will allow users to mint excessive OUSG tokens during the depeg event.
Minting of excessive token in case of USDC depeg.
VS Code
Ideally, there needs to be an additional Oracle to check current price of USDC and take its price into the consideration when calculation OUSG tokens to mint.
Context
3docSec (judge) increased severity to High and commented:
cameronclifton (Ondo) confirmed, but disagreed with severity and commented:
Note: For full discussion, see here.
