Lista DAO 백서

Lista DAO

원문

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

apter. Accepts **either** `amount` or `shares` — pass the one you want to specify and `0` for the other; the pool derives the second from the first. Two gates to know: a **minimum deposit** (`minDeposit`, in asset units) that reverts `deposit below minimum` — a small test deposit will fail; and a receiver whitelist that is **open while the set is empty**; once a manager populates it, unlisted deposits and share transfers revert. Read `minDeposit()` and `getWhiteList()` before assuming. | | `requestWithdraw(uint256 amount, uint256 shares, address receiver)` | Same dual `amount`/`shares` convention as `deposit` — pass one and `0` for the other. Takes a withdrawal fee in shares (transferred to the fee receiver — read `withdrawFeeRate()`, which is `1e18`-scaled, so `1e15` is 0.1%), burns the remainder from `msg.sender`, and records the receiver and the amount — which is re-derived from the reduced share count, so the queued payout is below a naive `convertToAssets(shares)`. | | `claimWithdraw` | Transfers assets to receiver after adapter-funded liquidity is available in `RWAEarnPool`. | ## Withdrawal Lifecycle Withdrawal is asynchronous. The settlement leg runs on the **external vault's redemption cycle**, not on a schedule the contract enforces, so there is no on-chain deadline by which a pending request becomes claimable. Poll for claimable liquidity rather than assuming a fixed delay. Interest accrues into share NAV as it is reported, so a share's value grows over the holding period rather than paying out separately. # Smart Contract | Name | Contract Address | | -------------------------- | ------------------------------------------ | | RWAEarnPool(USDT.Treasury) | 0x60512AeB641E960faAac7E2bFcB1819f993E7282 | | RWAAdapter(USDT.Treasury) | 0xC1AeEBBfD8b1280e78D930C43700758F543F5Fc6 | | RWAEarnPool(USDT.AAA) | 0x82664f43676FfD81BE2b472c5A2E2808952ecd56 | | RWAAdapter(USDT.AAA) | 0x69D15B7a232244EB0FDDED2a3E038589E5C50105 | ## slisXAUE (Staked Lista XAUE) RWA on Ethereum mainnet. Underlying: Tether Gold (XAUt) via XAUE / CoboFundToken. | Name | Contract Address | | ----------- | ------------------------------------------ | | SlisXAUE | 0x97b0A9c6A4d9fD51Bf8beBf04015F74C2e36A624 | | XAUTStaking | 0x86c92fF74fa55b08b4fA0d59E41e26b14ed1150b | | XAUEAdapter | 0x7509661232741c6912E278193404b912FC342F30 | # Credit Loans ## Overview Lista Credit offers fixed-term, fixed-rate loans whose size is set by a credit limit rather than by posted collateral. Eligibility and capacity are assessed off-chain and published on-chain as a Merkle root. The contract is `CreditBroker`, a `LendingBroker` extended with that credit-limit gate. Unlike standard collateral-based Moolah markets, Credit Loans use `CreditToken` as collateral representation: * `CreditToken` has **18 decimals**, so a $10,000 limit is `10000e18`, not `10000`. * `CreditToken` is non-transferable except by whitelisted `TRANSFERER`s — the brokers and Moolah. See [Loan Lifecycle](/for-developer/credit-loans/loan-lifecycle). * `1 CreditToken = 1 unit of credit limit = 1 USD borrowing capacity`. # Loan Lifecycle A Lista Credit loan runs from credit-limit provisioning through borrowing, repayment, the grace and penalty window, and reinstatement. Every step is on-chain in `CreditToken` and `CreditBroker`; only the Merkle **root** is committed in advance. A user's score becomes public on-chain state once synced — `CreditToken.creditScores` is a public mapping, the sync emits `ScoreSynced`, and the credit-token balance is itself 1 token per USD of limit. What stays off-chain is the scoring **inputs and model**, not the resulting score. > The grace period, penalty rate, no-interest window and LISTA discount are all manager-adjustable on-chain. Read `graceConfig()` and `listaDiscountRate` on `CreditBroker`, and `waitingPeriod` on `CreditToken`, at the time you need them — none of them is a fixed product guarantee. ## Roles in the flow | Actor | Responsibility | | ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | | Borrower | Supplies `CreditToken` collateral, borrows the loan token, repays principal + interest (+ penalty if overdue). | | Off-chain assessment | Computes eligibility/limits off-chain and publishes **only a Merkle root** to `CreditToken`. Scoring inputs and logic are not on-chain. | | `BOT` role | Rotates the `CreditToken` Merkle root (two-step, time-locked) and triggers liquidation of penalized positions. Operational keeper. | | `CreditBroker` | Orchestrates collateral supply/withdraw and fixed-term borrow/repay against the underlying Moolah market. | | `CreditBrokerInterestRelayer` | Receives interest and penalty from the broker and supplies it into the Moolah Credit Vault as revenue. | ## Lifecycle | Phase | Trigger | What happens on-chain | | ------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | 1. Credit-limit publication | Off-chain assessment → `CreditToken.setPendingMerkleRoot` then `acceptMerkleRoot` (`BOT`) | A new Merkle root is staged, then accepted after a waiting period (`waitingPeriod`, floored at 6h). Accepting increments `versionId`. Only the root is published — not the underlying scores. | | 2. Score sync (mint/burn) | `syncCreditScore(user, score, proof)` — also run implicitly by broker actions | The user's `(score, proof)` is verified against the current root **only when the submitted score or the stored `versionId` differs from what is already recorded** — an unchanged score accepts an empty proof and `versionId`. `CreditToken` mints up to the new score or burns down to it (1 token = 1 USD of credit capacity). | | 3. Supply collateral | `supplyCollateral(amount, score, proof)` | Broker syncs the score, pulls `CreditToken` from the user, and supplies it as collateral into the broker's Moolah market. | | 4. Borrow (open fixed position) | `supplyAndBorrow(collateralAmount, borrowAmount, termId, score, proof)` or `borrow(amount, termId, score, proof)` | Guarded by `noDebt` and `userNotPenalized`. The borrower receives the **full** `borrowAmount`; on an upfront-interest term the whole term's interest is owed from the start rather than deducted at disbursement. A `FixedLoanPosition` is created with the term's `apr`, `start`, `end`, and `termType`; the broker borrows from Moolah and transfers the loan token to the user. Emits `FixedLoanPositionCreated`. | | 5. Interest accrual | Time | Interest grows per the position's `FixedTermType` (see below). Interest is tracked at the broker. For a broker market `_isHealthy` ignores the per-user price entirely and compares collateral at the **plain market price** against the **broker's** total debt; the per-user price only shapes the seize math once a liquidation runs. So Moolah perceives the rising risk. | | 6. Repayment | `repay(amount, posId, onBehalf)` / `repayAndWithdraw(...)` / `repayInterestWithLista(...)` (gated — see below) | Interest is repaid first, then principal. Interest (and any penalty) is supplied to the Credit Vault via the relayer. Emits `RepaidFixedLoanPosition`. | | 7. Grace period | `end` → `end + graceConfig.period` | The loan is overdue but **no penalty applies yet**. The borrower can still repay normally. | | 8. Penalty window | After `end + graceConfig.period` (`dueTime`) | The position is "penalized." A penalty of `penaltyRate × (remaining principal + accrued interest) / RATE_SCALE` is required, and the position **must be repaid in full** in a single repayment. `graceConfig.penaltyRate` is `RATE_SCALE`-scaled (`1e27`), so `3 * 1e25` reads as 3%; `setGraceConfig` caps it at `RATE_SCALE`. Read it from `graceConfig()`; the `initialize()` default in the source is not what is deployed. | | 9. Liquidation / bad debt | `CreditBroker.liquidate(borrower, posId)` (`BOT` only) | A penalized, not-already-bad-debt position is written off via `Moolah.liquidateBrokerPosition`; the position is flagged `isBadDebt`. See [Bad Debt Handling](/for-developer/credit-loans/bad-debt-handling). | | 10. Reinstatement | Full repayment of the penalized/bad-debt position | The position is paid off and removed; `PaidOffPenalizedPosition` is emitted when a penalty was settled. Once outstanding debt (`CreditToken.debtOf`) is cleared, the user may borrow again. | ## Fixed-term interest modes (`FixedTermType`) Each fixed-term product carries one of two interest modes. `CreditBroker`'s `FixedTermAndRate` is **not** the same struct as `LendingBroker`'s: it adds a fourth field, `termType`, so the two cannot share an ABI decoder. The mode is fixed at borrow time and stored on the position; it determines how interest is computed. | Mode | Enum | How interest is charged | | ----------------- | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Accrue per-second | `ACCRUE_INTEREST` (0) | Interest accrues linearly on the **remaining** principal: `(principal − principalRepaid) × aprPerSecond × elapsed / RATE_SCALE`, where `aprPerSecond = (apr − RATE_SCALE) / 365 days`. `elapsed` runs from **`lastRepaidTime`**, not from the position start, and a partial principal repayment resets `lastRepaidTime` to the current block — so interest is not a single accrual over the whole term. Both ends are capped at the position `end`. There is no upfront charge. | | Upfront | `UPFRONT_INTEREST` (1) | Full term interest is owed once the no-interest window passes: `principal × (apr − RATE_SCALE) × term / (365 days × RATE_SCALE)`. Within `noInterestUntil` (set to `start + graceConfig.noInterestPeriod`) the interest is 0. | `apr` is scaled by `RATE_SCALE = 1e27` and encoded as `RATE_SCALE + rate` — a 10% APR is `1.10e27`. Subtract `RATE_SCALE`, not `1`, before using it in either formula above. `apr − RATE_SCALE` is itself still `RATE_SCALE`-scaled (10% APR → `1e26`, not `0.1`) — both formulas above, and the penalty formula below, each carry an explicit `/ RATE_SCALE` alongside the subtraction to remove that scale; drop either the subtraction or the division and the result is 1e27× too large. ## Repayment rules * **Interest first, then principal.** A repayment pays down outstanding interest before principal. Interest collected is supplied to the Credit Vault through the relayer. * **Penalized positions must be repaid in full.** Once past `dueTime`, a repayment must cover remaining principal + remaining interest + penalty in one transaction, or it reverts. * **Repay interest with LISTA (discounted).** `repayInterestWithLista(loanTokenAmount, listaAmount, posId, onBehalf)` lets a borrower settle outstanding interest using LISTA at a discount. Read `listaDiscountRate` for the rate and `allowTransferLoan` for whether the path is open — it reverts `relayer/transfer-loan-not-allowed` when it is not. The LISTA is sent to the relayer; the equivalent loan-token interest is credited from the relayer to the broker. * **Minimum loan check.** A borrow validates only the position it just opened against the Moolah market `minLoan`; a repay validates only the position it just touched, and only if it isn't fully cleared. Neither sweeps the account's other positions. Moolah separately enforces the same floor on the account's aggregate borrow. ## Borrow guards A new fixed position can only be opened when both broker modifiers pass: | Guard | Condition | Source | | ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------- | | `noDebt` | `CreditToken.debtOf(borrower) == 0` — the user must have no outstanding credit-token debt. This is an **accounted** amount, not a wallet balance: it counts credit tokens held plus those posted as collateral, so an address with a zero wallet balance can still be blocked here. | `CreditBroker._borrow` | | `userNotPenalized` | The user has no fixed position past its `dueTime`. | `CreditBroker._borrow` | Before borrowing, the broker calls `_tryWithdrawAndBurnDebt`, which withdraws and burns any `CreditToken` debt so the `noDebt` guard can be satisfied. ## Credit-limit gating (Merkle root) * `CreditToken` is non-transferable except by whitelisted `TRANSFERER`s (the brokers and Moolah). `1 CreditToken = 1 USD` of borrow capacity. * A user's balance is reconciled to their published score on every `syncCreditScore`: the broker passes `(score, proof)` and the token verifies the leaf `keccak256(abi.encode(chainid, creditToken, user, score, versionId))` against the current root before minting up to, or burning down to, the score. * The root is rotated in two steps by the `BOT` role: `setPendingMerkleRoot` → wait `waitingPeriod` (floored at 6h) → `acceptMerkleRoot` (increments `versionId`). A pending root can be cancelled by the `MANAGER` via `revokePendingMerkleRoot`. > Do not infer scoring inputs from the on-chain flow — the assessment that produces a limit is off-chain, and only its output reaches the chain. ## Key events | Event | Emitted when | | -------------------------- | --------------------------------------------------------------------------- | | `AcceptMerkleRoot` | A new credit-limit Merkle root is accepted (`CreditToken`). | | `ScoreSynced` | A user's score/balance is reconciled to the current root (`CreditToken`). | | `FixedLoanPositionCreated` | A new fixed-term position is opened. | | `RepaidFixedLoanPosition` | A repayment is applied (interest/principal/penalty breakdown in the event). | | `RepayInterestWithLista` | Interest is settled using discounted LISTA. | | `PaidOffPenalizedPosition` | A penalized position is fully paid off. | | `PositionLiquidate` | A penalized position is liquidated and flagged as bad debt. | ## Related * [Smart Contract](/for-developer/credit-loans/smart-contract) — contract roster and roles. * Canonical addresses: [BSC Credit (Lista Lending)](/for-developer/lista-lending/smart-contract/smart-contract-bsc-credit). # Bad Debt Handling Defaults are recognised on-chain rather than carried at face value, so the loss lands on whoever holds vault shares at the moment of write-off. Write-off is **driven by Lista, not by you**. A `BOT` calls `CreditBroker.liquidate(borrower, posId)`, which calls `Moolah.liquidateBrokerPosition` — and that in turn requires `msg.sender == brokers[id]`, so neither is reachable from a third-party account. (`CreditBroker` also carries a `liquidate(Id, address)` overload that always reverts `not supported`; it exists only to satisfy an interface.) The call reduces the market's outstanding borrow and the vault's total assets in the same transaction, so share price drops immediately and pro-rata. What that means for a depositor: * There is no insurance tranche and no first-loss absorber — current shareholders absorb the full loss. * The compensation for that risk is that performing loans pay well: on an upfront-interest term the borrower owes the **whole term's** interest however early they repay, and an overdue position pays a penalty on top. Since you cannot trigger it, the integration question is how to **detect** one: watch the broker's liquidation events — see [Loan Lifecycle](/for-developer/credit-loans/loan-lifecycle) for the event set. # Smart Contract ## Contracts and Roles | Contract | Role | | ----------------------------- | --------------------------------------------------------------------------------------------------------------------------- | | `CreditBroker` | Core broker contract for origination, repayment, and Moolah interaction. | | `CreditToken` | Transfer-restricted credit-limit token (`1 token = 1 USD` borrow capacity); only whitelisted `TRANSFERER`s may transfer it. | | `CreditBrokerInterestRelayer` | Routes collected interest to Credit Vault. | | `MoolahVault (Credit Vault)` | Liquidity vault used by Credit Loans. | | `LendingRewardsDistributorV2` | Distributes `LISTA` emissions to eligible users. | | `CreditBrokerInfo` | Read-oriented helper contract for broker data queries. | ## BNB Smart Chain Addresses | Contract | Address | | ----------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | | `CreditToken` | [0x1f9831626CE85909794eEaA5C35BF34DB3eB52d8](https://bscscan.com/address/0x1f9831626CE85909794eEaA5C35BF34DB3eB52d8) | | `CreditBroker` | [0x2A6704D56BDedF4c7564C9534D7fa8D8D204D578](https://bscscan.com/address/0x2A6704D56BDedF4c7564C9534D7fa8D8D204D578) | | `CreditBrokerInterestRelayer` | [0xBd94C4E931c1a15941B6273A952Af322891adC47](https://bscscan.com/address/0xBd94C4E931c1a15941B6273A952Af322891adC47) | | `CreditBrokerInfo` | [0x8E58Eb6Eba37ff00BF920Da0DD7Dd63a6576dD63](https://bscscan.com/address/0x8E58Eb6Eba37ff00BF920Da0DD7Dd63a6576dD63#readProxyContract) | | `LendingRewardsDistributorV2` (Credit Emission) | [0xC003fb7485ec58a24F26abcAf7646707AbC4886C](https://bscscan.com/address/0xC003fb7485ec58a24F26abcAf7646707AbC4886C) | | `MoolahVault (Credit Vault)` | [0x4E82Fa869F8D05c8F94900d4652Fdb82f3C7A004](https://bscscan.com/address/0x4E82Fa869F8D05c8F94900d4652Fdb82f3C7A004#readProxyContract) | # Lista Rights Reward distribution for the **holder** emission programme — the LISTA Holder Boost, extra emissions layered on top of eligible lending deposits/borrows and weighted by the holder's LISTA-balance tier (see [Holder Benefits](/governance/lista/lista-holder-benefits)), not a reward paid instead of a lending/credit position. `LendingRewardsDistributorV2` and `RewardsRouter` are each deployed several times, and the address tables do not always say for which emission programme. Identify the contract by the page it sits on: this section for holder emission, [BSC Core](/for-developer/lista-lending/smart-contract/smart-contract-bsc-core) for lending and bStock, [BSC Credit](/for-developer/lista-lending/smart-contract/smart-contract-bsc-credit) for credit. * [Smart Contract](/for-developer/lista-rights/smart-contract) — the holder-emission deployment. # Smart Contract ## BNB Smart Chain | Contract | Address | | --------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | LendingRewardsDistributorV2 (Holder emission) | [0xf17bd72e8bc4abbe7e8dd91b23734bfcf2832a68](https://bscscan.com/address/0xf17bd72e8bc4abbe7e8dd91b23734bfcf2832a68) | | RewardsRouter (Holder emission) | [0x8b0bbc465c4b148cb0b760aa54738f2320b51ef9](https://bscscan.com/address/0x8b0bbc465c4b148cb0b760aa54738f2320b51ef9) | # lisAster **lisAster** (`Lista Staked Aster`) is Lista's liquid staking token for ASTER: stake ASTER through the vault, hold a transferable receipt, and keep earning. Like slisBNB, it is reused across the protocol — lisAster/ASTER is a Lista StableSwap pool whose LP is accepted a
프로젝트로 돌아가기