Important
This repository contains smart contracts that have been developed for educational, experimental, or demonstration purposes only. By using or interacting with these smart contracts, you acknowledge and accept the following:
- The smart contracts in this repository have not been audited and are provided "as is" with no guarantees, warranties, or assurances of any kind. The authors and maintainers of this repository are not responsible for any damages, losses, or liabilities that may arise from the use or deployment of these smart contracts.
- The smart contracts in this repository are not intended for use in production environments or for the management of real-world assets, funds, or resources. Any use or deployment of these smart contracts for such purposes is done entirely at your own risk.
- The smart contracts are provided for reference and learning purposes, and you are solely responsible for understanding, modifying, and deploying them as needed.
One can use the logic provided in the following:
- Functions to get data:
supplyAPY
borrowAPY
supplyAssetsUser
borrowAssetsUser
collateralAssetsUser
marketTotalSupply
marketTotalBorrow
userHealthFactor
- Functions to modify state:
supply
supplyCollateral
withdrawCollateral
withdrawAmount
withdraw50Percent
withdrawAll
- Functions using callbacks:
leverageMe
deLeverageMe
One can use the logic provided in the following:
- Functions to get data:
totalDepositVault
vaultAssetsInMarket
totalSharesUserVault
supplyQueueVault
withdrawQueueVault
totalCapCollateral
supplyAPYMarket
supplyAPYVault
- Functions to modify state:
depositInVault
withdrawFromVaultAmount
redeemAllFromVault
- Install Foundry
- Install yarn
- Run
foundryup
- Run
forge install
- Create a
.env
file according to the.env.example
file.
You can run tests by running the command:
forge test
If you have any questions or need further assistance, please don't hesitate to reach out on Discord.
The code is under the MIT License. See LICENSE
.