UniDex V4: Nested Yield & Modernization Upgrades

We're stoked to give you a first look at UniDex V4 – our biggest upgrade yet. We've been cooking this up since August 2023, and it's set to revolutionize how you interact with our protocol.

UniDex has come a long way since its inception. Let's take a quick trip down memory lane:

  • V1: Laid the groundwork as a basic 'support anything' perp protocol.

  • V2: Ramped up safety measures to boost LP confidence.

  • V3: Introduced intent-based order types and enhanced aggregated liquidity.

Now, V4 is taking things to a new level with real dynamic funding and borrowing rates, native yield on margin wallet deposits, and nested yield opportunities for LPs from various interest-bearing assets. We’ll divide this update into three sections for traders, poolers, and stakers.

Trading Updates

With V4, we realized that we had a lot of modernization updates that we needed to apply that was missed in v3. Things like submitting a stoploss & take profit order as you open a position, funding rates, and other small things that other protocols already had. V4 introduces a large number of modernization updates while still bringing new things to the table such as…

  • Dynamic Funding Rates

  • Dynamic Borrow Rates

  • Submitting stoploss and take profit orders on order open

  • Multiple pending orders

  • Earn interest on trades, limit orders, and deposited trading wallet balance

  • Self-execute orders assuming no settlement in 15 seconds

  • Full on-chain protocol accounting for open interest, spread, price impact etc

  • Full cross chain trading support

We want to touch on two important updates that stand out to us the most being yield bearing token support and cross chain trading support.

Yield Bearing Margin & Trades

UniDex V4 introduces a new concept we call "nested yield," designed to optimize returns on idle liquidity and user deposits. This innovation leverages yield-bearing assets to generate additional revenue streams for both the protocol and its liquidity providers.

The mechanism utilizes various yield-generating tokens, including but not limited to sUSDe, Aave USDC, and GMX GM market tokens. By incorporating these assets, UniDex can tap into multiple yield sources simultaneously, enhancing the overall efficiency of capital allocation within the protocol.

This concept draws inspiration from previous DEX implementations, notably Balancer's approach of using idle liquidity to accrue yield from Aave markets. However, UniDex V4 expands upon this foundation, creating a more comprehensive and versatile yield-generation system.

Cross Chain Support

UniDex V4 introduces an exciting new cross-chain support system, significantly enhancing the protocol's accessibility and efficiency. This feature represents a major step forward towards unifying our LPs and fragmented multichain user base we currently have.

Initially, UniDex V4 will support two primary entry points: Arbitrum and Molten Network. Arbitrum will be the first supported chain, leveraging its established ecosystem and existing partnerships. We believe doing this will help grow USD.m and its initial user base before things transition into Molten, while also giving time for cross-chain infrastructure to get deployed in order to give traders the best experience when trading/providing liquidity.

The cross-chain deposit flow is designed for maximum flexibility, drawing inspiration from Hyperliquid's model. Users can deposit any supported token from any compatible chain. The protocol then seamlessly swaps these tokens for a supported deposit asset and credits the user's account with the equivalent USD margin balance for trading. We’ll be using Jumper in order to facilitate cross-chain margin wallet top-up + USD.m mints.

Misc Updates

Funding Rates: UniDex V4 introduces a dynamic funding rate model to balance markets more effectively. This system allows for bidirectional payments between long and short positions, depending on market conditions. The implementation of this feature ensures that market imbalances are automatically corrected, promoting more stable and efficient trading environments which should increase LP profitability and stability, while encouraging funding rate arbitrage volume.

Stop-Loss and Take-Profits: Traders can now set stop-loss and take-profit values simultaneously with order creation. This streamlined approach to risk management allows users to define their exit strategies upfront, reducing the need for constant monitoring.

Multiple Order Support: The protocol now supports the creation of multiple orders and positions of the same type. Users can, for instance, submit separate BTC-USD long trades with different entry prices.

Self-Execution Capability: Perhaps the most significant update is the ability for users to self-execute orders against on-chain oracles if keepers go offline. This feature greatly enhances the protocol's decentralization and reduces reliance on continuous team infrastructure. By allowing traders to interact directly with on-chain price feeds, UniDex V4 ensures that trading can continue uninterrupted even in the face of technical issues, thereby increasing the robustness and reliability of the entire system.

Pooling Updates

This entire update was primarily focused around the poolers experience, and we have quite a few upgrades. In general, a lot of the trading updates should also directly positively affect the poolers experience too. Things like dynamic funding rates and dynamic borrow rather compared to the current model which only features a fixed borrow rate. Poolers should see a much more healthy trader PnL graph overtime compared to previous versions of the protocol. There is now direct incentive to balance out the markets reducing 1 sided market exposure risk, and rates are set dynamically and automatically as well.

USD.m LP Token

By far the biggest change is the introduction of USD.m, a LP receipt token unlocking more composability and interoperability for liquidity providers. Currently, liquidity providers deposit into a vault and with some internal accounting, the amount they deposit represents a share of the vault from that point. While this simplifies things as a protocol, it heavily limits what the vault is capable of with external integrations.

How it works

Minting Process: Users can mint USD.m tokens by depositing supported collateral assets into the protocol such as USDC and DAI, as well as more specialized tokens like sUSDe and GM tokens. The minting process is based on the current oracle price of USD.m, which is determined by the ratio of total assets in the vault to the circulating supply of USD.m tokens.

