Docs
Everything the Valnex gateway does, and everything it does not, in one page.
Overview
Valnex connects idle USDG on Robinhood Chain to lending demand. It does this with a single contract, the sluice, which holds positions in a fixed set of Morpho Blue markets and issues a share token, vxUSDG, to depositors. The value of a share is the USDG the sluice could redeem for it, which grows as borrowers pay interest and shrinks only if a market realises a loss.
The site around it reads every figure from the chain: market totals, rate model outputs, Chainlink prices and, once deployed, the sluice's own state. Where a figure cannot be read, the site says so instead of filling the gap.
The sluice contract
The sluice (ValnexSluice) is an ERC-4626 tokenized vault built on OpenZeppelin's implementation. Its constructor takes the deposit asset (USDG), the Morpho Blue address, a list of one to four markets, one weight per market in basis points adding up to 10,000, and the share name and symbol (VALNEX USDG Sluice, vxUSDG).
- Every market must lend the deposit asset and must already exist on Morpho with exactly the given parameters; otherwise deployment fails.
- There is no owner, no admin function, no fee, no pause and no proxy. Nothing set in the constructor can change afterwards.
- Shares carry 12 decimals: USDG's 6 plus a fixed offset of 6 that makes the first-depositor share inflation trick uneconomic.
- A deposit whose token transfer delivers less than requested is refused.
- Anyone may call
supplyIdle()to put stray USDG (rounding dust or a direct transfer) to work for all holders.
Lanes
The proposed deployment uses two lanes, both Morpho Blue markets that lend USDG with Morpho's adaptive curve rate model and a 91.5% liquidation loan-to-value:
- USDG lent against USDe, target 50%. USDe is a synthetic dollar backed by crypto collateral and short perpetual futures positions. Market id
0xc845da65a020ddca5f132efa8fea79676d8edfdea504226a4c01e7a9e34cddd6. - USDG lent against syrupUSDG, target 50%. syrupUSDG is a yield-bearing USDG deposit token whose returns come from overcollateralized loans to institutional borrowers. Market id
0x919a9b6b94dae7c86620eaf7a08e597aae8a4c3a9e9c7671771fbaf62b6b61c7.
They were chosen because they are the two markets on the chain where real borrowing happens at scale, with dollar-denominated collateral. Markets on Morpho can be created by anyone, with any oracle, so the sluice does not discover markets: the list is fixed and checked against Morpho at deployment.
Deposits
A deposit transfers USDG in, mints shares at the current share price, and supplies the USDG to Morpho in the same transaction. The sluice computes each lane's target (total holdings times weight) and fills the lane with the largest shortfall first, then the next. Anything left over after all targets are met goes to the first lane. This keeps the mix close to its weights without anyone rebalancing it.
Withdrawals
A withdrawal first uses any idle USDG in the contract, then pulls from the lane furthest above its target after the withdrawal, then the next. Each lane can only give what its Morpho market has unlent (supply minus borrows). If the lanes together cannot cover the request, the transaction reverts and nothing changes. maxWithdraw and maxRedeem already account for this, so the app shows how much can leave right now.
When a withdrawal empties a lane completely, the sluice withdraws by shares rather than by amount, so no rounding remainder is ever stranded in the market.
Where the rate comes from
Morpho's rate model returns a borrow rate per second. Compounded over a year it gives the borrow rate. Lenders receive that rate times the share of the market lent out, minus the market fee (switched off on both lanes). The sluice's rate is the weighted mix of its lanes. The site computes these numbers from the chain on every refresh; it does not take them from any third-party service, and it never shows them as a promise.
When a market is nearly fully lent, the adaptive model raises the borrow rate over time to pull in new lenders and push borrowers to repay. That is the mechanism that restores free cash when withdrawals are waiting.
Risks
- Bad debt in a lane reduces that market's assets and therefore the sluice's share price.
- Oracle failure or a collateral depeg can delay or prevent liquidations.
- The two lanes price their collateral differently. The syrupUSDG lane uses an oracle from Morpho's own oracle factory, fed by a syrupUSDG/USDG exchange-rate feed. The USDe lane uses a custom oracle contract chosen by that market's creator, which on 15 October 2026 priced one USDe at exactly one USDG. If USDe traded below a dollar, that oracle would not see it, borrowers would not be liquidated, and lenders could be left with collateral worth less than their loans.
- High utilisation can delay withdrawals until borrowers repay.
- The rate can fall to near zero if borrowing demand disappears.
- Smart contract risk in the sluice, OpenZeppelin, Morpho Blue, the oracles and the tokens involved, including USDG itself.
Practice mode
Until the sluice address is published, the Earn screens run in practice mode. Your wallet signs one plain-text message; after that, deposits and withdrawals are recorded in your browser only and valued at the live lane rate. Nothing is sent, and clearing the browser's storage clears the ledger.
Verifying the contract
The source code includes npm run verify-deployment, which compares the deployed bytecode with a fresh build, checks the lanes, weights, name and symbol against the pinned values, and rebuilds the constructor arguments to compare them byte for byte with the creation transaction. It prints MATCH or MISMATCH.
Addresses
- Sluice:
0x17280057c24bc54018c05c019f989ba1c6c9767c - USDG:
0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168 - Morpho Blue:
0x9D53d5E3bd5E8d4Cbfa6DB1ca238AEA02E651010 - Network: Robinhood Chain, chain id 4663, explorer robinhoodchain.blockscout.com