What Earn Does
Earn is a Writz-owned DeFindex vault. DeFindex is a vault protocol on Stellar that routes deposits into yield strategies. The Writz vault has one strategy, a Blend USDC lending pool: your USDC is supplied to Blend borrowers, and the interest they pay is the yield you earn. When you deposit, the vault mints vault shares (wzUSDC) to your own Stellar account. Shares are your claim on the vault’s USDC. As Blend pays interest, the vault’s USDC grows while the number of shares stays the same, so each share is worth more USDC over time. Withdrawing burns shares and returns the USDC they are worth at that moment.
Writz did not write or deploy a new smart contract for Earn. The vault was created through the DeFindex factory, and both DeFindex and Blend are already audited. That is deliberate: Earn can ship without waiting for an audit cycle of its own.
Key Parameters
How the fee works. The 1% performance fee is split between Writz and DeFindex, it is not two separate charges. On 100 USDC of yield, you keep 99 USDC; of the 1 USDC fee, DeFindex takes 0.20 and Writz receives 0.80. The full breakdown, and how to verify it on-chain, is in
contracts/deployments/defindex-vault-testnet.md.
Where the APY comes from. The APY shown in the app is read live from the vault. It is variable: it follows the interest Blend borrowers pay, which rises and falls with how much of the Blend pool is borrowed.
Step-by-Step: Earning on Testnet
Prerequisites
- A Google or GitHub account or an email address (testnet sign-in through Pollar), or a Stellar wallet: Freighter, xBull, Lobstr, Albedo or Rabet
- A small amount of testnet XLM for transaction fees
- Blend testnet USDC to deposit (step 3 below)
1. Open the app
Go to testnet.writz.xyz and select the Earn tab. The current APY is visible without connecting anything.2. Connect
Select Connect wallets. Sign in with Google, GitHub or an email code, which creates a Stellar test account for you through Pollar, or connect an existing Stellar wallet. See Sign in with Google, GitHub or email.3. Enable the USDC trustline and get test USDC
A Stellar account has to opt in to an asset before it can hold it. If your account does not hold Blend testnet USDC yet, the app shows an Enable USDC button: approve it once in your wallet. The trustline keeps 0.5 XLM of your balance in reserve while it exists. If your balance is zero, the app links to the Blend testnet faucet, where you can mint test USDC for free.4. Deposit
Enter an amount and select Deposit. Your wallet asks you to sign one transaction. Once it confirms on-chain, the deposited USDC is invested into the Blend strategy straight away, and your position appears on the page.5. Watch it earn
Your position refreshes every 15 seconds and the APY every minute, with no page reload. The USDC value of your position grows as yield accrues.6. Withdraw
Enter an amount, or select Max to withdraw your full position, and sign one transaction. The USDC returns to your account. A withdrawal can land one stroop (0.0000001 USDC) under the figure you would compute by hand, from the vault’s share-price rounding.Custody Model
Earn is non-custodial. Three parties take part in every deposit and withdrawal, and none of them can move your funds alone:- The Writz relayer builds the transaction. It holds the DeFindex API key, which must never reach the browser. It builds an unsigned transaction and returns it. It never signs and never submits.
- Your wallet signs it. Nothing moves without your signature.
- Your browser submits it to Stellar and waits for confirmation.
Public stats
Anyone can check how the vault is doing on the app’s Protocol page, testnet.writz.xyz/protocol, without a wallet:
The same page shows the borrow pool (available to borrow, supplied by lenders, borrowed across open loans) and links each Writz contract on Stellar Expert.
Status
For Developers
- Relayer routes.
GET /defindex/apy,GET /defindex/position,POST /defindex/deposit,POST /defindex/withdraw,GET /metrics/tvlandGET /metrics/retentionare documented in the relayer README. The public testnet relayer is athttps://api.testnet.writz.xyz. - Browser flow. The build, sign and submit split lives in
frontend/app/src/lib/flows/earn.ts. - End-to-end test. The relayer’s Earn cycle test submits a real deposit and withdrawal against the testnet vault. See “The Earn end-to-end cycle” in the relayer README.
- Vault deployment. Addresses, transactions, fees and roles are in
contracts/deployments/defindex-vault-testnet.md.