USD.Mprice=USDvault/USD.MsupplyUSD.Mprice = USDvault/USD.Msupply

This minting and burning process is going to function extremely similar to other vault token backed perp exchanges like Gains Trade or GMX. The value of USD.m is not static; it fluctuates based on the performance of the protocol. As traders incur losses, additional collateral is added to the vault, thereby increasing the price of USD.m. Similarly, trading fees are automatically directed to the vault so vault depositors no longer need to claim fees and auto compound their position. That would automatically be expressed with the rising oracle price of USD.m given theres now more total USD value in the vault compared to the existing supply.

Market Availability: While USD.m can be minted directly through the protocol, it is also designed to be traded on DEXs such as Uniswap and Camelot. This availability on secondary markets provides additional liquidity and accessibility for users who prefer to acquire USD.m through trading rather than minting, or just want to put them to work in liquidity farms offered by external DEXs.

For example, we still have voting power on several DEXs like Ramses, allowing us to direct token emissions to the USD.m/USDC pair. This creates a farm opportunity for users to mint USD.m (increasing the TVL for the protocol) and earn farming rewards with the LP token.

We also plan to explore more complex integrations with yield trading protocols. We have a few partnerships lined up and opportunities with the new USD.m LP mechanism to allow depositors to leverage up to 10x their deposit. Since USD.m has its own oracle price, setting up borrowing markets with a simple USDC pool to loop deposits and gain additional exposure is easy. This is also why we chose Arbitrum as the initial supported entry point chain, due to its large perp DEX tooling ecosystem available at launch.

Staking Updates

Also changing with V4 is the way staking works. Currently, staking is done per chain but is fully autonomous and decentralized. We promised during the UNIDX → MOLTEN migration that once we figured out a way to have a fully decentralized, cross-chain, and autonomous method for single-chain auto compounding staking, we would implement it. We're happy to announce that we now have this ready for production.

With the new staking system, you can stake on one chain and receive fee rewards from all other chains easily. Rewards are also going back to auto reinvestments, with staking rewards paid out in MOLTEN directly, similar to when fee rewards were paid out in UNIDX by default to UNIDX holders. One important detail is that, unlike before, this remains fully autonomous and decentralized. Fee percentages aren't changing, but this also brings back our effective protocol fees to market buyback pressure up to 65%.

From a technical point of view, here is what's happening. Fees entitled to holders are automatically distributed to a fee collection vault as part of the V4 protocol contracts. External keepers, such as those run by Balmy Finance, can collect the stored fees, convert them into MOLTEN, and distribute them to the new staking contract within the same transaction. In theory, anyone on the whitelist can trigger this fee collection process, but it is currently reserved for automation protocols like Balmy, Gelato, and other keeper agents in DeFi.

Due to the reliance on Layerzero to facilitate cross-chain transfers, the new staking contracts will take place on Arbitrum for now, until Layerzero is deployed on Molten Mainnet. There won't be any downtime during contract switches, as users can deposit and withdraw without any lockup restrictions or unbonding fees.

Timelines

We expect these changes to roll out in the coming months, with a beta test period happening sooner. All the required contract work is complete, and we expect the new staking system to roll out before the other major protocol upgrades.

Our current task is to ensure the terminal interface supports the new contracts for V4, specifically the new SDK we've developed, which includes V4 support. Unlike before, we'll open beta testing to the broader community while maintaining a dedicated focus group for key feedback from loyal community members and traders in our Discord.

Migration Process for traders & LPs

V4 uses completely new contracts, making the migration process less easy when compared to V3 to V3.1, for example. But with V3, we added a few things to help the migration process for unaware traders and unknown LPers. Some things we have to consider are migrating traders' positions from V3 without impacting LPs and their ability to withdraw.

Our plan will be a 2-stage process to ensure a seamless transfer. When V4 releases out of beta and is ready to move into production, we will give a 2-week timeframe before all new trades will be halted for V3.

Stage 1 will be this 2-week warning period that traders planning to hold a long-term position should close their positions and open them on V4 instead. V4 will be deployed in parallel, allowing LPs to start building TVL with all trading rewards and LP incentives moved to V4.

Stage 2 will be the deprecation process. We will lower the utilization rate, allowing LPs to withdraw their deposits regardless of the utilization from active positions. At this time, all trades will also be closed against the current oracle price. If for some reason a particular pool is exposed to greater than a 10% loss due to this deprecation process, all trades including losses would be nulled with the margin + fees returned to traders. This allows extremely low TVL pools to exit their deposit without causing a total loss from poolers.

This is fair for other traders as well, considering there will not be any capital to back their payout while LPs transition into the new contracts. Traders at a loss can open a position on v4 with adjusted risk management parameters to get the same liquidation point and payoff, assuming their position improves. After this 1 month process, keepers will be permanently shut down for V3 contracts as there will no longer be any open positions for V3 trades. Poolers can freely withdraw still without any risk to their positions for as long as they need.

Discord invite link — https://discord.gg/

Twitter — https://twitter.com/UniDexFinance

Website -https://www.unidex.exchange/

Swap Trading — https://app.unidex.exchange/

Leverage Aggregation Terminal — https://leverage.unidex.exchange/

Business Inquiries — marketing@unidex.finance

Subscribe to UniDex Exchange
Receive the latest updates directly to your inbox.
Mint this entry as an NFT to add it to your collection.
Verification
This entry has been permanently stored onchain and signed by its creator.