Quickstart
Connect a wallet on Polygon Amoy, deposit into the vault, and watch the AI agent rebalance.
Prerequisites
- An EVM wallet (MetaMask, Rabby) with a Polygon Amoy account.
- A small amount of testnet MATIC for gas — grab some from the Polygon faucet.
- The dashboard accepts the asset configured by the deployed vault. See the connect screen for the live symbol.
Connect wallet
Open the dashboard and click Connect wallet. The app will request a chain switch to Amoy if your wallet is on another network. State is read live — you do not need to sign anything to read protocol data.
Deposit
- Approve the vault to spend your asset (one-time per token).
- Call
deposit(assets, receiver)on the vault — the contract mints ymMATIC shares 1:1 with your contribution adjusted by the current share price. - The autonomous executor picks up the new TVL on its next tick. The AI agent re-evaluates allocation and may submit a rebalance.
ts
import { ethers } from "ethers"
import { CONTRACT_ADDRESSES, YIELD_VAULT_V4_ABI, ERC20_ABI } from "@/lib/contract-abis"
const provider = new ethers.BrowserProvider(window.ethereum)
const signer = await provider.getSigner()
const vault = new ethers.Contract(CONTRACT_ADDRESSES.AMOY.YieldVaultV4, YIELD_VAULT_V4_ABI, signer)
const asset = new ethers.Contract(await vault.asset(), ERC20_ABI, signer)
const amount = ethers.parseUnits("100", await asset.decimals())
await (await asset.approve(vault.target, amount)).wait()
await (await vault.deposit(amount, await signer.getAddress())).wait()Next steps
- Watch the AI insight panel update on each block.
- Read the streaming rebalance reasoning to understand why the agent acted.
- Vote on an open governance proposal — your weight equals your staked MATIC.