VaultDepositHandler
VaultDepositHandler
Addresses
Chain | Address |
---|---|
Arbitrum Sepolia | 0xc24486A759576ca3003416fC248D00026c38490D |
Base Sepolia | 0xf6888492350D3865CDC2f50604cE4f2d0882204b |
Base Mainnet | 0x5E234aa6EA76cc4378789862A5f5C22f9af4A4fC |
Functions
initialize
function initialize(struct StorageInstance app_) external
mint
Mint shares
shares to receiver
, calling ERC-2612 permit()
using the attached signature
and signatureAssets
. See EIP-2626 mint.
function mint(
Shares shares,
address receiver,
uint256 deadline,
struct IVaultDomain.Signature signature,
uint256 signatureAssets,
uint256 maxAssets
) public returns (
uint256 assets
)
Parameters
Name | Type | Description |
---|---|---|
shares | Shares | Shares to mint |
receiver | address | Account credited with the deposit |
deadline | uint256 | deadline for permit |
signature | struct IVaultDomain.Signature | permit entitling DomFiVault to assets collateral |
signatureAssets | uint256 | Assets permitted to DomFiVault. This should be the expected assets or higher, in case share price increases |
maxAssets | uint256 | Slippage control. Ignored if zero. If nonzero, revert if more than maxAssets are required to mint shares . |
Return Values
Name | Type | Description |
---|---|---|
assets | uint256 | Collateral sent to the vault in exchange for these shares |
deposit
Deposit amount
collateral to user
, calling ERC-2612 permit()
using the attached signature
and deadline. See EIP-4626.
function deposit(
uint256 amount,
address user,
uint256 deadline,
struct IVaultDomain.Signature signature,
Shares minShares
) public returns (
Shares shares
)
Parameters
Name | Type | Description |
---|---|---|
amount | uint256 | Collateral to deposit from msg.sender |
user | address | Address credited with the deposit |
deadline | uint256 | deadline for permit |
signature | struct IVaultDomain.Signature | permit entitling DomFiVault to amount collateral |
minShares | Shares | Slippage control. Ignored if zero. If nonzero, revert if a deposit yields less than minShares |
Return Values
Name | Type | Description |
---|---|---|
shares | Shares | dfUSDC amount sent to user in exchange for this collateral |