Request form
Cookbook may introduce a token in the future. Share and contribute to be eligible for future airdrops.
close icon
relevant tag icon
Vault
copy icon
0013
• version 1.0.0
DeFi
Lending
MM

Vault

Delta Neutral Lending and Market Making

*Visit desktop site to download or deploy

Version

1.0.0

Creator

0013

Recent Use

🍞 0x5DF1 saved

Last Publish

3/5/2023
Any contract you deploy is yours.
Fully owned and controlled by your wallet.
Documentation
Source Code
initialize() :
This function initializes the vault details and whitelisted assets, and sets the main asset based on the maximum exposure limit. (autogenerated documentation)
getUSDValue(address,uint256) :
This function calculates the USD value of a given asset and amount using an oracle price feed. (autogenerated documentation)
getUSDBalanceAndDelta() :
This function calculates the USD balance and changes in asset balances for a user in a lending platform. It iterates through loans and positions to calculate the changes in asset balances. (autogenerated documentation)
hedgePositions() :
This function hedges positions by adjusting collateral size based on delta divergence, using GMX vaults. (autogenerated documentation)
createLoan(address,address,uint256,uint256,uint256) :
This function creates a loan by calculating the APR based on LTV, transferring collateral and loan assets, and minting a loan token. (autogenerated documentation)
repayLoan(uint32) :
This function allows a borrower to repay their loan, receive their collateral, and delete the loan from the system. It works by transferring the repayment amount from the borrower to the contract, transferring the collateral back to the borrower, and deleting the loan from the system. (autogenerated documentation)
checkBalanced(address,uint256) :
This function checks if the current balance of an asset is within the maximum exposure limit set in a whitelist. (autogenerated documentation)
swap(address,address,uint256) :
This function swaps tokens from one address to another based on their USD value and oracle price. (autogenerated documentation)
addLiquidity(uint256,address) :
This function adds liquidity to a pool by minting new shares in exchange for a specified asset, based on the current pool balance. (autogenerated documentation)
withdrawLiquidity(uint256,address) :
This function allows a user to withdraw their share of liquidity in a specific asset by transferring the asset to their address. (autogenerated documentation)
uri(uint256) :
This function returns a URI string for a given ID. It does not currently have any implementation and always returns an empty string. (autogenerated documentation)

Get Cookin'
share iconShare

copy iconDownload Source
copy iconnpx cookbookdev i Vault
copy icon

Recent Use

🍞 0x5DF1 saved

Last Publish

3/5/2023

Version

1.0.0

Creator

0013

Cookbook is free.
Any contract you deploy is yours.
Your contract is owned and controlled by you.