Lista DAO 백서

Lista DAO

원문

bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 53쪽 중 12쪽

**Vault Name** * **Vault Symbol** <figure><img src="https://miro.medium.com/v2/resize:fit:1400/0*0WRQDKT-mXhYs7Uw" alt="" height="447" width="700"><figcaption></figcaption></figure> ## Step 3: Explore the Vault Dashboard <a href="#ffb0" id="ffb0"></a> 1. The dashboard displays: * Vault Name * Vault Address * TVL * Core Parameters: Performance Fee, Fee Recipient, Timelock <figure><img src="https://miro.medium.com/v2/resize:fit:1400/0*A3_tgnWrTh8XtX50" alt="" height="253" width="700"><figcaption></figcaption></figure> 2\. Click on Core Parameters to adjust your vault settings <figure><img src="https://miro.medium.com/v2/resize:fit:1400/0*oTcCNk8QsGvszS_Z" alt="" height="439" width="700"><figcaption></figcaption></figure> 3\. Use the dashboard to: * Manage roles (e.g., assign Curators or Allocators). * Adjust timelock settings. * Monitor vault performance. ## Step 4: Market Management <a href="#c198" id="c198"></a> <figure><img src="https://miro.medium.com/v2/resize:fit:1400/0*G3ftWwrvUKgRSdbq" alt="" height="391" width="700"><figcaption></figcaption></figure> 1. Add markets by searching for Market ID or collateral name, ensuring they match your vault’s asset. <figure><img src="https://miro.medium.com/v2/resize:fit:1400/0*9axHFLuFgbHVRKab" alt="" height="323" width="700"><figcaption></figcaption></figure> 2\. Set market caps and approve or reject pending markets. **Conclusion** The Lista Lending Vault GUI empowers our community to shape the future of DeFi with custom vaults that optimize yields and security. We invite experienced DeFi users to explore Lista DAO’s vault manager; to create their first vault, and share feedback with us. # How to create a vault: Manually Lista Lending enables permissionless creation of lending vaults on BNB Chain, allowing curators to deploy custom liquidity pools that optimize yield and manage risk. A Lista Vault accepts a single loan asset (e.g., lisUSD) and allocates deposits across multiple Lista markets. This guide walks you through the process of deploying and configuring a vault, empowering you to curate lending opportunities within Lista DAO’s ecosystem. Vaults are upgradeable smart contracts, offering flexibility to adapt to market needs while maintaining noncustodial security. Curators can set allocation strategies, fees, and risk parameters, making Lista Lending a powerful tool for tailored DeFi solutions. #### Prerequisites Before creating a Lista Vault, ensure you have the following: * BNB Chain Wallet: A wallet (e.g., MetaMask) configured for BNB Chain with sufficient BNB for gas fees. * Development Environment: A Solidity development setup (e.g., Hardhat, Foundry) with Node.js installed. * Loan Asset: The ERC-20 token to be used as the vault’s loan asset (e.g., lisUSD, BNB). * Market Knowledge: Familiarity with Lista Lending markets (loan/collateral pairs) to allocate liquidity effectively. * Oracle Selection: Chainlink (Main), Binance Oracle(comparative), Redstone(Backup) for price feeds. ## Creating a vault - Guide ### Step 1: Define Vault Parameters To deploy a vault, specify the following parameters: 1. Loan Asset: The single asset users will deposit and borrow (e.g., lisUSD). 2. Initial Markets: List of Lista markets (e.g., pt-clisBNB/lisUSD) to allocate liquidity to initially. 3. LLTV Options: fixed Liquidation Loan-To-Value ratio at 80% 4. Oracle: Chainlink (main), Binance Oracle (comparative), Redstone (Backup) for price data across markets. 5. Fee Structure: * Protocol Fee: Set by Lista DAO (0-25% of borrow interest). * Vault Fee: Optional curator fee, up to 50% of vault profits. 6. Timelock: Optional delay (e.g., 24 hours) for parameter changes 7. Roles: * Owner: You, the deployer, overseeing vault strategy. * Curator: Optional role for for setting caps and other important parameters (can be the Owner initially). * Guardian: Optional role for risk oversight (e.g., to pause actions). * Allocator: The role to allocate vault markets *** ### Step 2: Deploy the vault #### Step 2.1: Prepare the Parameters **Before deployment, you need to prepare the following parameters:** * **manager: Manager address (must be a timelock contract), this will be the same as the owner role** * **asset: Asset address** * **name: Name of the vault, used primarily for display and identification purposes** * **symbol: The abbreviation or ticker symbol of the vault.** * **This symbol is a shorter way to represent the vault, typically used in interfaces and listings.** * **curator: Curator address (must be a timelock contract)** * **allocator: Allocator address (does not need to be a timelock contract)** **All these parameters need values (marked as "TODO" in your reference image).** #### Step 2.2: Clone the Repository **Navigate to the specific branch of the Moolah repository:** `git clone https://github.com/lista-dao/moolah.git` `cd moolah` `git checkout feature/deployScripts` #### Step 2.3 Fill in the params <figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeGvAXo0gAEzsaOkYxIK1Dm0adyqL92MlzaInn7f_XazsyW77r5QT_wQ8-GtQveOJTqVSYH-KlSPAYdi4fZhWk-VnzBb-xITBSokRxl-WtoMxzaUG-kI7HXHMSrmNUu9BO32ITa?key=ZbB0Bdp_i9xaaxZIxmtWD2y_" alt=""><figcaption></figcaption></figure> #### Step 2.4: Execute the Deployment Script Run the following command to deploy the vault contract to BSC network: `forge script script/deploy_moolahVault.sol --rpc-url bsc --broadcast --verify -vvv` This command will: * **Execute the deployment script** * **Connect to the BSC network** * **Broadcast the transaction to deploy the contract** * **Verify the contract on the blockchain explorer** * **Provide verbose output (-vvv) for detailed logs** **Make sure you have sufficient funds in your wallet to cover gas fees and that your environment is properly configured for Foundry.** *** ### Step 3: Configure the Vault Here are methods you can use to configure your vault. #### 3.1 Set Fee Role: `MANAGER`\ Method: `setFee`\ Parameter: * `newFee (uint256)`: The new fee value, with a precision of 1e18. #### 3.2 Set Fee Recipient Role: `MANAGER`\ Method: `setFeeRecipient`\ Parameter: * `newFeeRecipient (address)`: The address that will receive collected fees. #### 3.3 Set Skim Recipient Role: `MANAGER`\ Method: `setSkimRecipient`\ Parameter: * `newSkimRecipient (address)`: The address that will receive mistakenly transferred tokens. #### 3.4 Set Market Supply Cap Role: `CURATOR`\ Method: `setCap`\ Parameters: * `loanToken (address)`: Loan token of the market. * `collateralToken (address)`: Collateral token of the market. * `oracle (address)`: Price oracle for the market. * `irm (address)`: Interest rate model. * `lltv (uint256)`: Loan-to-value threshold. * `newSupplyCap (uint256)`: Maximum deposit cap for the specified market.<br> Note: These parameters should match the configuration used when the market was created. #### 3.5 Set Deposit Queue Role: `ALLOCATOR`\ Method: `setSupplyQueue`\ Parameter: * `newSupplyQueue (bytes32[])`: An array of marketIds defining the deposit order. Deposits will be routed to markets in the specified sequence. #### 3.6 Update Withdraw Queue Role: `ALLOCATOR`\ Method: `updateWithdrawQueue`\ Parameter: * `indexes (uint256[])`: Array of indexes that reorders the existing withdraw queue.<br> Note: The indexes refer to positions in the current withdraw queue. #### 3.7 Set Market Removal Role: `CURATOR`\ Method: `setMarketRemoval`\ Parameters: * `loanToken (address)` * `collateralToken (address)` * `oracle (address)` * `irm (address)` * `lltv (uint256)` Note: This marks a market for removal. The market will only be removed after the Vault's position in it is zero, and the updateWithdrawQueue function has been called. #### 3.8 Role Management #### 3.8.1 Grant Role Role: `ADMIN` or `MANAGER`\ Method: `grantRole`\ Parameters: * `role (bytes32)`: Role identifier. * `account (address)`: Address to assign the role to. #### 3.8.2 Revoke Role Role: `ADMIN` or `MANAGER`\ Method: `revokeRole`\ Parameters: * `role (bytes32)`: Role identifier. * `account (address)`: Address to remove the role from. *** ### Step 4: Deploy the TimeLock #### 4.1: Prepare Parameters First, you need to prepare three key address parameters: * proposer address: The address that will create transactions * executor address: The address that will execute transactions * canceller address: The address that will cancel transactions Before beginning deployment, make sure you've decided on these three addresses. You should fill in the actual addresses you want to use in the table. #### 4.2: Deploy the Timelock Contract Navigate to the repository at[ https://github.com/lista-dao/moolah](https://github.com/lista-dao/moolah) and switch to the `feature/deployScripts` branch. #### 4.3: Fill in the params <figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcWIqKdLYE030gQ7c8ycJepyI9iJaILG5K-CrdqY-_84AUR40c4GD66fl63cfvc53-b8d4K1FgjUGqAM_oGfq1U2xRzuCCpO2zHisDLaxhp_Www77LcdH86uKidjyysTdsSc3JI?key=ZbB0Bdp_i9xaaxZIxmtWD2y_" alt=""><figcaption></figcaption></figure> Run the following command to deploy the Timelock contract: `forge script script/deploy_timeLock.sol --rpc-url bsc -vvv --broadcast --verify` This command will: * Execute the deployment script for the Timelock contract * Connect to the BSC network * Provide verbose output (-vvv) * Broadcast the transaction to the network * Verify the contract on BSC Scan Make sure you have sufficient funds in your deployment wallet to cover gas fees and that you have properly configured your environment variables for authentication with the network and verification service. ### Step 5: Verify and Activate 1. Verify on BscScan * Submit your vault’s contract code to BscScan for transparency (use the deployed address). 2. Test Deposits * Deposit a small amount of the loan asset (e.g., 10 lisUSD) to ensure the vault functions as expected. * Check allocation and APY via the Lista Lending interface. 3. Go Live * Announce your vault to the community (e.g., Lista DAO Discord) to attract depositors. #### Post-Deployment Management * Monitor Performance: Track APY and market conditions via the Lista Lending dashboard. * Rebalance Liquidity: Adjust allocations as needed using the Allocator role. * Upgrade if Necessary: Leverage the upgradeable design to modify parameters or add features (requires Owner permissions). * Handle Bad Debt: Manually settle or distribute unrealized bad debt per vault settings. # How to create a Market on Lista Lending 1\. Confirm Market Parameters * loanToken * collateralToken * Oracle * Irm * lltv | Parameter | Type | Description | | --------------- | ------- | ---------------------------------------- | | loanToken | address | Contract address of the borrowing token | | collateralToken | address | Contract address of the collateral token | | oracle | address | Address of the oracle | | irm | address | Address of the interest model | | lltv | uint256 | Loan-To-Value rate | Note: * Oracle: The oracle must implement the following method, where asset is the token address. The function should return the asset price with 8 decimals of precision: function peek(address asset) external view returns (uint256); * IRM (Interest Rate Model): This must be enabled by Lista Lending’s manager using enableIrm. By default, the protocol uses the IRM deployed by Lista Lending at the following address: \[TBD] * LLTV (Loan-to-Value for Liquidation): This must also be set by Lista Lending’s manager using enableLltv. Users may choose from the enabled LLTV options to create a vault.<br> ## 2. Create Markets 1. Jump to the contract address: <https://bscscan.com/address/0x8F73b65B4caAf64FBA2aF91cC5D4a2A1318E5D8C><br> 2. Fill in attributes\ ![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXcMq245iohsignlpyM7nwuKu_qD1cEOqLodL8U7NkVi0BnVBr9F8r4uHkQG1s-waQIXMu1bHmfnhFUVjFn6mb1Nip5_w1SST32f5HIjBc1DxP0wSX7jZtG3XxXaf-3F6OHREdeReQ?key=wfz3O-Nby90_rWV7ZzqEXcEA) 3. Approve and done! ## 3. Set up fees \[Optional] Only the Manager address has the authority to set up market fees. Market fees will be default 0 if not set up. 1)Jump to the main contract address: <https://bscscan.com/address/0x8F73b65B4caAf64FBA2aF91cC5D4a2A1318E5D8C> 2\) Fill in the attributes, where newFee is the parameter for setting the fee rate, with 1e18 decimal places. For example, fill 100000000000000000 for 10% rates. ![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXdcBaYVU5LBqgZNIPcnesIWSagugP5HU0IveB68oe0S7YCEr4JCsyyfSpT_Ihn2VTVvku8TNrhb6ResvemvrIfiySlrftyBoA1Tn6YzApwcz--lpgXO5pAW_14z6iblA7ovqpDNpQ?key=wfz3O-Nby90_rWV7ZzqEXcEA) ## 4. Verify results ![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXep-PuU2c22WHnpMt_cGfvYO1AMWS9QLu4gVqQlo5ONW1P9LyJwInmzrBzK7LdsPY0oKmrLBJKn68T-_wkfJ7jcMJerjOGZ-Qi4Zqb3KUU9LnhchzgpZoXf9c89_9uCs5Wa9Tmq?key=wfz3O-Nby90_rWV7ZzqEXcEA) marketId can be obtained from the transaction creating the market, where id refers to the marketId ![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXcloxfriNnhSkciVemSDkTz5z7UU1sU3B51N9RLrXOWkJfD6uArwR7CvMmEVyMMLwNHnx2Y_6xlCnvyTa92arwAgxM8wis4quEM141xAl8z2098iC0hFqy-ESVKd_gKddsVxUTZYg?key=wfz3O-Nby90_rWV7ZzqEXcEA) Fee rate can be obtained via the market function in the contract by passing in the marketId as a parameter. * Check the transaction that successfully creates market * Check marketId * Check fee rate # Using Binance Wallet # Liquid staking BNB into slisBNB Step 1: Funding your wallet with BNB 1. Log in to your Binance app and click on the “Wallets” section. Go to “Web3”. ![](https://docs.bsc.lista.org/~gitbook/image?url=https%3A%2F%2F1284749027-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FeuAQJMk753IWaCTi0zzi%252Fuploads%252FwIFMryMLKXPUzKtqtgdI%252Fimage.png%3Falt%3Dmedia%26token%3D8a794379-12a7-4dc1-8c1c-c252cd3e8a0f\&width=300\&dpr=4\&quality=100\&sign=2fcebd70\&sv=1) 2. To fund your wallet, click on “receive”. If you are transferring funds from your binance account, click on “transfer in”. ![](https://docs.bsc.lista.org/~gitbook/image?url=https%3A%2F%2Flh7-us.googleusercontent.com%2FVL9aulbuRNV0a3o17LmIfjN2fLV1MyCMiBInf7BuwKKHTawf9fX6g78GzMVs-NGZ6EjeXL0xGlCl3TvOwzpoHKJxQtfx17m038wBhuZYYNMZlUOWnUQsAd5RlAn7m3LGKXHRCKPobUpWlAMog_Mb2M0\&width=768\&dpr=4\&quality=100\&sign=8a026e3b\&sv=1) 3. Select the Coin to transfer, which will be BNB in this case, and choose the BNB smart chain (BEP-20) network to transfer your funds through. ![](https://docs.bsc.lista.org/~gitbook/image?url=https%3A%2F%2Flh7-us.googleusercontent.com%2FepCaqTmH4Lwhua28wPBCQQLjsUgenpe452uYzFEo5psnZLpyVWJL9rGhxUIe8X7cgWYP5vLTXiwmTDf0fzb69OqFZRxjUuaRt1TtPW3Zh5BV_4xRBLnkRlxQLtzUqKyPnze_26bQfUWDFd2EM6VT-js\&width=768\&dpr=4\&quality=100\&sign=f4a4403f\&sv=1) 4. Select the amount of BNB that you would like to transfer into your Binance Wallet, and click withdraw. Note: To qualify for Lista DAO’s “The Drop” campaign, a minimum of 0.01 BNB is required to be liquid staked into slisBNB.\ ![](https://docs.bsc.lista.org/~gitbook/image?url=https%3A%2F%2Flh7-us.googleusercontent.com%2FI6RDRx_L0URN9pp5d7xEiFxJtmBxaXnKgzvrqmSt0ycflbQKbEU4p7wkat6Pxwfm8l-whVBTwZm6DQAkt9-26iregNlPGpV5iRjYPNr3OqM3S2FDctWjYZ9uc-KFwSrcz7aVLkCJ9k_he3aFBGECH9A\&width=300\&dpr=4\&quality=100\&sign=11148b60\&sv=1) #### Step 2: Liquid staking BNB into slisBNB on Lista DAO <a href="#step-2-liquid-staking-bnb-into-slisbnb-on-lista-dao" id="step-2-liquid-staking-bnb-into-slisbnb-on-lista-dao"></a> 1. Once your wallet has been funded with BNB, the next step is to liquid stake your BNB into slisBNB on Lista DAO. 2. Head over to the “Earn” section on the bottom right hand corner. ![](https://docs.bsc.lista.org/~gitbook/image?url=https%3A%2F%2F1284749027-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FeuAQJMk753IWaCTi0zzi%252Fuploads%252FPHWYq9wMkPatPjT5uaQZ%252Ftelegram-cloud-photo-size-5-6249301136964172966-y.jpg%3Falt%3Dmedia%26token%3Ddb9a59af-f069-47f4-912b-ed089af2eb76\&width=300\&dpr=4\&quality=100\&sign=bf90dc7a\&sv=1) 3. Under Lista DAO, click "stake".\ ![](https://docs.bsc.lista.org/~gitbook/image?url=https%3A%2F%2F1284749027-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FeuAQJMk753IWaCTi0zzi%252Fuploads%252FIVtRws1uWlD2ump1F7Pu%252Ftelegram-cloud-photo-size-5-6249301136964172968-y.jpg%3Falt%3Dmedia%26token%3De5ebd172-b4e4-46e6-9e38-274976b1ed56\&width=300\&dpr=4\&quality=100\&sign=9f524dbb\&sv=1) 4. You will be redirected to Lista DAO’s landing page in the app. Connect your Binance Wallet, and click on “Stake”.\ ![](https://docs.bsc.lista.org/~gitbook/image?url=https%3A%2F%2F1284749027-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FeuAQJMk753IWaCTi0zzi%252Fuploads%252Fao1T15MqEhRLKJHTGAAW%252Fimage.png%3Falt%3Dmedia%26token%3D8c7ce4ad-d7b7-47f0-9f7a-55d959b5986d\&width=300\&dpr=4\&quality=100\&sign=78f5fbf6\&sv=1) 5. Input the amount of BNB you would like to liquid stake on Lista. Remember to leave some BNB behind for gas!\ ![](https://docs.bsc.lista.org/~gitbook/image?url=https%3A%2F%2Flh7-us.googleusercontent.com%2FPiLMR9oSzdIoNF7V7mejgbHh6jWQBsOIaAVDlno3n1otnf_29-PHM79_fSUNjERWIr8H8ymmrZDWtfDyYtOoeO5bUaBqTCvFIwJj1L5VuBJaq-M1teCaPAGZ-2_GaRq_6_Yad-fk51LW_kaPO393pfc\&width=300\&dpr=4\&quality=100\&sign=4964b416\&sv=1) 6. Confirm the transaction, and a notification will appear once your BNB has been liquid staked on Lista DAO. ![](https://docs.bsc.lista.org/~gitbook/image?url=https%3A%2F%2Flh7-us.googleusercontent.com%2F7-OFZLK4_fHu7qSh4XW1rSJFbmQLSWzg42HZaR68c8o9DFCflyCognEt88pDFZrvuON2kJ_i-vcCRCnCNT49V-HKHbAS-CvqTccYcaBri4AzDqZmDz1WKZ5chsY5M70YI9vaTWPXmbScI5uomgTL7ls\&width=768\&dpr=4\&quality=100\&sign=92883237\&sv=1) 7. Once the transaction has been confirmed, you have completed the task #### How to withdraw/Unstake BNB on Lista DAO <a href="#how-to-withdraw-unstake-bnb-on-lista-dao" id="how-to-withdraw-unstake-bnb-on-lista-dao"></a> 1. To unstake BNB on Lista DAO, navigate to the Lista DAO page by following the instructions given in step 2. (from instruction 1 to 4). 2. Connect your Binance Wallet and click on “Stake BNB”. ![](https://docs.bsc.lista.org/~gitbook/image?url=https%3A%2F%2F1284749027-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FeuAQJMk753IWaCTi0zzi%252Fuploads%252Fao1T15MqEhRLKJHTGAAW%252Fimage.png%3Falt%3Dmedia%26token%3D8c7ce4ad-d7b7-47f0-9f7a-55d959b5986d\&width=300\&dpr=4\&quality=100\&sign=78f5fbf6\&sv=1) 3. Head over to the unstaking section by clicking on the “unstake”, and input the amount of BNB you would like to withdraw/unstake, and confirm the transaction. Take note: There will be a 7-15 days unstaking period.\ ![](https://docs.bsc.lista.org/~gitbook/image?url=https%3A%2F%2Flh7-us.googleusercontent.com%2FPld8G0rkw3zjwl1gIPWrsGSwThHOX_OeX_tiqIjCvSPOA4G2y3q8lifAeUnzJIP6OzV9DANVEj7EciFLEqV2uv6j4CqXoJRSjbvzxVS_TDUmmGPn63iRT_BQn-foJ-54dGERdeDpxKjchjBZ35jkIog\&width=768\&dpr=4\&quality=100\&sign=26d38f5d\&sv=1) 4. Once the withdrawal transaction has been confirmed, you can monitor the status of your withdrawal under the “withdrawal section” here.\ ![](https://docs.bsc.lista.org/~gitbook/image?url=https%3A%2F%2Flh7-us.googleusercontent.com%2FngUqGxvz73zW4iOTdwNGUG6n5hvLcfaKegMX0NV4oWWW255wnmmvLLrxXnxS0HyodhDlsdEw9RWy8Zny2XKCklFmqQhdiaOG9Nn-87KDouAAbAQeQBIohB6spDS5IqhhEvdanmXVa-bR5uTMWYzDoDk\&width=300\&dpr=4\&quality=100\&sign=75fe9201\&sv=1) 5. Once the transaction has been confirmed, you are done! # Obtaining lisUSD There are many ways to complete this task, but we recommend experiencing our borrowing process, where you can quickly obtain lisUSD at a lower interest rate by collateralizing BNB. 1. Select "Add BNB" as collateral.\ ![](https://docs.bsc.lista.org/~gitbook/image?url=https%3A%2F%2F1284749027-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2F
프로젝트로 돌아가기