USDC Staking on StarkNet with VESU

Let users earn yield on USDC by depositing into the VESU lending protocol on StarkNet. Gasless staking and withdrawal with Chipi SDK hooks.

Overview

Let users deposit USDC into the VESU lending protocol on StarkNet and earn yield automatically. Like a savings account, but on-chain. VESU is a battle-tested lending protocol where deposits earn interest from borrower demand. The rate varies based on supply and demand. All staking and withdrawal transactions are gasless through Chipi.

Stake USDC into VESU

Use the useStakeVesuUsdc hook to deposit USDC:

tsximport { useStakeVesuUsdc } from "@chipi-stack/nextjs";

const { mutateAsync: stake, isPending } = useStakeVesuUsdc();

await stake({
  encryptKey: passkeyCredential,
  wallet: userWallet,
  amount: stakeAmount, // Human-readable, e.g. "10" for $10
  bearerToken: process.env.NEXT_PUBLIC_CHIPI_API_KEY!,
});

The SDK auto-handles the ERC-20 approval step before staking. One passkey tap covers both approve and stake. The encryptKey from the passkey proves wallet ownership. Without it, no one can move funds. Not even Chipi. This is what makes the wallet self-custody.

Withdraw USDC from VESU

Use the useWithdrawVesuUsdc hook to pull USDC back:

tsximport { useWithdrawVesuUsdc } from "@chipi-stack/nextjs";

const { mutateAsync: withdraw, isPending } = useWithdrawVesuUsdc();

await withdraw({
  encryptKey: passkeyCredential,
  wallet: userWallet,
  amount: withdrawAmount,
  bearerToken: process.env.NEXT_PUBLIC_CHIPI_API_KEY!,
});

Withdrawals depend on VESU pool liquidity. If most funds are lent out, large withdrawals may need to wait. This is normal for lending protocols.

Key Rules

  • - VESU is a lending protocol. Deposits earn yield from borrower interest automatically
  • - The SDK handles ERC-20 approval before staking (no separate approve step)
  • - Amounts must be greater than 0
  • - USDC has 6 decimals. The SDK handles conversion between human-readable and raw format
  • - All staking transactions are gasless through Chipi

Ready to build?

Connect the Chipi MCP server and start building in minutes.

Get Started