Functional Module
Last Updated on Mar. 6, 2024
Limited Trading Pool
Ducklend is fundamentally based on the Duck.ex swap protocol. The trading pool serves to provide liquidity, settle option income, and collect interest.
The Ducklend protocol has modified the liquidity trading pools, which now adhere to specific principles during transactions. Within Ducklend's limited liquidity trading pools, we introduce a new asset called Duck Egg Token, which will be described in detail later.
Taking the liquidity pool for the USDC-Duck Egg Token as an example, Solana serves as the collateral for this pool.
Duck Egg Tokens are issued in the limited trading pool based on the amount of Solana pawned in Ducklend's decentralized pawnshop. This portion of Duck Egg Tokens is then exchanged for USDC within the trading pool.
When users wish to redeem their assets and repay the interest, they must purchase Duck Egg Tokens with USDC in the limited trading pool and burn them. Then, the decentralized pawnshop sends the pawned Solana assets to the user's wallet.
Duck Egg Token (DET)
Token Function
Duck Egg Token serves as the token representing the underlying value of the Covered Call Option within Ducklend.
Issuance
The issuance of Eggs is entirely controlled automatically by the Ducklend protocol.
Initially, the issuance of Eggs starts at 0. Eggs are only issued within Ducklend's liquidity trading pools under two circumstances:
When a user opens a position, the Ducklend protocol calculates the current pawn value and future interest payable based on the present price of the pawned assets.
To smooth out volatility, within the liquidity trading pools, the exchange rate of Egg/USDC will fluctuate between 0.9 and 1.1. Should the value of Egg relative to USDC exceed this predefined range, the Ducklend protocol will automatically issue or destroy Eggs accordingly.
Burn
Eggs used to repay interest to the trading pool will be burned within the liquidity trading pool.
Value Fluctuation
The value of Duck Egg Tokens will fluctuate by up to 10% above or below the stablecoin pegged to the US dollar. The Ducklend protocol will automatically smooth out any excess.
Can Users Buy or Sell DET (Duck Egg Token)?
Within the Ducklend interface, Egg assets are invisible to users. By collateralizing Solana assets to obtain USDT/USDC stablecoins, users do not directly handle Eggs. The protocol within limited trading pools automatically trades all Eggs.
Decentralized Pawnshop
The decentralized pawn's primary function is to acquire pawn assets, generate option elements, and settle pawn assets.
Acquire Pawn Asset
Before collecting the collateral, it needs to be valued. The pawn machine realizes this function by docking with the Oracle machine. See below for details on the Oracle part.
Generate Option Elements
After the user pawns the asset, the protocol automatically generates a redeemable certificate. The pawn machine will clarify each element in the voucher. This certificate is the customer's covered call option.
Settle Pawn Assets
The pawn machine is responsible for settling the options and returning settled assets to the liquidity pool.
Give Back: If the user repays the interest, the pawn machine will return the collateral to the user.
Auction / Liquidation: If the user fails to repay the interest and the option expires, the pawn machine will package the mortgaged assets and the interest (DET) that needs to be returned and auctioned. The interest that needs to be returned is discounted by approximately 2% every Epoch until the arbitrageur settles the expired asset package.
Oracle
Ducklend uses a first-party data oracle to provide high-fidelity data directly to the blockchain. Pyth provides price updates and a confidence interval on Solana for every slot.
You can read more about how Pyth aggregates price feeds from publishers here.
Flash Loans Service
Flash Loans Introduction
Flash Loans are special transactions that allow the borrowing of an asset as long as the borrowed amount (and a fee) is returned before the end of the transaction (also called One Block Borrows). These transactions do not require a user to supply collateral before engaging in the transaction. There is no real-world analogy to Flash Loans, so some basic understanding of how the state is managed within blocks in blockchains is required.
Ducklend Flash Loans
Ducklend provides lightning loan services mainly to assist users in purchasing mortgaged assets. Therefore, option fees are included in the transaction fee to cover the difference between the mortgaged assets and the USDC mortgaged.
Flash Loans Fees
The flash loan fee is initialized at deployment to 0.05%.
Last updated