Or do it in the Console
Your vault’s Fees tab shows the current configuration and runs the same four operations with no code.
Before you start
- The Manager role on the vault, or the Fee Receiver role for the last two operations.
- An API key.
- Your vault address, on mainnet or on the Sandbox.
- A way to sign transactions: Freighter, Stellar Laboratory, or your own signer.
POST /send, the same flow as any Vault Operation.
Basis points
Fees are expressed in basis points, whereSCALAR_BPS = 10,000 is 100%.
The vault rejects anything above 9,000. Fees apply to the yield a vault produces.
Read the current configuration
vaultFee: your fee on the yield.3000is 30%.defindexFee: the DeFindex share of that fee, not an extra charge on your users.5000is 50% ofvaultFee. See how DeFindex is paid.
Change the fee
lock-fees does two things in one call: it locks whatever has accrued at the old rate, then sets the new one. That ordering is deliberate, so a rate change never reprices yield that was already earned.
Manager only.
new_fee_bps: 0 disables the partner fee: your users then keep all of the yield and no fee is locked for anyone.
Change the fee receiver
Distribute
defindexFee.
Fees must be locked before they can be distributed. Locking happens automatically on every deposit and withdrawal, so in practice there is usually something to distribute; lock-fees forces it.
When it fails
Good practice
Use a multisig for the Manager role and a dedicated wallet for the Fee Receiver. Check the BPS arithmetic before signing, since a slip of one digit is a factor of ten. Try it on the Sandbox before mainnet. Distribute regularly rather than letting a large balance sit locked.Related
- Fees and revenue: the model, what your users see, how the split works.
- Stable APY: let DeFindex move the fee for you against a target.
- Vault Roles: who can lock, change and distribute.