// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IFYToken.sol"; import "./IOracle.sol"; library DataTypes { // ======== Cauldron data types ======== struct Series { IFYToken fyToken; // Redeemable token for the series. bytes6 baseId; // Asset received on redemption. uint32 maturity; // Unix time at which redemption becomes possible. // bytes2 free } struct Debt { uint96 max; // Maximum debt accepted for a given underlying, across all series uint24 min; // Minimum debt accepted for a given underlying, across all series uint8 dec; // Multiplying factor (10**dec) for max and min uint128 sum; // Current debt for a given underlying, across all series } struct SpotOracle { IOracle oracle; // Address for the spot price oracle uint32 ratio; // Collateralization ratio to multiply the price for // bytes8 free } struct Vault { address owner; bytes6 seriesId; // Each vault is related to only one series, which also determines the underlying. bytes6 ilkId; // Asset accepted as collateral } struct Balances { uint128 art; // Debt amount uint128 ink; // Collateral amount } // ======== Witch data types ======== struct Auction { address owner; uint32 start; bytes6 baseId; // We cache the baseId here uint128 ink; uint128 art; address auctioneer; bytes6 ilkId; // We cache the ilkId here bytes6 seriesId; // We cache the seriesId here } struct Line { uint32 duration; // Time that auctions take to go to minimal price and stay there uint64 vaultProportion; // Proportion of the vault that is available each auction (1e18 = 100%) uint64 collateralProportion; // Proportion of collateral that is sold at auction start (1e18 = 100%) } struct Limits { uint128 max; // Maximum concurrent auctioned collateral uint128 sum; // Current concurrent auctioned collateral } } library VRDataTypes { struct Vault { address owner; bytes6 baseId; // Each variable rate vault is related to only one base. bytes6 ilkId; // Asset accepted as collateral } }