yoGateway Integration Guide

Overview

The yoGatewayarrow-up-right contract is the single entry point for interacting with YO's ERC-4626 vaults. It provides a unified interface for deposits and redemptions across all YO vaults and automatically manages:

  • Asset transfers

  • Allowances and approvals

  • Vault interactions

It also enables:

  • Partner attribution tracking

  • Real-time quoting for assets ↔ shares

  • Built-in slippage protection

In this way, partners can integrate with one single interface and add support for all existing and future YO vaults at once.

yoGateway is available on Ethereum and on Base to handle deposits and redemptions on each chain independently, as yoVaults can both types of operations on both chains. This means if you integrate yoGateway on Base, your users will receive their yoVault tokens on Base and can only be redeemed on Base.

Ping us on our Discordarrow-up-right or Telegramarrow-up-right to get your unique partner ID or if you have further questions.

Contract Addresses

Contract
Address

YoGateway

0xF1EeE0957267b1A474323Ff9CfF7719E964969FA


Instantiation

Solidity:

JS/Ethers:

file-download
10KB

Quoting

Convert Assets → Shares

Solidity:

JS/Ethers:

Convert Shares → Assets

Solidity:

JS/Ethers:


Allowance Helpers

The Gateway exposes helper functions to query allowances granted to the Gateway itself, either for redeeming shares or for depositing assets.

Solidity

JS/Ethers:


Depositing Assets

Solidity:

JS/Ethers:


Redeeming Shares

Solidity:

JS/Ethers:


Function Recap

Action
Quote Function
Execution Function

Deposit (assets→shares)

quoteConvertToShares

deposit

Redeem (shares→assets)

quoteConvertToAssets

redeem


Notes

  1. Decimals must be respected when parsing values

    • WETH / yoETH: 18

    • cbBTC / yoBTC: 8

    • USDC / yoUSD: 6

    • USDT / yoUSDT: 6

    • EURC / yoEUR: 6

    • XAUT / yoGOLD: 6

    Example: ethers.parseUnits("1.0", 18)

  2. Redemption Liquidity

    • When calling redeem(), if the target vault does not have sufficient liquidity, the redemption will remain pending for up to 24 hours.

    • Once filled, the vault will send assets directly to the specified receiver.

  3. Slippage protection calculations must be net of fees. Currently, the protocol does not charge any deposit or withdrawal fees, so the impact of fees is obviated in the examples quoted.


End-to-End Example (Deposit + Redeem with min-out estimation)

Below is a complete example using yoETH that covers: quoting, estimating minSharesOut and minAssetsOut via quoteConvertTo*, checking allowances, depositing, and redeeming.

Last updated