UTYVaultInterface charges to cover LayerZero messaging costs.
OFT pattern
UTY and yUTY implement LayerZero’s Omnichain Fungible Token (OFT) pattern. The token contract on the hub chain is different from the token contract on spoke chains — different roles, different storage, different responsibilities.- Hub (Base)
- Spoke chains
- The vault contract IS the token.
UTYandyUTYare both ERC-7540 vaults that extend ERC-20, so the share token is the vault itself. ShareOFTAdapterwraps the vault token for cross-chain transfers using the lockbox model: tokens sent cross-chain are locked in the adapter, not burned.- Redeeming a cross-chain transfer releases the locked tokens back to the recipient.
EIP-3009 support
All YieldPoint tokens — hub vaults (UTY, yUTY) and spoke OFTs (OFTExtended) — support EIP-3009’s transferWithAuthorization. This enables signature-based transfers without requiring a prior approve call: a user signs an authorization off-chain, and anyone (e.g., a relayer or an agentic system) can submit it to execute the transfer.
This enables x402 payment protocol support for agentic transactions — any EIP-3009-compatible token can act as the payment rail for x402 flows.
Flat fee model
The spoke-chainUTYVaultInterface charges flat fees on cross-chain deposits and redemptions. These fees cover the LayerZero messaging cost for the spoke-to-hub and hub-to-spoke round trip.
| Parameter | Token | Default | Maximum | Rationale |
|---|---|---|---|---|
depositFlatFee | UTY | 0.14 UTY (140000000000000000) | MAX_DEPOSIT_FEE (5e18 = 5 UTY) | Covers spoke-to-hub + hub-to-spoke LayerZero gas for a deposit round trip. |
redeemFlatFee | yUTY | 0.21 yUTY (210000000000000000) | MAX_REDEEM_FEE (5e18 = 5 yUTY) | Covers spoke-to-hub + hub-to-spoke LayerZero gas for a redeem round trip. |
Why flat, not percentage. LayerZero costs are per-message (~0.11 at current gas prices), not per-amount. A percentage fee would create a cross-user subsidy where large deposits overpay and dust deposits underpay. Flat fees with a small buffer achieve break-even regardless of deposit size, and the same fee funds the return message.
Fee caps
Both fees have hard-coded maximum constants:MAX_DEPOSIT_FEE=5e18(5 UTY in OFT token units)MAX_REDEEM_FEE=5e18(5 yUTY in OFT token units)
setDepositFlatFee() and setRedeemFlatFee() functions revert with FeeExceedsMaximum if the new fee exceeds the cap. This limits admin abuse even if the fee manager key is compromised — the worst-case scenario is 5 tokens per operation, not arbitrary.
Fee collection and withdrawal
Fees are collected using abalanceOf(address(this)) sweep model:
User calls deposit on the spoke VaultInterface
The full
assets amount is transferred from the user into the VaultInterface contract.VaultInterface bridges the post-fee amount
Only
assets - depositFlatFee is bridged cross-chain via the OFT. The fee stays behind as a token balance in the VaultInterface contract.Fee accumulates in the contract balance
Over time, the
VaultInterface contract’s balanceOf(address(this)) grows as each deposit leaves its fee behind.balanceOf(address(this)) at withdrawal time. This saves ~5,000 gas per deposit versus maintaining a running total.
Fee management roles
Three operations are gated by role, and each can be performed by either the contract owner or an address holdingOPERATIONS_ROLE:
| Action | Who |
|---|---|
| Set deposit fee | Owner or OPERATIONS_ROLE |
| Set redeem fee | Owner or OPERATIONS_ROLE |
| Withdraw fees | Owner or OPERATIONS_ROLE |
initialize() parameters, allowing different fee levels for chains with different gas costs. As of the current deployment, Avalanche and Katana use identical fees (0.14 UTY deposit, 0.21 yUTY redeem).