Build on Berrier
Embed a vault
One deposit call into a BerrierVault.
What a vault is
A BerrierVault is an ERC-4626 USDG vault with a mandate: which underlyings, which coupon bands, fees and limits. It allocates to series in band, collects coupons and redeems at one share price.
Discover
const vaults = await factory.read.vaults([0n, 20n]);Quote
const shares = await vault.read.previewDeposit([assets]);Deposit with attribution
function deposit(uint256 assets, address receiver, bytes32 partnerId) external returns (uint256 shares);Exit
withdraw pays from idle USDG; larger exits use requestRedeem and claimRedeem as series settle. exitInKind hands over legs directly.
Track
requestsOf(owner, start, count) and exposure() are paged reads.
Errors you will see
| Error | Meaning |
|---|---|
| Locked | Exit lock has not passed |
| OutOfBand | No series in the mandate's band |
| CapExceeded | Deposit above vault limit |
Deploy your own vault
VaultFactory deploys a vault, mandate and adapter in one call. Mandates are bounded: up to 16 underlyings, management fee up to 2%, performance fee up to 30%, partner share up to 50%.