Code Tours
- 1.1: dTRINITY Codebase Overview 
- 2.1: Vault Abstractions: Overview 
- 2.2: RescuableVault: Token Rescue 
- 2.3: SupportsWithdrawalFee: Withdrawal Fee Mechanics 
- 2.4: SwappableVault: Swap Sanity Checks 
- 3.1: Utilities/Common: Odos Swap – Overview 
- 3.2: Utilities/Common: Odos Swap – Router Interface 
- 3.3: Utilities/Common: Odos Swap – Swap Utils Library 
- 4.1: Oracle Aggregator: Wrapper Design Risks 
- 5.1: Oracle Aggregator Core: Overview 
- 5.2: IOracleWrapper Interface 
- 5.3: OracleAggregator Implementation 
- 6.1: Oracle Aggregator: API3 Oracle Wrapper – Overview 
- 6.2: API3 Wrappers: Interfaces and Base Contract 
- 6.3: API3Wrapper: The Basic Direct Wrapper 
- 6.4: API3WrapperWithThresholding: Adding a Price Floor 
- 6.5: API3CompositeWrapperWithThresholding: Composite Feeds 
- 7.1: Oracle Aggregator: Overview 
- 7.2: BaseChainlinkWrapper 
- 7.3: RedstoneChainlinkWrapper 
- 7.4: RedstoneChainlinkWrapperWithThresholding 
- 7.5: RedstoneChainlinkCompositeWrapperWithThresholding 
- 8.1: Hard-Peg Oracle Wrapper 
- 9.1: dLEND Address Management: Overview 
- 9.2: ACLManager: Role-Based Access Control 
- 9.3: PoolAddressesProvider: The Market’s Address Book 
- 9.4: PoolAddressesProviderRegistry: Managing Multiple Markets 
- 10.1: dLEND Protocol Core: Configuration: Overview 
- 10.2: Reserve and User Configuration 
- 10.3: Configurator Logic and Input Types 
- 10.4: PoolConfigurator: Reserve Lifecycle Operations 
- 10.5: PoolConfigurator: Risk Management Settings 
- 12.1: dLEND Protocol Core: Tokens – Overview 
- 12.2: AToken 
- 12.3: DelegationAwareAToken 
- 12.4: VariableDebtToken 
- 12.5: StableDebtToken 
- 12.6: Tokenization Base Contracts 
- 13.1: dLEND Interest Rate Strategy: Overview 
- 13.2: Interest Rate Strategy Interfaces 
- 13.3: The Default Interest Rate Model 
- 13.4: The Zero Interest Rate Strategy 
- 14.1: dLEND Oracle: Overview 
- 14.2: The AaveOracle Contract 
- 14.3: The PriceOracleSentinel 
- 15.1: dLEND Protocol Core: Pool Overview 
- 15.2: Pool Data Structures 
- 15.3: Pool.sol: The Core Contract 
- 15.4: Core Logic: Supplying and Borrowing 
- 15.5: Core Logic: Liquidations and Flash Loans 
- 15.6: Advanced Features: E-Mode, Isolation Mode, and Bridge Logic 
- 16.1: dLEND Protocol Core: Data Provider – Overview 
- 16.2: IPoolDataProvider Interface 
- 16.3: AaveProtocolDataProvider Implementation 
- 17.1: dStable Token & Issuance: Overview 
- 17.2: dStable Token: ERC20StablecoinUpgradeable.sol 
- 17.3: dStable Issuance: Issuer.sol 
- 18.1: dStable Protocol: Collateral Vault: Overview 
- 18.2: CollateralVault.sol: Core Logic 
- 18.3: CollateralHolderVault.sol: Asset Custody 
- 19.1: dStable Redemption: Overview 
- 19.2: Basic Redemption Flow (Redeemer.sol) 
- 19.3: Fee-Enabled Redemption (RedeemerWithFees.sol) 
- 20.1: dStable Protocol AMO: Overview 
- 20.2: The AmoVault 
- 20.3: The AmoManager 
- 21.1: dLEND Periphery Adapters: Treasury – Overview 
- 21.2: AaveEcosystemReserveController: Treasury Controller 
- 21.3: AdminControlledEcosystemReserve & AaveEcosystemReserveV2: Reserve Implementation and Streaming 
- 21.4: Collector & CollectorController: Fee Collection and Control 
- 22.1: dLEND Rewards: Overview 
- 22.2: dLEND Rewards: Data Types 
- 22.3: dLEND Rewards: The RewardsController 
- 22.4: dLEND Rewards: The EmissionManager 
- 22.5: dLEND Rewards: The RewardsDistributor 
- 22.6: dLEND Rewards: Transfer Strategies 
- 23.1: dLEND Curve Adapters: Overview 
- 23.2: Core Swap Logic (BaseCurveSwapAdapter) 
- 23.3: Buy & Sell Adapters 
- 23.4: Liquidity Adapters 
- 23.5: Debt Adapters 
- 23.6: Adapter Interfaces & Flash Loans 
- 24.1: dLEND Periphery Odos Adapters: Overview 
- 24.2: Base Odos Swap Adapter 
- 24.3: Base Odos Buy and Sell Adapters 
- 24.4: Debt Swap Adapter 
- 24.5: Liquidity Swap Adapter 
- 24.6: Repay Adapter 
- 24.7: Withdraw Swap Adapter 
- 25.1: Static A-Token Vault: README Walkthrough 
- 26.1: Vaults & Strategies: Static AToken Wrapper: Overview 
- 26.2: Interfaces: StaticATokenFactory & StaticATokenLM 
- 26.3: Base Libraries: ERC20, ECDSA, RayMathExplicitRounding & Errors 
- 26.4: StaticATokenFactory: Registry and Deployment 
- 26.5: StaticATokenLM: ERC4626 Interface Implementation 
- 26.6: StaticATokenLM: Internal Deposit & Withdraw Logic 
- 26.7: StaticATokenLM: Meta-Transaction Support (metaDeposit & metaWithdraw) 
- 26.8: StaticATokenLM: Reward Accounting & Claiming 
- 27.1: DLoop Core: Overview 
- 27.2: DLoopCoreBase.sol: Core Vault Logic 
- 27.3: DLoopCoreDLend.sol: dLEND Integration 
- 27.4: dLEND Protocol Interfaces 
- 28.1: Vaults & Strategies: DLoop Periphery: Overview 
- 28.2: Flash Loan Interfaces (EIP-3156) 
- 28.3: Depositing with Leverage 
- 28.4: Redeeming a Leveraged Position 
- 28.5: Increasing Leverage 
- 28.6: Decreasing Leverage 
- 29.1: DPool Vaults: Overview 
- 29.2: The Core Vault: DPoolVaultLP 
- 29.3: Curve-Specific Vault: DPoolVaultCurveLP 
- 29.4: Interacting with Curve: ICurveStableSwapNG 
- 29.5: User-Facing Contract: DPoolCurvePeriphery 
- 29.6: DPool Interfaces 
- 29.7: DPoolVaultLP: State Variables 
- 29.8: DPoolVaultLP: Core Functions 
- 29.9: DPoolVaultLP: Asset Management 
- 29.10: DPoolVaultCurveLP: Introduction 
- 29.11: DPoolVaultCurveLP: State Variables 
- 29.12: Interacting with Curve Pools 
- 29.13: Claiming Rewards 
- 29.14: DPoolCurvePeriphery: Introduction 
- 29.15: Zap-in Functionality 
- 29.16: Zap-out Functionality 
- 29.17: DPool Vault Interface: IDPoolVaultLP 
- 29.18: Curve Interface: ICurveStableSwapNG 
- 29.19: Periphery Interface: IDPoolPeriphery 
- 29.20: Conclusion 
- 30.1: dSTAKE Vault: System Overview 
- 30.2: dSTAKE Vault: The Vault Token and Withdrawal Fees 
- 30.3: dSTAKE Vault: The Collateral Vault 
- 30.4: dSTAKE Vault: The Router 
- 30.5: dSTAKE Vault: Asset Conversion Adapters 
- 30.6: dSTAKE Vault: dLEND Rewards Manager 
- 31.1: Vaults & Strategies: DStake – Overview 
- 31.2: IDStakeRouter Interface – Core Operations 
- 31.3: IDStakeCollateralVault Interface – Asset Hooks 
- 31.4: DStakeToken: ERC4626 Wrapper 
- 31.5: DStakeCollateralVault: Asset Management & Valuation 
- 31.6: DStakeRouterDLend: Deposit & Withdrawal Flows 
- 31.7: DStakeRouterDLend: Asset Exchange & Rebalance 
- 31.8: DStakeRouterDLend: Governance & Adapter Configuration 
- 31.9: IDStableConversionAdapter & WrappedDLendConversionAdapter 
- 31.10: DStakeRewardManagerDLend: Rewards Claiming & Compounding 
- 32.1: Vaults & Strategies: Reward Claimable 
- 33.1: ERC20VestingNFT: Design and Functionality 
- 34.1: ERC20VestingNFT: Vesting Lifecycle and Soul‐Bound Mechanics 
- 35.1: dFTT Flash Loan Liquidator: Overview 
- 36.1: Off-Chain Bot: Aave V3 Interfaces – Overview 
- 36.2: Off-Chain Bot: Aave V3 Protocol Interfaces 
- 36.3: Off-Chain Bot: Bot-Specific Interfaces 
- 36.4: Off-Chain Bot: Aave V3 Data Types & Libraries 
- 37.1: Off-Chain Bot: Odos Integration Overview 
- 37.2: The Odos Router Interface 
- 37.3: OdosSwapUtils: Preparing Swap Transactions 
- 38.1: Off-Chain Bot: Common Liquidator Logic: Overview 
- 38.2: ILiquidator Interface 
- 38.3: SharedLiquidator Utilities 
- 39.1: Off-Chain Bot: Flash Loan Liquidator: Overview 
- 39.2: FlashLoanLiquidatorAaveBase.sol: Core Liquidation Logic 
- 39.3: FlashLoanLiquidatorAaveBorrowRepayBase.sol: Borrow and Repay Strategy 
- 39.4: FlashLoanLiquidatorAaveBorrowRepayOdos.sol: Swapping with Odos 
- 40.1: Off-Chain Bot: Flash Mint Liquidator: Overview 
- 40.2: FlashMintLiquidatorAaveBase: Core Liquidation Logic 
- 40.3: FlashMintLiquidatorAaveBorrowRepay & ODOS: External Entry and Swap Integration 
 
                        