Use real-time oracle price of USDN/USDT/USDC for collateral valuation

To prevent under-collateralization, all stablecoins should be valued at market price provided by an oracle that average over many different trading venues, instead of setting them at fixed price $1. Note that USDN at the moment is trading below $1, and there is no telling what the future could hold for USDT. We should make Vires platform robust enough for any sort of de-pegging that might or might not happen in the future.


This sounds like a reasonable proposal. I hate to be cynical, but I wonder if those with all the extra gVires hanging around would allow something like this to pass. It would be difficult for them to manipulate something regulated by Oracle pricing.


Note that using a real-time oracle price doesn’t prevent price manipulation attacks.
You can do a quick manipulation to force a liquidation that’s good for you, specially if the oracle updates quickly, and it doesn’t give time for anyone to react.
The problem is not so easy to solve.

If your price oracle averages it over many different venues based on trading volume, this should be as robust as it gets. All other non-stable coins are valued this way, so I believe there is a way to make this safe from manipulation attack. Certain better than holding it at $1. Imagine if USDN drops below 0.8 right now. A person that deposits 1m of USDN and borrow 0.85m of USDC doesn’t even need to return the USDC anymore, and the lender/Vires is stuck with a 0.05m short fall.

1 Like

This could be easily resolved by applying TWAP. With almost 150M in Curve’s reserve, it is a reasonable and reliable price feed that would be difficult to manipulate economically. (vs the USDN pool of 600M)

As for the length of the TWAP, I would suggest that it would be less than 24h. Given that USDN / WAVES swap could only take place once every 24h, that should be sufficient time for users to protect their position / unwind their USDN to WAVES as collateral.

1 Like

Today we saw UST death spiral, and USDN is off peg again.
This is why no new liquidity is coming in to Vires despite APY that is higher than anywhere else. USDN that is locked to $1 instead of the market price is being used as collateral. That means that there is a strong possibility that anyone who deposits USDC/USDT will never get it back.
How many times does it need to be said? You cannot have a functional defi lending protocol where the collateral cannot be liquidated. It’s complete nonsense.
There has to be a proposal to use oracle prices and the Waves team has to let it pass.


40% is fairly low tho. All pools on swop is doing 100+ now. Plenty of them 200+. Couple pools on puzzle is consistently doing 150+… Couple on yearn is doing 60+ last I checked, etc etc etc… Ofc, those aren’t exactly lending platforms, so not entirely comparable. But it is the same people using these things either way. I’ll personally buy some LPs at the 20% discount on DEX hoping to profit on it. At that profit margin, I’m willing to risk it. At 40% a year, naaah. I might never see my money again.

I haven’t had time to check crypto news today, so this is the first I hear about UST too… So I guess I should go read up on what’s going on there… <.<

Agree that just locking it at 1$ don’t work. Especially not now with raging fiat inflation, which will probably cause USDT to depeg eventually. Who wanna peg to the USD now? It’s unsafe as fuck.