Proposal Date
2024-09-26
Background
The LetterOfCredit
contract requires both internal and external configurations. Internally, supported credited tokens must be configured as well as asset pair collateral factors, the latter of which only pertains to unconverted LOCs (uLOCs). uLOCs back the credited token with a different collateral token and therefore are subject to liquidation under certain market conditions. Adding token support requires an ERC-20 address, setting corresponding minimum and maximum credited amounts for individual LOC creation, and setting a protocol-wide maximum credited amount. In addition, asset pair combinations for uLOCs need their own configurations:
- the maximum collateral factor for creation (creation collateral factor)
- the collateral factor at which a LOC is subject to liquidation (collateral factor)
- the liquidation incentive that ensures incentivized actors will liquidate LOCs if the collateral factor is reached
Due to market complexities, separate configuration entries are necessary for each asset in a pair, both as the collateral asset and credited asset respectively. Lastly, the maximum duration for all LOCs needs to be set. Though there is no limit to the number of times the Creator may extend a LOC, at any given time, the duration of a LOC may not exceed this maximum.
Externally, the LetterOfCredit
contract needs to be approved as a Collateralizable Contract in the CollateralVault
. In addition, the PythPriceOracle
that informs the LetterOfCredit
contract needs to be configured with the relevant Pyth price feed ids for each supported token.
Relevant Contracts
LetterOfCredit: 0x1A3251d83B4ed97d8E1d8451613D7DD9B4f42961
CollateralVault: 0x5d2725fdE4d7Aa3388DA4519ac0449Cc031d675f
PythPriceOracle: 0xC6f3405c861Fa0dca04EC4BA59Bc189D1d56Ee05
Executed Changes
Description
Adds LetterOfCredit
as an approved collateralizableContract
in CollateralVault
.
Configures LetterOfCredit
with credited token support: tokenAddress
, minPerLOC
, maxPerLOC
, globalMaxInUse
.
Configures LetterOfCredit
with asset pair collateral factors: collateralTokenAddress
, creditedTokenAddress
, creationCollateralFactorBasisPoints
, collateralFactorBasisPoints
, liquidatorIncentiveBasisPoints
.
Configures maxLocDurationSeconds
to 43,200,000 (500 days).
Configures PythPriceOracle
with LetterOfCredit
supported token addresses and their respective priceFeedId
.
Data Values
LetterOfCredit
Token attributes
Token | Min Per LOC (whole token units) | Max Per LOC (whole token units) | Global Max In Use (whole token units) |
---|---|---|---|
USDC | 100 | 100,000 | 10,000,000 |
USDT | 100 | 100,000 | 10,000,000 |
WETH | 0.028 | 30 | 3,000 |
Collateral factors
Collateral Token | Credited Token | Creation Collateral Factor | Collateral Factor (Liquidation) | Liquidator Incentive |
---|---|---|---|---|
USDC | USDT | 7500 (75%) | 8500 (85%) | 800 (8%) |
USDC | wETH | 6500 (65%) | 7800 (78%) | 800 (8%) |
USDT | USDC | 7500 (75%) | 8500 (85%) | 800 (8%) |
USDT | wETH | 6500 (65%) | 7800 (78%) | 800 (8%) |
wETH | USDC | 6500 (65%) | 7800 (78%) | 800 (8%) |
wETH | USDT | 6500 (65%) | 7800 (78%) | 800 (8%) |
PythPriceOracle
Token | Address | Price Feed Id |
---|---|---|
USDC | 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48 | 0xeaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a |
USDT | 0xdac17f958d2ee523a2206206994597c13d831ec7 | 0x2b89b9dc8fdf9f34709a5b106b472f0f39bb6ca9ce04b0fd7f2e971688e2e53b |
WETH | 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 | 0x9d4294bbcd1174d6f2003ec365831e64cc31d9f6f15a2b85399db8d5000960f6 |