diff --git a/spot-contracts/.openzeppelin/goerli.json b/spot-contracts/.openzeppelin/goerli.json deleted file mode 100644 index cf9981f7..00000000 --- a/spot-contracts/.openzeppelin/goerli.json +++ /dev/null @@ -1,5893 +0,0 @@ -{ - "manifestVersion": "3.2", - "admin": { - "address": "0x47bF554606254dCEC37119348AA201c5A4ef2C58", - "txHash": "0x3ab729a7345f93c399f9f13141fb307c3a533760a5526b901e4d28751b598523" - }, - "proxies": [ - { - "address": "0x7fdd750CdFbE76327B1bA855aaDD908Ea115A749", - "txHash": "0xf7215ff85d12cd6bfe4d22f127b9c27c22a95bcb107bab4da05d688a5af7a669", - "kind": "transparent" - }, - { - "address": "0x90b243433820bEe22191fdD7C544D241187A3F1c", - "txHash": "0x2f580ae1935ca10e6cdbc5e87fc1ca400d26bbdf9cb2312de9647da394f9a043", - "kind": "transparent" - }, - { - "address": "0x70Fb13F60e4AD4e8642D308BA247496Ff68955B3", - "txHash": "0xc4f3a34c4890f38f1319c895a1ecce4e2305a112f683b9b4c502e6d40a3feb99", - "kind": "transparent" - }, - { - "address": "0x534e2cA3Ce918321BDd6F151B7D1A0f8832Ab1c6", - "txHash": "0xf7874a567053047926665e5c8391e7666620d705c1ecfd21922c69f10735c2c3", - "kind": "transparent" - }, - { - "address": "0xDDE733Ec275a82F07AE8fE6cA5165f7bF64AcB3b", - "txHash": "0x5d38056f2e2f6cb43144d8669028f330166871e3eefc6dd011d6f06b17c2374d", - "kind": "transparent" - }, - { - "address": "0x0cF0bcE1d837AF29AB81eCC2F7383a175f538706", - "txHash": "0x3f8f94a30c0dd1a7d5809a5c7bd411fba8e6b5e6556b6ea0c97aa25191640c25", - "kind": "transparent" - }, - { - "address": "0x60156bB86e9125639c624712a360FD3AbBb52421", - "txHash": "0x6958f7c22d3cf137715c9a49da0a24f715376a9b99250be33561b6280af0ba26", - "kind": "transparent" - }, - { - "address": "0x288E35A925b962DC9112a74F01b3d5d50C7352AB", - "txHash": "0x69a8c3011c591bb3b75beba04a3677f383f599f70612a4c1355784e942e796f2", - "kind": "transparent" - }, - { - "address": "0x95014Bc18F82a98CFAA3253fbD3184125A01f848", - "txHash": "0xb0b77c343e9f98acdcd119a04025b9cd6ba414fc643fc2a2a1f0bd6293d268fa", - "kind": "transparent" - }, - { - "address": "0xD38C80aa5178F39cFB398066200E68af325D36b8", - "txHash": "0x6e3e6dcb71e6966319d37e42d5ba51ffb1c74e600460620760472b39729b1621", - "kind": "transparent" - }, - { - "address": "0xDf7c8364bb6007dB68Bb1c88317f8f7f5bBAfff8", - "txHash": "0x16c9cfb4d59c1030fd1acc05e0437b2e8a8ebab194449aba8780827429918711", - "kind": "transparent" - }, - { - "address": "0x1bcA4E8Cc3f93150132Bee5b0A32760b00686836", - "txHash": "0xd152a65e4f5f63e9860120e6a5b8ff262c76aaa33f4e6c80be78ae18af9881a7", - "kind": "transparent" - }, - { - "address": "0x942f35ce5885F737Beccd8EE3FDAAC81574D058E", - "txHash": "0x15a966c6945db5d308b949ebf0271dff2ba0ef97001dc8b43be62d4a72aa80ea", - "kind": "transparent" - }, - { - "address": "0xca36B64BEbdf141623911987b93767dcA4bF6F1f", - "txHash": "0x882e7b38cb8bfd743672130567a0eaf88bc59cafd4106059dc6945f2738810f3", - "kind": "transparent" - }, - { - "address": "0x80Caf6B840463bFC942D0FB43D8DFb3272C61fd0", - "txHash": "0xd53866102620be83c9d20fa558402bc83dbf0b4ef3e4b83b3569693951f5be25", - "kind": "transparent" - }, - { - "address": "0x9d6e3D7e6f89aABae6a3B3ABd030d11251aC254D", - "txHash": "0x39b343ac2ef57f031e711d5f1939a7194a43068cfb7b33f31f3f7c09274e154a", - "kind": "transparent" - }, - { - "address": "0x7eDf328E411effd08068f5e4D478849A7407883F", - "txHash": "0x9f4a1bef2aa8f80ddcf63b1b6357b2df2008609b394233692125de5a2bec8716", - "kind": "transparent" - }, - { - "address": "0xB02114487836409136B0006A090995D63931C486", - "txHash": "0x20404284513cc077b2c42383f4557d292b9be6fe45d3386ed477d58be9c82ec0", - "kind": "transparent" - }, - { - "address": "0x5200c190816eca22462038a7bC54B32c221c4E6b", - "txHash": "0x080eee2d497b940d3df1ac327a5e8390afb44d45569d28d01a6cfbc6e8408c30", - "kind": "transparent" - }, - { - "address": "0xFd1cD0802F8c29d45F1135046481bFb1ccBbA0F3", - "txHash": "0x1d5f8daed73ed4f60db6f6ae976ca58dbda5d605385cab8b1d4be3caf65d2732", - "kind": "transparent" - }, - { - "address": "0x07Cd2cCE181D1313D73ad3741964f7c0A67F6f94", - "txHash": "0x12f74af963d5a8df47dbc7381dc2d9255b26016b052eeb17a339975bcfd2bde7", - "kind": "transparent" - }, - { - "address": "0x368DbE853c23523E9A3a54C420CCbE978e5a3a9d", - "txHash": "0xc309513a7a675205329e03559a5ae50422b1bc460086f891e612e24b145f3b8b", - "kind": "transparent" - }, - { - "address": "0x2C628463de226433820DD479Be27360Deb4592d1", - "txHash": "0x0360d34806c8eedf334a1cd3738756eb673a9c640168025c437a759689562800", - "kind": "transparent" - }, - { - "address": "0x2A18bfb505b49AED12F19F271cC1183F98ff4f71", - "txHash": "0xb5c56bfe87f481b6631e9f2ba78309488405c19a820db2f5df6da2028a6f4ac5", - "kind": "transparent" - }, - { - "address": "0xd9Ddcf72715D2fc49d7458b1170c6fc1168F6FEd", - "txHash": "0x457b91bc1e679eacc23144e4086421230b46cf7866402209198a292110ca7bdd", - "kind": "transparent" - }, - { - "address": "0xd43F410C4041fCfcE5f9c9a79958f00D04d75732", - "txHash": "0x778c134cfc468e72fd68b9468bcf266c7bbc079ad243853491303971841dd102", - "kind": "transparent" - }, - { - "address": "0x32dBa565581952FbC5842Dcdae97d1d161a83830", - "txHash": "0xa1360615ca0dcb210d8f4875cd4745ebe58d27e17d597891ee6dc2b8c00b55a7", - "kind": "transparent" - }, - { - "address": "0x41b57397D33AFccEbC42A0BEe0E7cA03Ebdd77bb", - "txHash": "0x6c28b4199eb8984c8e593a11834c3574caeee2c5cee980dfc9d4e3700b301a78", - "kind": "transparent" - }, - { - "address": "0x9Bb2591A8357d4227D52afdAdF4Cf0a89b868B3f", - "txHash": "0xd7b9767807df277f4289d9bd673ada8c982d12b3df8e887cf503d4caa9f31c72", - "kind": "transparent" - }, - { - "address": "0x863FDc33fE736363061F9e9EE9E18a91aDB7Ac23", - "txHash": "0x089f172b1ce31d1ab941e4d660fa943538d1bddf4ea12834e6eed71964fd4882", - "kind": "transparent" - }, - { - "address": "0xD24F2C8F579d6EFB944afC78558ae0714DA652E5", - "txHash": "0x8350c6ed969ebfd7ba782bd7bea091c2cd0fc5476653e8688b05ee37a6a4aa56", - "kind": "transparent" - }, - { - "address": "0x9Bdba3bc5aB8EC0E895344705dC85fC29645748a", - "txHash": "0x4dd4b1ed7b028c805d4f0f9a650f957f53c858edd432f495c4a9e11df1a3ffe2", - "kind": "transparent" - }, - { - "address": "0x89d619Cf7d3988cC36E96172A4227F9b5588B6BC", - "txHash": "0x7f23f3dfe7e34698b89eecc5e767060610bd24545fd569dccde29aedf9861c48", - "kind": "transparent" - }, - { - "address": "0x941AcD21154052357302c667cfdf69a2Af0914E5", - "txHash": "0x34eab6c445b44379e5b3e89ee3f635f6354593bcac1352e0f4e790df1d6faa7c", - "kind": "transparent" - }, - { - "address": "0xc2f58c538D5440e54195b444B45C790316C41e32", - "txHash": "0x480d8b35620ef76f0588a8592ecfbf71bbaf5a8c51b62e786d61d1760fe2b2a6", - "kind": "transparent" - }, - { - "address": "0x6B610AEc81F3a93EE6FeF4d409E54c3b84C4afF1", - "txHash": "0x0a696b8ff655558c01abffbea62c237f80544503e2ddf3193194b0690557ec92", - "kind": "transparent" - }, - { - "address": "0x8d849F6513e490fD83978f0f37f80D4C1edb019F", - "txHash": "0xcad065596b950334adfd32a0353b42b9b03ac7e7308822a42b530ae841077089", - "kind": "transparent" - }, - { - "address": "0x3487D8783edc09030Fa2ae62677bdfdF5d8E9714", - "txHash": "0x7f2a30ae3624c650979af42624c513656b534e1ec1411d56c5135e11da252aa2", - "kind": "transparent" - } - ], - "impls": { - "6efe38fadc14b840fc7ac930ec2e9375290d4b81e9f4b0d2fd62ad1cf71ecef2": { - "address": "0x0E31FedD01B934246FE08Ff8B0e996a3FBaa3feA", - "txHash": "0xb46030ef86232ceb6f30705c9714a9b8da97398f0d2a96a8f567a228317f0ba1", - "layout": { - "storage": [ - { - "label": "_initialized", - "offset": 0, - "slot": "0", - "type": "t_uint8", - "contract": "Initializable", - "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", - "retypedFrom": "bool" - }, - { - "label": "_initializing", - "offset": 1, - "slot": "0", - "type": "t_bool", - "contract": "Initializable", - "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" - }, - { - "label": "__gap", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)50_storage", - "contract": "ContextUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" - }, - { - "label": "_balances", - "offset": 0, - "slot": "51", - "type": "t_mapping(t_address,t_uint256)", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:37" - }, - { - "label": "_allowances", - "offset": 0, - "slot": "52", - "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:39" - }, - { - "label": "_totalSupply", - "offset": 0, - "slot": "53", - "type": "t_uint256", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:41" - }, - { - "label": "_name", - "offset": 0, - "slot": "54", - "type": "t_string_storage", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:43" - }, - { - "label": "_symbol", - "offset": 0, - "slot": "55", - "type": "t_string_storage", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:44" - }, - { - "label": "__gap", - "offset": 0, - "slot": "56", - "type": "t_array(t_uint256)45_storage", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:394" - }, - { - "label": "_owner", - "offset": 0, - "slot": "101", - "type": "t_address", - "contract": "OwnableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" - }, - { - "label": "__gap", - "offset": 0, - "slot": "102", - "type": "t_array(t_uint256)49_storage", - "contract": "OwnableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:87" - }, - { - "label": "feeStrategy", - "offset": 0, - "slot": "151", - "type": "t_contract(IFeeStrategy)6304", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:199" - }, - { - "label": "pricingStrategy", - "offset": 0, - "slot": "152", - "type": "t_contract(IPricingStrategy)6618", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:203" - }, - { - "label": "discountStrategy", - "offset": 0, - "slot": "153", - "type": "t_contract(IDiscountStrategy)6636", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:211" - }, - { - "label": "bondIssuer", - "offset": 0, - "slot": "154", - "type": "t_contract(IBondIssuer)6272", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:216" - }, - { - "label": "_depositBond", - "offset": 0, - "slot": "155", - "type": "t_contract(IBondController)6707", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:219" - }, - { - "label": "minTrancheMaturitySec", - "offset": 0, - "slot": "156", - "type": "t_uint256", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:223" - }, - { - "label": "maxTrancheMaturitySec", - "offset": 0, - "slot": "157", - "type": "t_uint256", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:227" - }, - { - "label": "maxSupply", - "offset": 0, - "slot": "158", - "type": "t_uint256", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:230" - }, - { - "label": "maxMintAmtPerTranche", - "offset": 0, - "slot": "159", - "type": "t_uint256", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:233" - }, - { - "label": "skimPerc", - "offset": 0, - "slot": "160", - "type": "t_uint256", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:237" - }, - { - "label": "_mintedSupplyPerTranche", - "offset": 0, - "slot": "161", - "type": "t_mapping(t_contract(ITranche)6734,t_uint256)", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:240" - }, - { - "label": "_appliedDiscounts", - "offset": 0, - "slot": "162", - "type": "t_mapping(t_contract(IERC20Upgradeable)954,t_uint256)", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:246" - }, - { - "label": "collateral", - "offset": 0, - "slot": "163", - "type": "t_contract(IERC20Upgradeable)954", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:256" - }, - { - "label": "_reserveTranches", - "offset": 0, - "slot": "164", - "type": "t_struct(AddressSet)2386_storage", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:259" - }, - { - "label": "_stdTotalTrancheBalance", - "offset": 0, - "slot": "166", - "type": "t_uint256", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:262" - }, - { - "label": "_stdMatureTrancheBalance", - "offset": 0, - "slot": "167", - "type": "t_uint256", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:266" - } - ], - "types": { - "t_address": { - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_bytes32)dyn_storage": { - "label": "bytes32[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)45_storage": { - "label": "uint256[45]", - "numberOfBytes": "1440" - }, - "t_array(t_uint256)49_storage": { - "label": "uint256[49]", - "numberOfBytes": "1568" - }, - "t_array(t_uint256)50_storage": { - "label": "uint256[50]", - "numberOfBytes": "1600" - }, - "t_bool": { - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_contract(IBondController)6707": { - "label": "contract IBondController", - "numberOfBytes": "20" - }, - "t_contract(IBondIssuer)6272": { - "label": "contract IBondIssuer", - "numberOfBytes": "20" - }, - "t_contract(IERC20Upgradeable)954": { - "label": "contract IERC20Upgradeable", - "numberOfBytes": "20" - }, - "t_contract(IFeeStrategy)6304": { - "label": "contract IFeeStrategy", - "numberOfBytes": "20" - }, - "t_contract(IPricingStrategy)6618": { - "label": "contract IPricingStrategy", - "numberOfBytes": "20" - }, - "t_contract(ITranche)6734": { - "label": "contract ITranche", - "numberOfBytes": "20" - }, - "t_contract(IDiscountStrategy)6636": { - "label": "contract IDiscountStrategy", - "numberOfBytes": "20" - }, - "t_mapping(t_address,t_mapping(t_address,t_uint256))": { - "label": "mapping(address => mapping(address => uint256))", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_uint256)": { - "label": "mapping(address => uint256)", - "numberOfBytes": "32" - }, - "t_mapping(t_bytes32,t_uint256)": { - "label": "mapping(bytes32 => uint256)", - "numberOfBytes": "32" - }, - "t_mapping(t_contract(IERC20Upgradeable)954,t_uint256)": { - "label": "mapping(contract IERC20Upgradeable => uint256)", - "numberOfBytes": "32" - }, - "t_mapping(t_contract(ITranche)6734,t_uint256)": { - "label": "mapping(contract ITranche => uint256)", - "numberOfBytes": "32" - }, - "t_string_storage": { - "label": "string", - "numberOfBytes": "32" - }, - "t_struct(AddressSet)2386_storage": { - "label": "struct EnumerableSetUpgradeable.AddressSet", - "members": [ - { - "label": "_inner", - "type": "t_struct(Set)2085_storage", - "offset": 0, - "slot": "0" - } - ], - "numberOfBytes": "64" - }, - "t_struct(Set)2085_storage": { - "label": "struct EnumerableSetUpgradeable.Set", - "members": [ - { - "label": "_values", - "type": "t_array(t_bytes32)dyn_storage", - "offset": 0, - "slot": "0" - }, - { - "label": "_indexes", - "type": "t_mapping(t_bytes32,t_uint256)", - "offset": 0, - "slot": "1" - } - ], - "numberOfBytes": "64" - }, - "t_uint256": { - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint8": { - "label": "uint8", - "numberOfBytes": "1" - } - } - } - }, - "86c2d96d55d9bc4dbd3f01df03770b02414ef3632bbbbe62a3f46679478f62ca": { - "address": "0x0E9d5ee87EF9b19d599aeda062A9F9d85542b702", - "txHash": "0x8d434383d11ab3462ef8409a3841e3794aa35cff28e56d83545c48ef6fcc6861", - "layout": { - "storage": [ - { - "label": "_initialized", - "offset": 0, - "slot": "0", - "type": "t_uint8", - "contract": "Initializable", - "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", - "retypedFrom": "bool" - }, - { - "label": "_initializing", - "offset": 1, - "slot": "0", - "type": "t_bool", - "contract": "Initializable", - "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" - }, - { - "label": "__gap", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)50_storage", - "contract": "ContextUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" - }, - { - "label": "_balances", - "offset": 0, - "slot": "51", - "type": "t_mapping(t_address,t_uint256)", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:37" - }, - { - "label": "_allowances", - "offset": 0, - "slot": "52", - "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:39" - }, - { - "label": "_totalSupply", - "offset": 0, - "slot": "53", - "type": "t_uint256", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:41" - }, - { - "label": "_name", - "offset": 0, - "slot": "54", - "type": "t_string_storage", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:43" - }, - { - "label": "_symbol", - "offset": 0, - "slot": "55", - "type": "t_string_storage", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:44" - }, - { - "label": "__gap", - "offset": 0, - "slot": "56", - "type": "t_array(t_uint256)45_storage", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:394" - }, - { - "label": "_owner", - "offset": 0, - "slot": "101", - "type": "t_address", - "contract": "OwnableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" - }, - { - "label": "__gap", - "offset": 0, - "slot": "102", - "type": "t_array(t_uint256)49_storage", - "contract": "OwnableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:87" - }, - { - "label": "feeStrategy", - "offset": 0, - "slot": "151", - "type": "t_contract(IFeeStrategy)6338", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:199" - }, - { - "label": "pricingStrategy", - "offset": 0, - "slot": "152", - "type": "t_contract(IPricingStrategy)6654", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:203" - }, - { - "label": "discountStrategy", - "offset": 0, - "slot": "153", - "type": "t_contract(IDiscountStrategy)6672", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:211" - }, - { - "label": "bondIssuer", - "offset": 0, - "slot": "154", - "type": "t_contract(IBondIssuer)6306", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:216" - }, - { - "label": "_depositBond", - "offset": 0, - "slot": "155", - "type": "t_contract(IBondController)6743", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:219" - }, - { - "label": "minTrancheMaturitySec", - "offset": 0, - "slot": "156", - "type": "t_uint256", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:223" - }, - { - "label": "maxTrancheMaturitySec", - "offset": 0, - "slot": "157", - "type": "t_uint256", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:227" - }, - { - "label": "maxSupply", - "offset": 0, - "slot": "158", - "type": "t_uint256", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:230" - }, - { - "label": "maxMintAmtPerTranche", - "offset": 0, - "slot": "159", - "type": "t_uint256", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:233" - }, - { - "label": "skimPerc", - "offset": 0, - "slot": "160", - "type": "t_uint256", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:237" - }, - { - "label": "_mintedSupplyPerTranche", - "offset": 0, - "slot": "161", - "type": "t_mapping(t_contract(ITranche)6770,t_uint256)", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:240" - }, - { - "label": "_appliedDiscounts", - "offset": 0, - "slot": "162", - "type": "t_mapping(t_contract(IERC20Upgradeable)954,t_uint256)", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:246" - }, - { - "label": "collateral", - "offset": 0, - "slot": "163", - "type": "t_contract(IERC20Upgradeable)954", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:256" - }, - { - "label": "_reserveTranches", - "offset": 0, - "slot": "164", - "type": "t_struct(AddressSet)2386_storage", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:259" - }, - { - "label": "_stdTotalTrancheBalance", - "offset": 0, - "slot": "166", - "type": "t_uint256", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:262" - }, - { - "label": "_stdMatureTrancheBalance", - "offset": 0, - "slot": "167", - "type": "t_uint256", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:266" - } - ], - "types": { - "t_address": { - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_bytes32)dyn_storage": { - "label": "bytes32[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)45_storage": { - "label": "uint256[45]", - "numberOfBytes": "1440" - }, - "t_array(t_uint256)49_storage": { - "label": "uint256[49]", - "numberOfBytes": "1568" - }, - "t_array(t_uint256)50_storage": { - "label": "uint256[50]", - "numberOfBytes": "1600" - }, - "t_bool": { - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_contract(IBondController)6743": { - "label": "contract IBondController", - "numberOfBytes": "20" - }, - "t_contract(IBondIssuer)6306": { - "label": "contract IBondIssuer", - "numberOfBytes": "20" - }, - "t_contract(IERC20Upgradeable)954": { - "label": "contract IERC20Upgradeable", - "numberOfBytes": "20" - }, - "t_contract(IFeeStrategy)6338": { - "label": "contract IFeeStrategy", - "numberOfBytes": "20" - }, - "t_contract(IPricingStrategy)6654": { - "label": "contract IPricingStrategy", - "numberOfBytes": "20" - }, - "t_contract(ITranche)6770": { - "label": "contract ITranche", - "numberOfBytes": "20" - }, - "t_contract(IDiscountStrategy)6672": { - "label": "contract IDiscountStrategy", - "numberOfBytes": "20" - }, - "t_mapping(t_address,t_mapping(t_address,t_uint256))": { - "label": "mapping(address => mapping(address => uint256))", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_uint256)": { - "label": "mapping(address => uint256)", - "numberOfBytes": "32" - }, - "t_mapping(t_bytes32,t_uint256)": { - "label": "mapping(bytes32 => uint256)", - "numberOfBytes": "32" - }, - "t_mapping(t_contract(IERC20Upgradeable)954,t_uint256)": { - "label": "mapping(contract IERC20Upgradeable => uint256)", - "numberOfBytes": "32" - }, - "t_mapping(t_contract(ITranche)6770,t_uint256)": { - "label": "mapping(contract ITranche => uint256)", - "numberOfBytes": "32" - }, - "t_string_storage": { - "label": "string", - "numberOfBytes": "32" - }, - "t_struct(AddressSet)2386_storage": { - "label": "struct EnumerableSetUpgradeable.AddressSet", - "members": [ - { - "label": "_inner", - "type": "t_struct(Set)2085_storage", - "offset": 0, - "slot": "0" - } - ], - "numberOfBytes": "64" - }, - "t_struct(Set)2085_storage": { - "label": "struct EnumerableSetUpgradeable.Set", - "members": [ - { - "label": "_values", - "type": "t_array(t_bytes32)dyn_storage", - "offset": 0, - "slot": "0" - }, - { - "label": "_indexes", - "type": "t_mapping(t_bytes32,t_uint256)", - "offset": 0, - "slot": "1" - } - ], - "numberOfBytes": "64" - }, - "t_uint256": { - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint8": { - "label": "uint8", - "numberOfBytes": "1" - } - } - } - }, - "d2e53de4902ffb8bac77413957093a553f7cf2f06e66a7ece6769b7ff90a1dc2": { - "address": "0x56D973424A697a0CfE7FBD8b280FE09019d2CCcC", - "txHash": "0xc8e5e9aa3cedcabcac6af8db6eefc019344922539017ace7c64f1a307df6b705", - "layout": { - "storage": [ - { - "label": "_initialized", - "offset": 0, - "slot": "0", - "type": "t_uint8", - "contract": "Initializable", - "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", - "retypedFrom": "bool" - }, - { - "label": "_initializing", - "offset": 1, - "slot": "0", - "type": "t_bool", - "contract": "Initializable", - "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" - }, - { - "label": "__gap", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)50_storage", - "contract": "ContextUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" - }, - { - "label": "_balances", - "offset": 0, - "slot": "51", - "type": "t_mapping(t_address,t_uint256)", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:37" - }, - { - "label": "_allowances", - "offset": 0, - "slot": "52", - "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:39" - }, - { - "label": "_totalSupply", - "offset": 0, - "slot": "53", - "type": "t_uint256", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:41" - }, - { - "label": "_name", - "offset": 0, - "slot": "54", - "type": "t_string_storage", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:43" - }, - { - "label": "_symbol", - "offset": 0, - "slot": "55", - "type": "t_string_storage", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:44" - }, - { - "label": "__gap", - "offset": 0, - "slot": "56", - "type": "t_array(t_uint256)45_storage", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:394" - }, - { - "label": "_owner", - "offset": 0, - "slot": "101", - "type": "t_address", - "contract": "OwnableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" - }, - { - "label": "__gap", - "offset": 0, - "slot": "102", - "type": "t_array(t_uint256)49_storage", - "contract": "OwnableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:87" - }, - { - "label": "feeStrategy", - "offset": 0, - "slot": "151", - "type": "t_contract(IFeeStrategy)6338", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:200" - }, - { - "label": "pricingStrategy", - "offset": 0, - "slot": "152", - "type": "t_contract(IPricingStrategy)6654", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:204" - }, - { - "label": "discountStrategy", - "offset": 0, - "slot": "153", - "type": "t_contract(IDiscountStrategy)6672", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:212" - }, - { - "label": "bondIssuer", - "offset": 0, - "slot": "154", - "type": "t_contract(IBondIssuer)6306", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:217" - }, - { - "label": "_depositBond", - "offset": 0, - "slot": "155", - "type": "t_contract(IBondController)6743", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:220" - }, - { - "label": "minTrancheMaturitySec", - "offset": 0, - "slot": "156", - "type": "t_uint256", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:224" - }, - { - "label": "maxTrancheMaturitySec", - "offset": 0, - "slot": "157", - "type": "t_uint256", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:228" - }, - { - "label": "maxSupply", - "offset": 0, - "slot": "158", - "type": "t_uint256", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:231" - }, - { - "label": "maxMintAmtPerTranche", - "offset": 0, - "slot": "159", - "type": "t_uint256", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:234" - }, - { - "label": "skimPerc", - "offset": 0, - "slot": "160", - "type": "t_uint256", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:238" - }, - { - "label": "_mintedSupplyPerTranche", - "offset": 0, - "slot": "161", - "type": "t_mapping(t_contract(ITranche)6770,t_uint256)", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:241" - }, - { - "label": "_appliedDiscounts", - "offset": 0, - "slot": "162", - "type": "t_mapping(t_contract(IERC20Upgradeable)954,t_uint256)", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:247" - }, - { - "label": "collateral", - "offset": 0, - "slot": "163", - "type": "t_contract(IERC20Upgradeable)954", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:257" - }, - { - "label": "_reserveTranches", - "offset": 0, - "slot": "164", - "type": "t_struct(AddressSet)2386_storage", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:260" - }, - { - "label": "_stdTotalTrancheBalance", - "offset": 0, - "slot": "166", - "type": "t_uint256", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:263" - }, - { - "label": "_stdMatureTrancheBalance", - "offset": 0, - "slot": "167", - "type": "t_uint256", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:267" - } - ], - "types": { - "t_address": { - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_bytes32)dyn_storage": { - "label": "bytes32[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)45_storage": { - "label": "uint256[45]", - "numberOfBytes": "1440" - }, - "t_array(t_uint256)49_storage": { - "label": "uint256[49]", - "numberOfBytes": "1568" - }, - "t_array(t_uint256)50_storage": { - "label": "uint256[50]", - "numberOfBytes": "1600" - }, - "t_bool": { - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_contract(IBondController)6743": { - "label": "contract IBondController", - "numberOfBytes": "20" - }, - "t_contract(IBondIssuer)6306": { - "label": "contract IBondIssuer", - "numberOfBytes": "20" - }, - "t_contract(IERC20Upgradeable)954": { - "label": "contract IERC20Upgradeable", - "numberOfBytes": "20" - }, - "t_contract(IFeeStrategy)6338": { - "label": "contract IFeeStrategy", - "numberOfBytes": "20" - }, - "t_contract(IPricingStrategy)6654": { - "label": "contract IPricingStrategy", - "numberOfBytes": "20" - }, - "t_contract(ITranche)6770": { - "label": "contract ITranche", - "numberOfBytes": "20" - }, - "t_contract(IDiscountStrategy)6672": { - "label": "contract IDiscountStrategy", - "numberOfBytes": "20" - }, - "t_mapping(t_address,t_mapping(t_address,t_uint256))": { - "label": "mapping(address => mapping(address => uint256))", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_uint256)": { - "label": "mapping(address => uint256)", - "numberOfBytes": "32" - }, - "t_mapping(t_bytes32,t_uint256)": { - "label": "mapping(bytes32 => uint256)", - "numberOfBytes": "32" - }, - "t_mapping(t_contract(IERC20Upgradeable)954,t_uint256)": { - "label": "mapping(contract IERC20Upgradeable => uint256)", - "numberOfBytes": "32" - }, - "t_mapping(t_contract(ITranche)6770,t_uint256)": { - "label": "mapping(contract ITranche => uint256)", - "numberOfBytes": "32" - }, - "t_string_storage": { - "label": "string", - "numberOfBytes": "32" - }, - "t_struct(AddressSet)2386_storage": { - "label": "struct EnumerableSetUpgradeable.AddressSet", - "members": [ - { - "label": "_inner", - "type": "t_struct(Set)2085_storage", - "offset": 0, - "slot": "0" - } - ], - "numberOfBytes": "64" - }, - "t_struct(Set)2085_storage": { - "label": "struct EnumerableSetUpgradeable.Set", - "members": [ - { - "label": "_values", - "type": "t_array(t_bytes32)dyn_storage", - "offset": 0, - "slot": "0" - }, - { - "label": "_indexes", - "type": "t_mapping(t_bytes32,t_uint256)", - "offset": 0, - "slot": "1" - } - ], - "numberOfBytes": "64" - }, - "t_uint256": { - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint8": { - "label": "uint8", - "numberOfBytes": "1" - } - } - } - }, - "0eb7cc5e870bc05123f992843a10ffb34f2fa7f1365b3cca2acd6dfdd3a40a9c": { - "address": "0xceD5A1061F5507172059FE760CA2e9F050caBF02", - "txHash": "0x66758ebec9a5527033f0279eec4d7228d2b76e24c0e9810706de9323852523ad", - "layout": { - "storage": [ - { - "label": "_initialized", - "offset": 0, - "slot": "0", - "type": "t_uint8", - "contract": "Initializable", - "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", - "retypedFrom": "bool" - }, - { - "label": "_initializing", - "offset": 1, - "slot": "0", - "type": "t_bool", - "contract": "Initializable", - "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" - }, - { - "label": "__gap", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)50_storage", - "contract": "ContextUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" - }, - { - "label": "_balances", - "offset": 0, - "slot": "51", - "type": "t_mapping(t_address,t_uint256)", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:37" - }, - { - "label": "_allowances", - "offset": 0, - "slot": "52", - "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:39" - }, - { - "label": "_totalSupply", - "offset": 0, - "slot": "53", - "type": "t_uint256", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:41" - }, - { - "label": "_name", - "offset": 0, - "slot": "54", - "type": "t_string_storage", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:43" - }, - { - "label": "_symbol", - "offset": 0, - "slot": "55", - "type": "t_string_storage", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:44" - }, - { - "label": "__gap", - "offset": 0, - "slot": "56", - "type": "t_array(t_uint256)45_storage", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:394" - }, - { - "label": "__gap", - "offset": 0, - "slot": "101", - "type": "t_array(t_uint256)50_storage", - "contract": "ERC20BurnableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol:51" - }, - { - "label": "_owner", - "offset": 0, - "slot": "151", - "type": "t_address", - "contract": "OwnableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" - }, - { - "label": "__gap", - "offset": 0, - "slot": "152", - "type": "t_array(t_uint256)49_storage", - "contract": "OwnableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" - }, - { - "label": "_paused", - "offset": 0, - "slot": "201", - "type": "t_bool", - "contract": "PausableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:29" - }, - { - "label": "__gap", - "offset": 0, - "slot": "202", - "type": "t_array(t_uint256)49_storage", - "contract": "PausableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:116" - }, - { - "label": "_status", - "offset": 0, - "slot": "251", - "type": "t_uint256", - "contract": "ReentrancyGuardUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:38" - }, - { - "label": "__gap", - "offset": 0, - "slot": "252", - "type": "t_array(t_uint256)49_storage", - "contract": "ReentrancyGuardUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:74" - }, - { - "label": "_decimals", - "offset": 0, - "slot": "301", - "type": "t_uint8", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:192" - }, - { - "label": "keeper", - "offset": 1, - "slot": "301", - "type": "t_address", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:198" - }, - { - "label": "feeStrategy", - "offset": 0, - "slot": "302", - "type": "t_contract(IFeeStrategy)8980", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:201" - }, - { - "label": "pricingStrategy", - "offset": 0, - "slot": "303", - "type": "t_contract(IPricingStrategy)9335", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:205" - }, - { - "label": "discountStrategy", - "offset": 0, - "slot": "304", - "type": "t_contract(IDiscountStrategy)8938", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:213" - }, - { - "label": "bondIssuer", - "offset": 0, - "slot": "305", - "type": "t_contract(IBondIssuer)8918", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:218" - }, - { - "label": "_depositBond", - "offset": 0, - "slot": "306", - "type": "t_contract(IBondController)9414", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:221" - }, - { - "label": "minTrancheMaturitySec", - "offset": 0, - "slot": "307", - "type": "t_uint256", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:225" - }, - { - "label": "maxTrancheMaturitySec", - "offset": 0, - "slot": "308", - "type": "t_uint256", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:229" - }, - { - "label": "matureValueTargetPerc", - "offset": 0, - "slot": "309", - "type": "t_uint256", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:232" - }, - { - "label": "maxSupply", - "offset": 0, - "slot": "310", - "type": "t_uint256", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:235" - }, - { - "label": "maxMintAmtPerTranche", - "offset": 0, - "slot": "311", - "type": "t_uint256", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:238" - }, - { - "label": "mintedSupplyPerTranche", - "offset": 0, - "slot": "312", - "type": "t_mapping(t_contract(ITranche)9441,t_uint256)", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:241" - }, - { - "label": "_appliedDiscounts", - "offset": 0, - "slot": "313", - "type": "t_mapping(t_contract(IERC20Upgradeable)1157,t_uint256)", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:247" - }, - { - "label": "_reserves", - "offset": 0, - "slot": "314", - "type": "t_struct(AddressSet)4620_storage", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:253" - }, - { - "label": "_matureTrancheBalance", - "offset": 0, - "slot": "316", - "type": "t_uint256", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:259" - } - ], - "types": { - "t_address": { - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_bytes32)dyn_storage": { - "label": "bytes32[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)45_storage": { - "label": "uint256[45]", - "numberOfBytes": "1440" - }, - "t_array(t_uint256)49_storage": { - "label": "uint256[49]", - "numberOfBytes": "1568" - }, - "t_array(t_uint256)50_storage": { - "label": "uint256[50]", - "numberOfBytes": "1600" - }, - "t_bool": { - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_contract(IBondController)9414": { - "label": "contract IBondController", - "numberOfBytes": "20" - }, - "t_contract(IBondIssuer)8918": { - "label": "contract IBondIssuer", - "numberOfBytes": "20" - }, - "t_contract(IDiscountStrategy)8938": { - "label": "contract IDiscountStrategy", - "numberOfBytes": "20" - }, - "t_contract(IERC20Upgradeable)1157": { - "label": "contract IERC20Upgradeable", - "numberOfBytes": "20" - }, - "t_contract(IFeeStrategy)8980": { - "label": "contract IFeeStrategy", - "numberOfBytes": "20" - }, - "t_contract(IPricingStrategy)9335": { - "label": "contract IPricingStrategy", - "numberOfBytes": "20" - }, - "t_contract(ITranche)9441": { - "label": "contract ITranche", - "numberOfBytes": "20" - }, - "t_mapping(t_address,t_mapping(t_address,t_uint256))": { - "label": "mapping(address => mapping(address => uint256))", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_uint256)": { - "label": "mapping(address => uint256)", - "numberOfBytes": "32" - }, - "t_mapping(t_bytes32,t_uint256)": { - "label": "mapping(bytes32 => uint256)", - "numberOfBytes": "32" - }, - "t_mapping(t_contract(IERC20Upgradeable)1157,t_uint256)": { - "label": "mapping(contract IERC20Upgradeable => uint256)", - "numberOfBytes": "32" - }, - "t_mapping(t_contract(ITranche)9441,t_uint256)": { - "label": "mapping(contract ITranche => uint256)", - "numberOfBytes": "32" - }, - "t_string_storage": { - "label": "string", - "numberOfBytes": "32" - }, - "t_struct(AddressSet)4620_storage": { - "label": "struct EnumerableSetUpgradeable.AddressSet", - "members": [ - { - "label": "_inner", - "type": "t_struct(Set)4319_storage", - "offset": 0, - "slot": "0" - } - ], - "numberOfBytes": "64" - }, - "t_struct(Set)4319_storage": { - "label": "struct EnumerableSetUpgradeable.Set", - "members": [ - { - "label": "_values", - "type": "t_array(t_bytes32)dyn_storage", - "offset": 0, - "slot": "0" - }, - { - "label": "_indexes", - "type": "t_mapping(t_bytes32,t_uint256)", - "offset": 0, - "slot": "1" - } - ], - "numberOfBytes": "64" - }, - "t_uint256": { - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint8": { - "label": "uint8", - "numberOfBytes": "1" - } - } - } - }, - "97db98753b6b6dafb311d3a33acee374762650670647a38ecf9f5911c8b3750f": { - "address": "0x38f600e08540178719BF656e6B43FC15A529c393", - "txHash": "0x9a3d2aa21eddaccb71ccc5d10e73e4e4f86c7420a7626600b9a9143062bcef10", - "layout": { - "storage": [ - { - "label": "_initialized", - "offset": 0, - "slot": "0", - "type": "t_uint8", - "contract": "Initializable", - "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", - "retypedFrom": "bool" - }, - { - "label": "_initializing", - "offset": 1, - "slot": "0", - "type": "t_bool", - "contract": "Initializable", - "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" - }, - { - "label": "__gap", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)50_storage", - "contract": "ContextUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" - }, - { - "label": "_balances", - "offset": 0, - "slot": "51", - "type": "t_mapping(t_address,t_uint256)", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:37" - }, - { - "label": "_allowances", - "offset": 0, - "slot": "52", - "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:39" - }, - { - "label": "_totalSupply", - "offset": 0, - "slot": "53", - "type": "t_uint256", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:41" - }, - { - "label": "_name", - "offset": 0, - "slot": "54", - "type": "t_string_storage", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:43" - }, - { - "label": "_symbol", - "offset": 0, - "slot": "55", - "type": "t_string_storage", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:44" - }, - { - "label": "__gap", - "offset": 0, - "slot": "56", - "type": "t_array(t_uint256)45_storage", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:394" - }, - { - "label": "__gap", - "offset": 0, - "slot": "101", - "type": "t_array(t_uint256)50_storage", - "contract": "ERC20BurnableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol:51" - }, - { - "label": "_owner", - "offset": 0, - "slot": "151", - "type": "t_address", - "contract": "OwnableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" - }, - { - "label": "__gap", - "offset": 0, - "slot": "152", - "type": "t_array(t_uint256)49_storage", - "contract": "OwnableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" - }, - { - "label": "_paused", - "offset": 0, - "slot": "201", - "type": "t_bool", - "contract": "PausableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:29" - }, - { - "label": "__gap", - "offset": 0, - "slot": "202", - "type": "t_array(t_uint256)49_storage", - "contract": "PausableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:116" - }, - { - "label": "_status", - "offset": 0, - "slot": "251", - "type": "t_uint256", - "contract": "ReentrancyGuardUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:38" - }, - { - "label": "__gap", - "offset": 0, - "slot": "252", - "type": "t_array(t_uint256)49_storage", - "contract": "ReentrancyGuardUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:74" - }, - { - "label": "_decimals", - "offset": 0, - "slot": "301", - "type": "t_uint8", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:192" - }, - { - "label": "keeper", - "offset": 1, - "slot": "301", - "type": "t_address", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:198" - }, - { - "label": "feeStrategy", - "offset": 0, - "slot": "302", - "type": "t_contract(IFeeStrategy)8990", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:201" - }, - { - "label": "pricingStrategy", - "offset": 0, - "slot": "303", - "type": "t_contract(IPricingStrategy)9345", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:205" - }, - { - "label": "discountStrategy", - "offset": 0, - "slot": "304", - "type": "t_contract(IDiscountStrategy)8948", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:213" - }, - { - "label": "bondIssuer", - "offset": 0, - "slot": "305", - "type": "t_contract(IBondIssuer)8928", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:218" - }, - { - "label": "_depositBond", - "offset": 0, - "slot": "306", - "type": "t_contract(IBondController)9424", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:221" - }, - { - "label": "minTrancheMaturitySec", - "offset": 0, - "slot": "307", - "type": "t_uint256", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:225" - }, - { - "label": "maxTrancheMaturitySec", - "offset": 0, - "slot": "308", - "type": "t_uint256", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:229" - }, - { - "label": "matureValueTargetPerc", - "offset": 0, - "slot": "309", - "type": "t_uint256", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:232" - }, - { - "label": "maxSupply", - "offset": 0, - "slot": "310", - "type": "t_uint256", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:235" - }, - { - "label": "maxMintAmtPerTranche", - "offset": 0, - "slot": "311", - "type": "t_uint256", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:238" - }, - { - "label": "mintedSupplyPerTranche", - "offset": 0, - "slot": "312", - "type": "t_mapping(t_contract(ITranche)9451,t_uint256)", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:241" - }, - { - "label": "_appliedDiscounts", - "offset": 0, - "slot": "313", - "type": "t_mapping(t_contract(IERC20Upgradeable)1157,t_uint256)", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:247" - }, - { - "label": "_reserves", - "offset": 0, - "slot": "314", - "type": "t_struct(AddressSet)4620_storage", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:253" - }, - { - "label": "_matureTrancheBalance", - "offset": 0, - "slot": "316", - "type": "t_uint256", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:259" - } - ], - "types": { - "t_address": { - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_bytes32)dyn_storage": { - "label": "bytes32[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)45_storage": { - "label": "uint256[45]", - "numberOfBytes": "1440" - }, - "t_array(t_uint256)49_storage": { - "label": "uint256[49]", - "numberOfBytes": "1568" - }, - "t_array(t_uint256)50_storage": { - "label": "uint256[50]", - "numberOfBytes": "1600" - }, - "t_bool": { - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_contract(IBondController)9424": { - "label": "contract IBondController", - "numberOfBytes": "20" - }, - "t_contract(IBondIssuer)8928": { - "label": "contract IBondIssuer", - "numberOfBytes": "20" - }, - "t_contract(IDiscountStrategy)8948": { - "label": "contract IDiscountStrategy", - "numberOfBytes": "20" - }, - "t_contract(IERC20Upgradeable)1157": { - "label": "contract IERC20Upgradeable", - "numberOfBytes": "20" - }, - "t_contract(IFeeStrategy)8990": { - "label": "contract IFeeStrategy", - "numberOfBytes": "20" - }, - "t_contract(IPricingStrategy)9345": { - "label": "contract IPricingStrategy", - "numberOfBytes": "20" - }, - "t_contract(ITranche)9451": { - "label": "contract ITranche", - "numberOfBytes": "20" - }, - "t_mapping(t_address,t_mapping(t_address,t_uint256))": { - "label": "mapping(address => mapping(address => uint256))", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_uint256)": { - "label": "mapping(address => uint256)", - "numberOfBytes": "32" - }, - "t_mapping(t_bytes32,t_uint256)": { - "label": "mapping(bytes32 => uint256)", - "numberOfBytes": "32" - }, - "t_mapping(t_contract(IERC20Upgradeable)1157,t_uint256)": { - "label": "mapping(contract IERC20Upgradeable => uint256)", - "numberOfBytes": "32" - }, - "t_mapping(t_contract(ITranche)9451,t_uint256)": { - "label": "mapping(contract ITranche => uint256)", - "numberOfBytes": "32" - }, - "t_string_storage": { - "label": "string", - "numberOfBytes": "32" - }, - "t_struct(AddressSet)4620_storage": { - "label": "struct EnumerableSetUpgradeable.AddressSet", - "members": [ - { - "label": "_inner", - "type": "t_struct(Set)4319_storage", - "offset": 0, - "slot": "0" - } - ], - "numberOfBytes": "64" - }, - "t_struct(Set)4319_storage": { - "label": "struct EnumerableSetUpgradeable.Set", - "members": [ - { - "label": "_values", - "type": "t_array(t_bytes32)dyn_storage", - "offset": 0, - "slot": "0" - }, - { - "label": "_indexes", - "type": "t_mapping(t_bytes32,t_uint256)", - "offset": 0, - "slot": "1" - } - ], - "numberOfBytes": "64" - }, - "t_uint256": { - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint8": { - "label": "uint8", - "numberOfBytes": "1" - } - } - } - }, - "3935b74d2f245056fda5a20fbcfa0bfc7990f5aa54c7e5bdc3f91a93860d3ed7": { - "address": "0x1Be92B4753C1A2B3D97644390AE1C6d93E95f025", - "txHash": "0x169f8e8fdb1f48b16851ca19cccd792b84c1bcdcc074712bed6f547918135769", - "layout": { - "storage": [ - { - "label": "_initialized", - "offset": 0, - "slot": "0", - "type": "t_uint8", - "contract": "Initializable", - "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", - "retypedFrom": "bool" - }, - { - "label": "_initializing", - "offset": 1, - "slot": "0", - "type": "t_bool", - "contract": "Initializable", - "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" - }, - { - "label": "__gap", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)50_storage", - "contract": "ContextUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" - }, - { - "label": "_balances", - "offset": 0, - "slot": "51", - "type": "t_mapping(t_address,t_uint256)", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:37" - }, - { - "label": "_allowances", - "offset": 0, - "slot": "52", - "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:39" - }, - { - "label": "_totalSupply", - "offset": 0, - "slot": "53", - "type": "t_uint256", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:41" - }, - { - "label": "_name", - "offset": 0, - "slot": "54", - "type": "t_string_storage", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:43" - }, - { - "label": "_symbol", - "offset": 0, - "slot": "55", - "type": "t_string_storage", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:44" - }, - { - "label": "__gap", - "offset": 0, - "slot": "56", - "type": "t_array(t_uint256)45_storage", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:394" - }, - { - "label": "__gap", - "offset": 0, - "slot": "101", - "type": "t_array(t_uint256)50_storage", - "contract": "ERC20BurnableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol:51" - }, - { - "label": "_owner", - "offset": 0, - "slot": "151", - "type": "t_address", - "contract": "OwnableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" - }, - { - "label": "__gap", - "offset": 0, - "slot": "152", - "type": "t_array(t_uint256)49_storage", - "contract": "OwnableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" - }, - { - "label": "_paused", - "offset": 0, - "slot": "201", - "type": "t_bool", - "contract": "PausableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:29" - }, - { - "label": "__gap", - "offset": 0, - "slot": "202", - "type": "t_array(t_uint256)49_storage", - "contract": "PausableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:116" - }, - { - "label": "_status", - "offset": 0, - "slot": "251", - "type": "t_uint256", - "contract": "ReentrancyGuardUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:38" - }, - { - "label": "__gap", - "offset": 0, - "slot": "252", - "type": "t_array(t_uint256)49_storage", - "contract": "ReentrancyGuardUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:74" - }, - { - "label": "_decimals", - "offset": 0, - "slot": "301", - "type": "t_uint8", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:241" - }, - { - "label": "keeper", - "offset": 1, - "slot": "301", - "type": "t_address", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:247" - }, - { - "label": "feeStrategy", - "offset": 0, - "slot": "302", - "type": "t_contract(IFeeStrategy)9188", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:250" - }, - { - "label": "pricingStrategy", - "offset": 0, - "slot": "303", - "type": "t_contract(IPricingStrategy)9502", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:254" - }, - { - "label": "discountStrategy", - "offset": 0, - "slot": "304", - "type": "t_contract(IDiscountStrategy)9146", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:262" - }, - { - "label": "bondIssuer", - "offset": 0, - "slot": "305", - "type": "t_contract(IBondIssuer)9126", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:267" - }, - { - "label": "_depositBond", - "offset": 0, - "slot": "306", - "type": "t_contract(IBondController)9581", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:270" - }, - { - "label": "minTrancheMaturitySec", - "offset": 0, - "slot": "307", - "type": "t_uint256", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:274" - }, - { - "label": "maxTrancheMaturitySec", - "offset": 0, - "slot": "308", - "type": "t_uint256", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:278" - }, - { - "label": "matureValueTargetPerc", - "offset": 0, - "slot": "309", - "type": "t_uint256", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:281" - }, - { - "label": "maxSupply", - "offset": 0, - "slot": "310", - "type": "t_uint256", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:284" - }, - { - "label": "maxMintAmtPerTranche", - "offset": 0, - "slot": "311", - "type": "t_uint256", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:287" - }, - { - "label": "mintedSupplyPerTranche", - "offset": 0, - "slot": "312", - "type": "t_mapping(t_contract(ITranche)9608,t_uint256)", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:290" - }, - { - "label": "_appliedDiscounts", - "offset": 0, - "slot": "313", - "type": "t_mapping(t_contract(IERC20Upgradeable)1157,t_uint256)", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:296" - }, - { - "label": "_reserves", - "offset": 0, - "slot": "314", - "type": "t_struct(AddressSet)4620_storage", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:302" - }, - { - "label": "_matureTrancheBalance", - "offset": 0, - "slot": "316", - "type": "t_uint256", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:308" - }, - { - "label": "_rollers", - "offset": 0, - "slot": "317", - "type": "t_struct(AddressSet)4620_storage", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:317" - } - ], - "types": { - "t_address": { - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_bytes32)dyn_storage": { - "label": "bytes32[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)45_storage": { - "label": "uint256[45]", - "numberOfBytes": "1440" - }, - "t_array(t_uint256)49_storage": { - "label": "uint256[49]", - "numberOfBytes": "1568" - }, - "t_array(t_uint256)50_storage": { - "label": "uint256[50]", - "numberOfBytes": "1600" - }, - "t_bool": { - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_contract(IBondController)9581": { - "label": "contract IBondController", - "numberOfBytes": "20" - }, - "t_contract(IBondIssuer)9126": { - "label": "contract IBondIssuer", - "numberOfBytes": "20" - }, - "t_contract(IDiscountStrategy)9146": { - "label": "contract IDiscountStrategy", - "numberOfBytes": "20" - }, - "t_contract(IERC20Upgradeable)1157": { - "label": "contract IERC20Upgradeable", - "numberOfBytes": "20" - }, - "t_contract(IFeeStrategy)9188": { - "label": "contract IFeeStrategy", - "numberOfBytes": "20" - }, - "t_contract(IPricingStrategy)9502": { - "label": "contract IPricingStrategy", - "numberOfBytes": "20" - }, - "t_contract(ITranche)9608": { - "label": "contract ITranche", - "numberOfBytes": "20" - }, - "t_mapping(t_address,t_mapping(t_address,t_uint256))": { - "label": "mapping(address => mapping(address => uint256))", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_uint256)": { - "label": "mapping(address => uint256)", - "numberOfBytes": "32" - }, - "t_mapping(t_bytes32,t_uint256)": { - "label": "mapping(bytes32 => uint256)", - "numberOfBytes": "32" - }, - "t_mapping(t_contract(IERC20Upgradeable)1157,t_uint256)": { - "label": "mapping(contract IERC20Upgradeable => uint256)", - "numberOfBytes": "32" - }, - "t_mapping(t_contract(ITranche)9608,t_uint256)": { - "label": "mapping(contract ITranche => uint256)", - "numberOfBytes": "32" - }, - "t_string_storage": { - "label": "string", - "numberOfBytes": "32" - }, - "t_struct(AddressSet)4620_storage": { - "label": "struct EnumerableSetUpgradeable.AddressSet", - "members": [ - { - "label": "_inner", - "type": "t_struct(Set)4319_storage", - "offset": 0, - "slot": "0" - } - ], - "numberOfBytes": "64" - }, - "t_struct(Set)4319_storage": { - "label": "struct EnumerableSetUpgradeable.Set", - "members": [ - { - "label": "_values", - "type": "t_array(t_bytes32)dyn_storage", - "offset": 0, - "slot": "0" - }, - { - "label": "_indexes", - "type": "t_mapping(t_bytes32,t_uint256)", - "offset": 0, - "slot": "1" - } - ], - "numberOfBytes": "64" - }, - "t_uint256": { - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint8": { - "label": "uint8", - "numberOfBytes": "1" - } - } - } - }, - "d22de1c236eb88a7f29757885cb30e820a698673edfc65e1d5350f2a7c377f8a": { - "address": "0x6A62b32eD7900D53abcA6C9147ef206022241EB1", - "txHash": "0xed71d0c4e50c410c5f8ba601a8f386e90460a598c5f9c4adfa68bc4375c77274", - "layout": { - "storage": [ - { - "label": "_initialized", - "offset": 0, - "slot": "0", - "type": "t_uint8", - "contract": "Initializable", - "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", - "retypedFrom": "bool" - }, - { - "label": "_initializing", - "offset": 1, - "slot": "0", - "type": "t_bool", - "contract": "Initializable", - "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" - }, - { - "label": "__gap", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)50_storage", - "contract": "ContextUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" - }, - { - "label": "_balances", - "offset": 0, - "slot": "51", - "type": "t_mapping(t_address,t_uint256)", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:37" - }, - { - "label": "_allowances", - "offset": 0, - "slot": "52", - "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:39" - }, - { - "label": "_totalSupply", - "offset": 0, - "slot": "53", - "type": "t_uint256", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:41" - }, - { - "label": "_name", - "offset": 0, - "slot": "54", - "type": "t_string_storage", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:43" - }, - { - "label": "_symbol", - "offset": 0, - "slot": "55", - "type": "t_string_storage", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:44" - }, - { - "label": "__gap", - "offset": 0, - "slot": "56", - "type": "t_array(t_uint256)45_storage", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:394" - }, - { - "label": "__gap", - "offset": 0, - "slot": "101", - "type": "t_array(t_uint256)50_storage", - "contract": "ERC20BurnableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol:51" - }, - { - "label": "_owner", - "offset": 0, - "slot": "151", - "type": "t_address", - "contract": "OwnableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" - }, - { - "label": "__gap", - "offset": 0, - "slot": "152", - "type": "t_array(t_uint256)49_storage", - "contract": "OwnableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" - }, - { - "label": "_paused", - "offset": 0, - "slot": "201", - "type": "t_bool", - "contract": "PausableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:29" - }, - { - "label": "__gap", - "offset": 0, - "slot": "202", - "type": "t_array(t_uint256)49_storage", - "contract": "PausableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:116" - }, - { - "label": "_status", - "offset": 0, - "slot": "251", - "type": "t_uint256", - "contract": "ReentrancyGuardUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:38" - }, - { - "label": "__gap", - "offset": 0, - "slot": "252", - "type": "t_array(t_uint256)49_storage", - "contract": "ReentrancyGuardUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:74" - }, - { - "label": "underlying", - "offset": 0, - "slot": "301", - "type": "t_contract(IERC20Upgradeable)1157", - "contract": "RolloverVault", - "src": "contracts/vaults/RolloverVault.sol:88" - }, - { - "label": "_deployed", - "offset": 0, - "slot": "302", - "type": "t_struct(AddressSet)4620_storage", - "contract": "RolloverVault", - "src": "contracts/vaults/RolloverVault.sol:92" - }, - { - "label": "perp", - "offset": 0, - "slot": "304", - "type": "t_contract(IPerpetualTranche)9610", - "contract": "RolloverVault", - "src": "contracts/vaults/RolloverVault.sol:98" - } - ], - "types": { - "t_address": { - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_bytes32)dyn_storage": { - "label": "bytes32[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)45_storage": { - "label": "uint256[45]", - "numberOfBytes": "1440" - }, - "t_array(t_uint256)49_storage": { - "label": "uint256[49]", - "numberOfBytes": "1568" - }, - "t_array(t_uint256)50_storage": { - "label": "uint256[50]", - "numberOfBytes": "1600" - }, - "t_bool": { - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_contract(IERC20Upgradeable)1157": { - "label": "contract IERC20Upgradeable", - "numberOfBytes": "20" - }, - "t_contract(IPerpetualTranche)9610": { - "label": "contract IPerpetualTranche", - "numberOfBytes": "20" - }, - "t_mapping(t_address,t_mapping(t_address,t_uint256))": { - "label": "mapping(address => mapping(address => uint256))", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_uint256)": { - "label": "mapping(address => uint256)", - "numberOfBytes": "32" - }, - "t_mapping(t_bytes32,t_uint256)": { - "label": "mapping(bytes32 => uint256)", - "numberOfBytes": "32" - }, - "t_string_storage": { - "label": "string", - "numberOfBytes": "32" - }, - "t_struct(AddressSet)4620_storage": { - "label": "struct EnumerableSetUpgradeable.AddressSet", - "members": [ - { - "label": "_inner", - "type": "t_struct(Set)4319_storage", - "offset": 0, - "slot": "0" - } - ], - "numberOfBytes": "64" - }, - "t_struct(Set)4319_storage": { - "label": "struct EnumerableSetUpgradeable.Set", - "members": [ - { - "label": "_values", - "type": "t_array(t_bytes32)dyn_storage", - "offset": 0, - "slot": "0" - }, - { - "label": "_indexes", - "type": "t_mapping(t_bytes32,t_uint256)", - "offset": 0, - "slot": "1" - } - ], - "numberOfBytes": "64" - }, - "t_uint256": { - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint8": { - "label": "uint8", - "numberOfBytes": "1" - } - } - } - }, - "9edc9af44c4f4a75f717bd966dc754c0374895a6501d3a771c5ed6a16dfe0ccb": { - "address": "0x989c595E6FC8AF16e403d7d3fC8f36A71714dCd7", - "txHash": "0x3474b6f4cfd71134478351d768f2c31e4a3083f9bcf2e63251ab6d3fcd2c1068", - "layout": { - "storage": [ - { - "label": "_initialized", - "offset": 0, - "slot": "0", - "type": "t_uint8", - "contract": "Initializable", - "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", - "retypedFrom": "bool" - }, - { - "label": "_initializing", - "offset": 1, - "slot": "0", - "type": "t_bool", - "contract": "Initializable", - "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" - }, - { - "label": "__gap", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)50_storage", - "contract": "ContextUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" - }, - { - "label": "_balances", - "offset": 0, - "slot": "51", - "type": "t_mapping(t_address,t_uint256)", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:37" - }, - { - "label": "_allowances", - "offset": 0, - "slot": "52", - "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:39" - }, - { - "label": "_totalSupply", - "offset": 0, - "slot": "53", - "type": "t_uint256", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:41" - }, - { - "label": "_name", - "offset": 0, - "slot": "54", - "type": "t_string_storage", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:43" - }, - { - "label": "_symbol", - "offset": 0, - "slot": "55", - "type": "t_string_storage", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:44" - }, - { - "label": "__gap", - "offset": 0, - "slot": "56", - "type": "t_array(t_uint256)45_storage", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:394" - }, - { - "label": "__gap", - "offset": 0, - "slot": "101", - "type": "t_array(t_uint256)50_storage", - "contract": "ERC20BurnableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol:51" - }, - { - "label": "_owner", - "offset": 0, - "slot": "151", - "type": "t_address", - "contract": "OwnableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" - }, - { - "label": "__gap", - "offset": 0, - "slot": "152", - "type": "t_array(t_uint256)49_storage", - "contract": "OwnableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" - }, - { - "label": "_paused", - "offset": 0, - "slot": "201", - "type": "t_bool", - "contract": "PausableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:29" - }, - { - "label": "__gap", - "offset": 0, - "slot": "202", - "type": "t_array(t_uint256)49_storage", - "contract": "PausableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:116" - }, - { - "label": "_status", - "offset": 0, - "slot": "251", - "type": "t_uint256", - "contract": "ReentrancyGuardUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:38" - }, - { - "label": "__gap", - "offset": 0, - "slot": "252", - "type": "t_array(t_uint256)49_storage", - "contract": "ReentrancyGuardUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:74" - }, - { - "label": "minDeploymentAmt", - "offset": 0, - "slot": "301", - "type": "t_uint256", - "contract": "RolloverVault", - "src": "contracts/vaults/RolloverVault.sol:83" - }, - { - "label": "underlying", - "offset": 0, - "slot": "302", - "type": "t_contract(IERC20Upgradeable)1157", - "contract": "RolloverVault", - "src": "contracts/vaults/RolloverVault.sol:95" - }, - { - "label": "_deployed", - "offset": 0, - "slot": "303", - "type": "t_struct(AddressSet)4620_storage", - "contract": "RolloverVault", - "src": "contracts/vaults/RolloverVault.sol:99" - }, - { - "label": "perp", - "offset": 0, - "slot": "305", - "type": "t_contract(IPerpetualTranche)9174", - "contract": "RolloverVault", - "src": "contracts/vaults/RolloverVault.sol:105" - } - ], - "types": { - "t_address": { - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_bytes32)dyn_storage": { - "label": "bytes32[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)45_storage": { - "label": "uint256[45]", - "numberOfBytes": "1440" - }, - "t_array(t_uint256)49_storage": { - "label": "uint256[49]", - "numberOfBytes": "1568" - }, - "t_array(t_uint256)50_storage": { - "label": "uint256[50]", - "numberOfBytes": "1600" - }, - "t_bool": { - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_contract(IERC20Upgradeable)1157": { - "label": "contract IERC20Upgradeable", - "numberOfBytes": "20" - }, - "t_contract(IPerpetualTranche)9174": { - "label": "contract IPerpetualTranche", - "numberOfBytes": "20" - }, - "t_mapping(t_address,t_mapping(t_address,t_uint256))": { - "label": "mapping(address => mapping(address => uint256))", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_uint256)": { - "label": "mapping(address => uint256)", - "numberOfBytes": "32" - }, - "t_mapping(t_bytes32,t_uint256)": { - "label": "mapping(bytes32 => uint256)", - "numberOfBytes": "32" - }, - "t_string_storage": { - "label": "string", - "numberOfBytes": "32" - }, - "t_struct(AddressSet)4620_storage": { - "label": "struct EnumerableSetUpgradeable.AddressSet", - "members": [ - { - "label": "_inner", - "type": "t_struct(Set)4319_storage", - "offset": 0, - "slot": "0" - } - ], - "numberOfBytes": "64" - }, - "t_struct(Set)4319_storage": { - "label": "struct EnumerableSetUpgradeable.Set", - "members": [ - { - "label": "_values", - "type": "t_array(t_bytes32)dyn_storage", - "offset": 0, - "slot": "0" - }, - { - "label": "_indexes", - "type": "t_mapping(t_bytes32,t_uint256)", - "offset": 0, - "slot": "1" - } - ], - "numberOfBytes": "64" - }, - "t_uint256": { - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint8": { - "label": "uint8", - "numberOfBytes": "1" - } - } - } - }, - "d1cd30a416ca26066c11c9f363f7ca43c0a6fce789d74cfa43b3d58a3b92ce39": { - "address": "0x5D352731b5A82A089Fe49BCd143d705c3A3c8889", - "txHash": "0x44d72a59b89802d03f627fdbf860862013d83b3d0966be661aef101bfb2afbeb", - "layout": { - "storage": [ - { - "label": "_initialized", - "offset": 0, - "slot": "0", - "type": "t_uint8", - "contract": "Initializable", - "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", - "retypedFrom": "bool" - }, - { - "label": "_initializing", - "offset": 1, - "slot": "0", - "type": "t_bool", - "contract": "Initializable", - "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" - }, - { - "label": "__gap", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)50_storage", - "contract": "ContextUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" - }, - { - "label": "_balances", - "offset": 0, - "slot": "51", - "type": "t_mapping(t_address,t_uint256)", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:37" - }, - { - "label": "_allowances", - "offset": 0, - "slot": "52", - "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:39" - }, - { - "label": "_totalSupply", - "offset": 0, - "slot": "53", - "type": "t_uint256", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:41" - }, - { - "label": "_name", - "offset": 0, - "slot": "54", - "type": "t_string_storage", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:43" - }, - { - "label": "_symbol", - "offset": 0, - "slot": "55", - "type": "t_string_storage", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:44" - }, - { - "label": "__gap", - "offset": 0, - "slot": "56", - "type": "t_array(t_uint256)45_storage", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:394" - }, - { - "label": "__gap", - "offset": 0, - "slot": "101", - "type": "t_array(t_uint256)50_storage", - "contract": "ERC20BurnableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol:51" - }, - { - "label": "_owner", - "offset": 0, - "slot": "151", - "type": "t_address", - "contract": "OwnableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" - }, - { - "label": "__gap", - "offset": 0, - "slot": "152", - "type": "t_array(t_uint256)49_storage", - "contract": "OwnableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" - }, - { - "label": "_paused", - "offset": 0, - "slot": "201", - "type": "t_bool", - "contract": "PausableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:29" - }, - { - "label": "__gap", - "offset": 0, - "slot": "202", - "type": "t_array(t_uint256)49_storage", - "contract": "PausableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:116" - }, - { - "label": "_status", - "offset": 0, - "slot": "251", - "type": "t_uint256", - "contract": "ReentrancyGuardUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:38" - }, - { - "label": "__gap", - "offset": 0, - "slot": "252", - "type": "t_array(t_uint256)49_storage", - "contract": "ReentrancyGuardUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:74" - }, - { - "label": "underlying", - "offset": 0, - "slot": "301", - "type": "t_contract(IERC20Upgradeable)1157", - "contract": "RolloverVault", - "src": "contracts/vaults/RolloverVault.sol:87" - }, - { - "label": "_deployed", - "offset": 0, - "slot": "302", - "type": "t_struct(AddressSet)4620_storage", - "contract": "RolloverVault", - "src": "contracts/vaults/RolloverVault.sol:91" - }, - { - "label": "minDeploymentAmt", - "offset": 0, - "slot": "304", - "type": "t_uint256", - "contract": "RolloverVault", - "src": "contracts/vaults/RolloverVault.sol:99" - }, - { - "label": "perp", - "offset": 0, - "slot": "305", - "type": "t_contract(IPerpetualTranche)9651", - "contract": "RolloverVault", - "src": "contracts/vaults/RolloverVault.sol:102" - } - ], - "types": { - "t_address": { - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_bytes32)dyn_storage": { - "label": "bytes32[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)45_storage": { - "label": "uint256[45]", - "numberOfBytes": "1440" - }, - "t_array(t_uint256)49_storage": { - "label": "uint256[49]", - "numberOfBytes": "1568" - }, - "t_array(t_uint256)50_storage": { - "label": "uint256[50]", - "numberOfBytes": "1600" - }, - "t_bool": { - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_contract(IERC20Upgradeable)1157": { - "label": "contract IERC20Upgradeable", - "numberOfBytes": "20" - }, - "t_contract(IPerpetualTranche)9651": { - "label": "contract IPerpetualTranche", - "numberOfBytes": "20" - }, - "t_mapping(t_address,t_mapping(t_address,t_uint256))": { - "label": "mapping(address => mapping(address => uint256))", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_uint256)": { - "label": "mapping(address => uint256)", - "numberOfBytes": "32" - }, - "t_mapping(t_bytes32,t_uint256)": { - "label": "mapping(bytes32 => uint256)", - "numberOfBytes": "32" - }, - "t_string_storage": { - "label": "string", - "numberOfBytes": "32" - }, - "t_struct(AddressSet)4620_storage": { - "label": "struct EnumerableSetUpgradeable.AddressSet", - "members": [ - { - "label": "_inner", - "type": "t_struct(Set)4319_storage", - "offset": 0, - "slot": "0" - } - ], - "numberOfBytes": "64" - }, - "t_struct(Set)4319_storage": { - "label": "struct EnumerableSetUpgradeable.Set", - "members": [ - { - "label": "_values", - "type": "t_array(t_bytes32)dyn_storage", - "offset": 0, - "slot": "0" - }, - { - "label": "_indexes", - "type": "t_mapping(t_bytes32,t_uint256)", - "offset": 0, - "slot": "1" - } - ], - "numberOfBytes": "64" - }, - "t_uint256": { - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint8": { - "label": "uint8", - "numberOfBytes": "1" - } - } - } - }, - "ac12aceddf8379e717d1486a2e7721e38459244dab050f70225d047f2a3b136c": { - "address": "0x5Ec6f02D0b657E4a56d6020Bc21F19f2Ca13EcA9", - "txHash": "0x998860fce2b51560368735dbbb258a847be95f218e3ce321c46725bcf04efd89", - "layout": { - "storage": [ - { - "label": "_initialized", - "offset": 0, - "slot": "0", - "type": "t_uint8", - "contract": "Initializable", - "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", - "retypedFrom": "bool" - }, - { - "label": "_initializing", - "offset": 1, - "slot": "0", - "type": "t_bool", - "contract": "Initializable", - "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" - }, - { - "label": "__gap", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)50_storage", - "contract": "ContextUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" - }, - { - "label": "_balances", - "offset": 0, - "slot": "51", - "type": "t_mapping(t_address,t_uint256)", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:37" - }, - { - "label": "_allowances", - "offset": 0, - "slot": "52", - "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:39" - }, - { - "label": "_totalSupply", - "offset": 0, - "slot": "53", - "type": "t_uint256", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:41" - }, - { - "label": "_name", - "offset": 0, - "slot": "54", - "type": "t_string_storage", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:43" - }, - { - "label": "_symbol", - "offset": 0, - "slot": "55", - "type": "t_string_storage", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:44" - }, - { - "label": "__gap", - "offset": 0, - "slot": "56", - "type": "t_array(t_uint256)45_storage", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:394" - }, - { - "label": "__gap", - "offset": 0, - "slot": "101", - "type": "t_array(t_uint256)50_storage", - "contract": "ERC20BurnableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol:51" - }, - { - "label": "_owner", - "offset": 0, - "slot": "151", - "type": "t_address", - "contract": "OwnableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" - }, - { - "label": "__gap", - "offset": 0, - "slot": "152", - "type": "t_array(t_uint256)49_storage", - "contract": "OwnableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" - }, - { - "label": "_paused", - "offset": 0, - "slot": "201", - "type": "t_bool", - "contract": "PausableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:29" - }, - { - "label": "__gap", - "offset": 0, - "slot": "202", - "type": "t_array(t_uint256)49_storage", - "contract": "PausableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:116" - }, - { - "label": "_status", - "offset": 0, - "slot": "251", - "type": "t_uint256", - "contract": "ReentrancyGuardUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:38" - }, - { - "label": "__gap", - "offset": 0, - "slot": "252", - "type": "t_array(t_uint256)49_storage", - "contract": "ReentrancyGuardUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:74" - }, - { - "label": "_decimals", - "offset": 0, - "slot": "301", - "type": "t_uint8", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:239" - }, - { - "label": "keeper", - "offset": 1, - "slot": "301", - "type": "t_address", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:245" - }, - { - "label": "feeStrategy", - "offset": 0, - "slot": "302", - "type": "t_contract(IFeeStrategy)9363", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:248" - }, - { - "label": "pricingStrategy", - "offset": 0, - "slot": "303", - "type": "t_contract(IPricingStrategy)9686", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:252" - }, - { - "label": "discountStrategy", - "offset": 0, - "slot": "304", - "type": "t_contract(IDiscountStrategy)9321", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:260" - }, - { - "label": "bondIssuer", - "offset": 0, - "slot": "305", - "type": "t_contract(IBondIssuer)9301", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:265" - }, - { - "label": "_depositBond", - "offset": 0, - "slot": "306", - "type": "t_contract(IBondController)9903", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:268" - }, - { - "label": "minTrancheMaturitySec", - "offset": 0, - "slot": "307", - "type": "t_uint256", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:272" - }, - { - "label": "maxTrancheMaturitySec", - "offset": 0, - "slot": "308", - "type": "t_uint256", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:276" - }, - { - "label": "matureValueTargetPerc", - "offset": 0, - "slot": "309", - "type": "t_uint256", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:279" - }, - { - "label": "maxSupply", - "offset": 0, - "slot": "310", - "type": "t_uint256", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:282" - }, - { - "label": "maxMintAmtPerTranche", - "offset": 0, - "slot": "311", - "type": "t_uint256", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:285" - }, - { - "label": "mintedSupplyPerTranche", - "offset": 0, - "slot": "312", - "type": "t_mapping(t_contract(ITranche)9930,t_uint256)", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:288" - }, - { - "label": "_appliedDiscounts", - "offset": 0, - "slot": "313", - "type": "t_mapping(t_contract(IERC20Upgradeable)1157,t_uint256)", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:294" - }, - { - "label": "_reserves", - "offset": 0, - "slot": "314", - "type": "t_struct(AddressSet)4620_storage", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:300" - }, - { - "label": "_matureTrancheBalance", - "offset": 0, - "slot": "316", - "type": "t_uint256", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:306" - }, - { - "label": "_rollers", - "offset": 0, - "slot": "317", - "type": "t_struct(AddressSet)4620_storage", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:315" - } - ], - "types": { - "t_address": { - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_bytes32)dyn_storage": { - "label": "bytes32[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)45_storage": { - "label": "uint256[45]", - "numberOfBytes": "1440" - }, - "t_array(t_uint256)49_storage": { - "label": "uint256[49]", - "numberOfBytes": "1568" - }, - "t_array(t_uint256)50_storage": { - "label": "uint256[50]", - "numberOfBytes": "1600" - }, - "t_bool": { - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_contract(IBondController)9903": { - "label": "contract IBondController", - "numberOfBytes": "20" - }, - "t_contract(IBondIssuer)9301": { - "label": "contract IBondIssuer", - "numberOfBytes": "20" - }, - "t_contract(IDiscountStrategy)9321": { - "label": "contract IDiscountStrategy", - "numberOfBytes": "20" - }, - "t_contract(IERC20Upgradeable)1157": { - "label": "contract IERC20Upgradeable", - "numberOfBytes": "20" - }, - "t_contract(IFeeStrategy)9363": { - "label": "contract IFeeStrategy", - "numberOfBytes": "20" - }, - "t_contract(IPricingStrategy)9686": { - "label": "contract IPricingStrategy", - "numberOfBytes": "20" - }, - "t_contract(ITranche)9930": { - "label": "contract ITranche", - "numberOfBytes": "20" - }, - "t_mapping(t_address,t_mapping(t_address,t_uint256))": { - "label": "mapping(address => mapping(address => uint256))", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_uint256)": { - "label": "mapping(address => uint256)", - "numberOfBytes": "32" - }, - "t_mapping(t_bytes32,t_uint256)": { - "label": "mapping(bytes32 => uint256)", - "numberOfBytes": "32" - }, - "t_mapping(t_contract(IERC20Upgradeable)1157,t_uint256)": { - "label": "mapping(contract IERC20Upgradeable => uint256)", - "numberOfBytes": "32" - }, - "t_mapping(t_contract(ITranche)9930,t_uint256)": { - "label": "mapping(contract ITranche => uint256)", - "numberOfBytes": "32" - }, - "t_string_storage": { - "label": "string", - "numberOfBytes": "32" - }, - "t_struct(AddressSet)4620_storage": { - "label": "struct EnumerableSetUpgradeable.AddressSet", - "members": [ - { - "label": "_inner", - "type": "t_struct(Set)4319_storage", - "offset": 0, - "slot": "0" - } - ], - "numberOfBytes": "64" - }, - "t_struct(Set)4319_storage": { - "label": "struct EnumerableSetUpgradeable.Set", - "members": [ - { - "label": "_values", - "type": "t_array(t_bytes32)dyn_storage", - "offset": 0, - "slot": "0" - }, - { - "label": "_indexes", - "type": "t_mapping(t_bytes32,t_uint256)", - "offset": 0, - "slot": "1" - } - ], - "numberOfBytes": "64" - }, - "t_uint256": { - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint8": { - "label": "uint8", - "numberOfBytes": "1" - } - } - } - }, - "434e3f9e5ca89604923f560238c1549d17341d5000a67900fb3b705d5348ddd7": { - "address": "0x795F55f37bd9ab8fa361D0FC0eAd6ff036aebA44", - "txHash": "0xc7aefe44394c954dca2ff7315e5c11c3e6d48c10da9a76b724964c2f650eb19f", - "layout": { - "storage": [ - { - "label": "_initialized", - "offset": 0, - "slot": "0", - "type": "t_uint8", - "contract": "Initializable", - "src": "contracts/oz/Initializable.sol:62", - "retypedFrom": "bool" - }, - { - "label": "_initializing", - "offset": 1, - "slot": "0", - "type": "t_bool", - "contract": "Initializable", - "src": "contracts/oz/Initializable.sol:67" - }, - { - "label": "__gap", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)50_storage", - "contract": "ContextUpgradeable", - "src": "contracts/oz/ContextUpgradeable.sol:35" - }, - { - "label": "_balances", - "offset": 0, - "slot": "51", - "type": "t_mapping(t_address,t_uint256)", - "contract": "ERC20Upgradeable", - "src": "contracts/oz/ERC20Upgradeable.sol:37" - }, - { - "label": "_allowances", - "offset": 0, - "slot": "52", - "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))", - "contract": "ERC20Upgradeable", - "src": "contracts/oz/ERC20Upgradeable.sol:39" - }, - { - "label": "_totalSupply", - "offset": 0, - "slot": "53", - "type": "t_uint256", - "contract": "ERC20Upgradeable", - "src": "contracts/oz/ERC20Upgradeable.sol:41" - }, - { - "label": "_name", - "offset": 0, - "slot": "54", - "type": "t_string_storage", - "contract": "ERC20Upgradeable", - "src": "contracts/oz/ERC20Upgradeable.sol:43" - }, - { - "label": "_symbol", - "offset": 0, - "slot": "55", - "type": "t_string_storage", - "contract": "ERC20Upgradeable", - "src": "contracts/oz/ERC20Upgradeable.sol:44" - }, - { - "label": "__gap", - "offset": 0, - "slot": "56", - "type": "t_array(t_uint256)45_storage", - "contract": "ERC20Upgradeable", - "src": "contracts/oz/ERC20Upgradeable.sol:394" - }, - { - "label": "__gap", - "offset": 0, - "slot": "101", - "type": "t_array(t_uint256)50_storage", - "contract": "ERC20BurnableUpgradeable", - "src": "contracts/oz/ERC20BurnableUpgradeable.sol:50" - }, - { - "label": "_owner", - "offset": 0, - "slot": "151", - "type": "t_address", - "contract": "OwnableUpgradeable", - "src": "contracts/oz/OwnableUpgradeable.sol:22" - }, - { - "label": "__gap", - "offset": 0, - "slot": "152", - "type": "t_array(t_uint256)49_storage", - "contract": "OwnableUpgradeable", - "src": "contracts/oz/OwnableUpgradeable.sol:94" - }, - { - "label": "_paused", - "offset": 0, - "slot": "201", - "type": "t_bool", - "contract": "PausableUpgradeable", - "src": "contracts/oz/PausableUpgradeable.sol:29" - }, - { - "label": "__gap", - "offset": 0, - "slot": "202", - "type": "t_array(t_uint256)49_storage", - "contract": "PausableUpgradeable", - "src": "contracts/oz/PausableUpgradeable.sol:116" - }, - { - "label": "_status", - "offset": 0, - "slot": "251", - "type": "t_uint256", - "contract": "ReentrancyGuardUpgradeable", - "src": "contracts/oz/ReentrancyGuardUpgradeable.sol:38" - }, - { - "label": "__gap", - "offset": 0, - "slot": "252", - "type": "t_array(t_uint256)49_storage", - "contract": "ReentrancyGuardUpgradeable", - "src": "contracts/oz/ReentrancyGuardUpgradeable.sol:74" - }, - { - "label": "underlying", - "offset": 0, - "slot": "301", - "type": "t_contract(IERC20Upgradeable)6122", - "contract": "RolloverVault", - "src": "contracts/vaults/RolloverVault.sol:88" - }, - { - "label": "_deployed", - "offset": 0, - "slot": "302", - "type": "t_struct(AddressSet)5731_storage", - "contract": "RolloverVault", - "src": "contracts/vaults/RolloverVault.sol:92" - }, - { - "label": "minDeploymentAmt", - "offset": 0, - "slot": "304", - "type": "t_uint256", - "contract": "RolloverVault", - "src": "contracts/vaults/RolloverVault.sol:100" - }, - { - "label": "perp", - "offset": 0, - "slot": "305", - "type": "t_contract(IPerpetualTranche)3406", - "contract": "RolloverVault", - "src": "contracts/vaults/RolloverVault.sol:103" - } - ], - "types": { - "t_address": { - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_bytes32)dyn_storage": { - "label": "bytes32[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)45_storage": { - "label": "uint256[45]", - "numberOfBytes": "1440" - }, - "t_array(t_uint256)49_storage": { - "label": "uint256[49]", - "numberOfBytes": "1568" - }, - "t_array(t_uint256)50_storage": { - "label": "uint256[50]", - "numberOfBytes": "1600" - }, - "t_bool": { - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_contract(IERC20Upgradeable)6122": { - "label": "contract IERC20Upgradeable", - "numberOfBytes": "20" - }, - "t_contract(IPerpetualTranche)3406": { - "label": "contract IPerpetualTranche", - "numberOfBytes": "20" - }, - "t_mapping(t_address,t_mapping(t_address,t_uint256))": { - "label": "mapping(address => mapping(address => uint256))", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_uint256)": { - "label": "mapping(address => uint256)", - "numberOfBytes": "32" - }, - "t_mapping(t_bytes32,t_uint256)": { - "label": "mapping(bytes32 => uint256)", - "numberOfBytes": "32" - }, - "t_string_storage": { - "label": "string", - "numberOfBytes": "32" - }, - "t_struct(AddressSet)5731_storage": { - "label": "struct EnumerableSetUpgradeable.AddressSet", - "members": [ - { - "label": "_inner", - "type": "t_struct(Set)5430_storage", - "offset": 0, - "slot": "0" - } - ], - "numberOfBytes": "64" - }, - "t_struct(Set)5430_storage": { - "label": "struct EnumerableSetUpgradeable.Set", - "members": [ - { - "label": "_values", - "type": "t_array(t_bytes32)dyn_storage", - "offset": 0, - "slot": "0" - }, - { - "label": "_indexes", - "type": "t_mapping(t_bytes32,t_uint256)", - "offset": 0, - "slot": "1" - } - ], - "numberOfBytes": "64" - }, - "t_uint256": { - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint8": { - "label": "uint8", - "numberOfBytes": "1" - } - } - } - }, - "7ff075541064d9ccbd38aad0553b36dae82330466579df6e3e2c29faffc48c4b": { - "address": "0xa0E54ae0779DDf91F04081ACabDBEfA76e412984", - "txHash": "0x8dee445f8161e5f3d748633cdf7f2bd5aaa3e1e13088012532d4cca4e0ff2773", - "layout": { - "solcVersion": "0.8.20", - "storage": [ - { - "label": "_initialized", - "offset": 0, - "slot": "0", - "type": "t_uint8", - "contract": "Initializable", - "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", - "retypedFrom": "bool" - }, - { - "label": "_initializing", - "offset": 1, - "slot": "0", - "type": "t_bool", - "contract": "Initializable", - "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" - }, - { - "label": "__gap", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)50_storage", - "contract": "ContextUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:40" - }, - { - "label": "_owner", - "offset": 0, - "slot": "51", - "type": "t_address", - "contract": "OwnableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" - }, - { - "label": "__gap", - "offset": 0, - "slot": "52", - "type": "t_array(t_uint256)49_storage", - "contract": "OwnableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" - }, - { - "label": "targetSubscriptionRatio", - "offset": 0, - "slot": "101", - "type": "t_uint256", - "contract": "FeePolicy", - "src": "contracts/FeePolicy.sol:78" - }, - { - "label": "deviationRatioBoundLower", - "offset": 0, - "slot": "102", - "type": "t_uint256", - "contract": "FeePolicy", - "src": "contracts/FeePolicy.sol:81" - }, - { - "label": "deviationRatioBoundUpper", - "offset": 0, - "slot": "103", - "type": "t_uint256", - "contract": "FeePolicy", - "src": "contracts/FeePolicy.sol:84" - }, - { - "label": "perpMintFeePerc", - "offset": 0, - "slot": "104", - "type": "t_uint256", - "contract": "FeePolicy", - "src": "contracts/FeePolicy.sol:92" - }, - { - "label": "perpBurnFeePerc", - "offset": 0, - "slot": "105", - "type": "t_uint256", - "contract": "FeePolicy", - "src": "contracts/FeePolicy.sol:95" - }, - { - "label": "perpRolloverFee", - "offset": 0, - "slot": "106", - "type": "t_struct(RolloverFeeSigmoidParams)5751_storage", - "contract": "FeePolicy", - "src": "contracts/FeePolicy.sol:107" - }, - { - "label": "vaultMintFeePerc", - "offset": 0, - "slot": "109", - "type": "t_uint256", - "contract": "FeePolicy", - "src": "contracts/FeePolicy.sol:115" - }, - { - "label": "vaultBurnFeePerc", - "offset": 0, - "slot": "110", - "type": "t_uint256", - "contract": "FeePolicy", - "src": "contracts/FeePolicy.sol:118" - }, - { - "label": "vaultUnderlyingToPerpSwapFeePerc", - "offset": 0, - "slot": "111", - "type": "t_uint256", - "contract": "FeePolicy", - "src": "contracts/FeePolicy.sol:121" - }, - { - "label": "vaultPerpToUnderlyingSwapFeePerc", - "offset": 0, - "slot": "112", - "type": "t_uint256", - "contract": "FeePolicy", - "src": "contracts/FeePolicy.sol:124" - }, - { - "label": "vaultDeploymentFee", - "offset": 0, - "slot": "113", - "type": "t_uint256", - "contract": "FeePolicy", - "src": "contracts/FeePolicy.sol:129" - } - ], - "types": { - "t_address": { - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_uint256)49_storage": { - "label": "uint256[49]", - "numberOfBytes": "1568" - }, - "t_array(t_uint256)50_storage": { - "label": "uint256[50]", - "numberOfBytes": "1600" - }, - "t_bool": { - "label": "bool", - "numberOfBytes": "1" - }, - "t_int256": { - "label": "int256", - "numberOfBytes": "32" - }, - "t_struct(RolloverFeeSigmoidParams)5751_storage": { - "label": "struct FeePolicy.RolloverFeeSigmoidParams", - "members": [ - { - "label": "lower", - "type": "t_int256", - "offset": 0, - "slot": "0" - }, - { - "label": "upper", - "type": "t_int256", - "offset": 0, - "slot": "1" - }, - { - "label": "growth", - "type": "t_int256", - "offset": 0, - "slot": "2" - } - ], - "numberOfBytes": "96" - }, - "t_uint256": { - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint8": { - "label": "uint8", - "numberOfBytes": "1" - } - }, - "namespaces": {} - } - }, - "e03a11f453962caeb3010d96c15990e325fa65d3fc00f7979cde48945641d8e0": { - "address": "0x62fb9C2f65ECC67d895F612483D68CDCdEdfE267", - "txHash": "0xefdddacb3bf022fe61196e4ee7d9f6f0c0e34eac6ffd00aeb58d97861893d66a", - "layout": { - "solcVersion": "0.8.20", - "storage": [ - { - "label": "_initialized", - "offset": 0, - "slot": "0", - "type": "t_uint8", - "contract": "Initializable", - "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", - "retypedFrom": "bool" - }, - { - "label": "_initializing", - "offset": 1, - "slot": "0", - "type": "t_bool", - "contract": "Initializable", - "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" - }, - { - "label": "__gap", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)50_storage", - "contract": "ContextUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:40" - }, - { - "label": "_balances", - "offset": 0, - "slot": "51", - "type": "t_mapping(t_address,t_uint256)", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:40" - }, - { - "label": "_allowances", - "offset": 0, - "slot": "52", - "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:42" - }, - { - "label": "_totalSupply", - "offset": 0, - "slot": "53", - "type": "t_uint256", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:44" - }, - { - "label": "_name", - "offset": 0, - "slot": "54", - "type": "t_string_storage", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:46" - }, - { - "label": "_symbol", - "offset": 0, - "slot": "55", - "type": "t_string_storage", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:47" - }, - { - "label": "__gap", - "offset": 0, - "slot": "56", - "type": "t_array(t_uint256)45_storage", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:376" - }, - { - "label": "__gap", - "offset": 0, - "slot": "101", - "type": "t_array(t_uint256)50_storage", - "contract": "ERC20BurnableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol:51" - }, - { - "label": "_owner", - "offset": 0, - "slot": "151", - "type": "t_address", - "contract": "OwnableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" - }, - { - "label": "__gap", - "offset": 0, - "slot": "152", - "type": "t_array(t_uint256)49_storage", - "contract": "OwnableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" - }, - { - "label": "_paused", - "offset": 0, - "slot": "201", - "type": "t_bool", - "contract": "PausableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:29" - }, - { - "label": "__gap", - "offset": 0, - "slot": "202", - "type": "t_array(t_uint256)49_storage", - "contract": "PausableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:116" - }, - { - "label": "_status", - "offset": 0, - "slot": "251", - "type": "t_uint256", - "contract": "ReentrancyGuardUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:38" - }, - { - "label": "__gap", - "offset": 0, - "slot": "252", - "type": "t_array(t_uint256)49_storage", - "contract": "ReentrancyGuardUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:88" - }, - { - "label": "_decimals", - "offset": 0, - "slot": "301", - "type": "t_uint8", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:121" - }, - { - "label": "keeper", - "offset": 1, - "slot": "301", - "type": "t_address", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:127" - }, - { - "label": "feePolicy", - "offset": 0, - "slot": "302", - "type": "t_contract(IFeePolicy)11540", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:130" - }, - { - "label": "_pricingStrategy_DEPRECATED", - "offset": 0, - "slot": "303", - "type": "t_address", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:135" - }, - { - "label": "_discountStrategy_DEPRECATED", - "offset": 0, - "slot": "304", - "type": "t_address", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:142" - }, - { - "label": "bondIssuer", - "offset": 0, - "slot": "305", - "type": "t_contract(IBondIssuer)11434", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:146" - }, - { - "label": "_depositBond", - "offset": 0, - "slot": "306", - "type": "t_contract(IBondController)12087", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:149" - }, - { - "label": "minTrancheMaturitySec", - "offset": 0, - "slot": "307", - "type": "t_uint256", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:153" - }, - { - "label": "maxTrancheMaturitySec", - "offset": 0, - "slot": "308", - "type": "t_uint256", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:157" - }, - { - "label": "_matureValueTargetPerc_DEPRECATED", - "offset": 0, - "slot": "309", - "type": "t_uint256", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:164" - }, - { - "label": "maxSupply", - "offset": 0, - "slot": "310", - "type": "t_uint256", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:167" - }, - { - "label": "maxMintAmtPerTranche", - "offset": 0, - "slot": "311", - "type": "t_uint256", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:170" - }, - { - "label": "mintedSupplyPerTranche", - "offset": 0, - "slot": "312", - "type": "t_mapping(t_contract(ITranche)12114,t_uint256)", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:173" - }, - { - "label": "_appliedDiscounts_DEPRECATED", - "offset": 0, - "slot": "313", - "type": "t_mapping(t_contract(IERC20Upgradeable)1205,t_uint256)", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:179" - }, - { - "label": "_reserves", - "offset": 0, - "slot": "314", - "type": "t_struct(AddressSet)4926_storage", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:185" - }, - { - "label": "_matureTrancheBalance_DEPRECATED", - "offset": 0, - "slot": "316", - "type": "t_uint256", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:191" - }, - { - "label": "vault", - "offset": 0, - "slot": "317", - "type": "t_contract(IRolloverVault)11811", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:199" - } - ], - "types": { - "t_address": { - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_bytes32)dyn_storage": { - "label": "bytes32[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)45_storage": { - "label": "uint256[45]", - "numberOfBytes": "1440" - }, - "t_array(t_uint256)49_storage": { - "label": "uint256[49]", - "numberOfBytes": "1568" - }, - "t_array(t_uint256)50_storage": { - "label": "uint256[50]", - "numberOfBytes": "1600" - }, - "t_bool": { - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_contract(IBondController)12087": { - "label": "contract IBondController", - "numberOfBytes": "20" - }, - "t_contract(IBondIssuer)11434": { - "label": "contract IBondIssuer", - "numberOfBytes": "20" - }, - "t_contract(IERC20Upgradeable)1205": { - "label": "contract IERC20Upgradeable", - "numberOfBytes": "20" - }, - "t_contract(IFeePolicy)11540": { - "label": "contract IFeePolicy", - "numberOfBytes": "20" - }, - "t_contract(IRolloverVault)11811": { - "label": "contract IRolloverVault", - "numberOfBytes": "20" - }, - "t_contract(ITranche)12114": { - "label": "contract ITranche", - "numberOfBytes": "20" - }, - "t_mapping(t_address,t_mapping(t_address,t_uint256))": { - "label": "mapping(address => mapping(address => uint256))", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_uint256)": { - "label": "mapping(address => uint256)", - "numberOfBytes": "32" - }, - "t_mapping(t_bytes32,t_uint256)": { - "label": "mapping(bytes32 => uint256)", - "numberOfBytes": "32" - }, - "t_mapping(t_contract(IERC20Upgradeable)1205,t_uint256)": { - "label": "mapping(contract IERC20Upgradeable => uint256)", - "numberOfBytes": "32" - }, - "t_mapping(t_contract(ITranche)12114,t_uint256)": { - "label": "mapping(contract ITranche => uint256)", - "numberOfBytes": "32" - }, - "t_string_storage": { - "label": "string", - "numberOfBytes": "32" - }, - "t_struct(AddressSet)4926_storage": { - "label": "struct EnumerableSetUpgradeable.AddressSet", - "members": [ - { - "label": "_inner", - "type": "t_struct(Set)4611_storage", - "offset": 0, - "slot": "0" - } - ], - "numberOfBytes": "64" - }, - "t_struct(Set)4611_storage": { - "label": "struct EnumerableSetUpgradeable.Set", - "members": [ - { - "label": "_values", - "type": "t_array(t_bytes32)dyn_storage", - "offset": 0, - "slot": "0" - }, - { - "label": "_indexes", - "type": "t_mapping(t_bytes32,t_uint256)", - "offset": 0, - "slot": "1" - } - ], - "numberOfBytes": "64" - }, - "t_uint256": { - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint8": { - "label": "uint8", - "numberOfBytes": "1" - } - }, - "namespaces": {} - } - }, - "60014a753f74014fba8497c8f0497ebbaf40fe7a71994102b7e3d3c8c355b105": { - "address": "0x932Ba53192a3206825A9F9393FE669C9CEf7ee37", - "txHash": "0x787e4a3cf5d1bed28d8c2d0e18284e5c83ae94789effcb64e6a958531f868ac2", - "layout": { - "solcVersion": "0.8.20", - "storage": [ - { - "label": "_initialized", - "offset": 0, - "slot": "0", - "type": "t_uint8", - "contract": "Initializable", - "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", - "retypedFrom": "bool" - }, - { - "label": "_initializing", - "offset": 1, - "slot": "0", - "type": "t_bool", - "contract": "Initializable", - "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" - }, - { - "label": "__gap", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)50_storage", - "contract": "ContextUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:40" - }, - { - "label": "_balances", - "offset": 0, - "slot": "51", - "type": "t_mapping(t_address,t_uint256)", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:40" - }, - { - "label": "_allowances", - "offset": 0, - "slot": "52", - "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:42" - }, - { - "label": "_totalSupply", - "offset": 0, - "slot": "53", - "type": "t_uint256", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:44" - }, - { - "label": "_name", - "offset": 0, - "slot": "54", - "type": "t_string_storage", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:46" - }, - { - "label": "_symbol", - "offset": 0, - "slot": "55", - "type": "t_string_storage", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:47" - }, - { - "label": "__gap", - "offset": 0, - "slot": "56", - "type": "t_array(t_uint256)45_storage", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:376" - }, - { - "label": "__gap", - "offset": 0, - "slot": "101", - "type": "t_array(t_uint256)50_storage", - "contract": "ERC20BurnableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol:51" - }, - { - "label": "_owner", - "offset": 0, - "slot": "151", - "type": "t_address", - "contract": "OwnableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" - }, - { - "label": "__gap", - "offset": 0, - "slot": "152", - "type": "t_array(t_uint256)49_storage", - "contract": "OwnableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" - }, - { - "label": "_paused", - "offset": 0, - "slot": "201", - "type": "t_bool", - "contract": "PausableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:29" - }, - { - "label": "__gap", - "offset": 0, - "slot": "202", - "type": "t_array(t_uint256)49_storage", - "contract": "PausableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:116" - }, - { - "label": "_status", - "offset": 0, - "slot": "251", - "type": "t_uint256", - "contract": "ReentrancyGuardUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:38" - }, - { - "label": "__gap", - "offset": 0, - "slot": "252", - "type": "t_array(t_uint256)49_storage", - "contract": "ReentrancyGuardUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:88" - }, - { - "label": "underlying", - "offset": 0, - "slot": "301", - "type": "t_contract(IERC20Upgradeable)1205", - "contract": "RolloverVault", - "src": "contracts/RolloverVault.sol:108" - }, - { - "label": "_deployed", - "offset": 0, - "slot": "302", - "type": "t_struct(AddressSet)4821_storage", - "contract": "RolloverVault", - "src": "contracts/RolloverVault.sol:112" - }, - { - "label": "minDeploymentAmt", - "offset": 0, - "slot": "304", - "type": "t_uint256", - "contract": "RolloverVault", - "src": "contracts/RolloverVault.sol:120" - }, - { - "label": "perp", - "offset": 0, - "slot": "305", - "type": "t_contract(IPerpetualTranche)7955", - "contract": "RolloverVault", - "src": "contracts/RolloverVault.sol:123" - }, - { - "label": "feePolicy", - "offset": 0, - "slot": "306", - "type": "t_contract(IFeePolicy)7735", - "contract": "RolloverVault", - "src": "contracts/RolloverVault.sol:129" - }, - { - "label": "keeper", - "offset": 0, - "slot": "307", - "type": "t_address", - "contract": "RolloverVault", - "src": "contracts/RolloverVault.sol:134" - }, - { - "label": "minUnderlyingBal", - "offset": 0, - "slot": "308", - "type": "t_uint256", - "contract": "RolloverVault", - "src": "contracts/RolloverVault.sol:140" - }, - { - "label": "minUnderlyingPerc", - "offset": 0, - "slot": "309", - "type": "t_uint256", - "contract": "RolloverVault", - "src": "contracts/RolloverVault.sol:145" - } - ], - "types": { - "t_address": { - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_bytes32)dyn_storage": { - "label": "bytes32[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)45_storage": { - "label": "uint256[45]", - "numberOfBytes": "1440" - }, - "t_array(t_uint256)49_storage": { - "label": "uint256[49]", - "numberOfBytes": "1568" - }, - "t_array(t_uint256)50_storage": { - "label": "uint256[50]", - "numberOfBytes": "1600" - }, - "t_bool": { - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_contract(IERC20Upgradeable)1205": { - "label": "contract IERC20Upgradeable", - "numberOfBytes": "20" - }, - "t_contract(IFeePolicy)7735": { - "label": "contract IFeePolicy", - "numberOfBytes": "20" - }, - "t_contract(IPerpetualTranche)7955": { - "label": "contract IPerpetualTranche", - "numberOfBytes": "20" - }, - "t_mapping(t_address,t_mapping(t_address,t_uint256))": { - "label": "mapping(address => mapping(address => uint256))", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_uint256)": { - "label": "mapping(address => uint256)", - "numberOfBytes": "32" - }, - "t_mapping(t_bytes32,t_uint256)": { - "label": "mapping(bytes32 => uint256)", - "numberOfBytes": "32" - }, - "t_string_storage": { - "label": "string", - "numberOfBytes": "32" - }, - "t_struct(AddressSet)4821_storage": { - "label": "struct EnumerableSetUpgradeable.AddressSet", - "members": [ - { - "label": "_inner", - "type": "t_struct(Set)4506_storage", - "offset": 0, - "slot": "0" - } - ], - "numberOfBytes": "64" - }, - "t_struct(Set)4506_storage": { - "label": "struct EnumerableSetUpgradeable.Set", - "members": [ - { - "label": "_values", - "type": "t_array(t_bytes32)dyn_storage", - "offset": 0, - "slot": "0" - }, - { - "label": "_indexes", - "type": "t_mapping(t_bytes32,t_uint256)", - "offset": 0, - "slot": "1" - } - ], - "numberOfBytes": "64" - }, - "t_uint256": { - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint8": { - "label": "uint8", - "numberOfBytes": "1" - } - }, - "namespaces": {} - } - }, - "4afb149e223cf276a5f4ce133f166d203b2deaea2ec8c74068921f63ffd1eef4": { - "address": "0xf4FF6a7203F91Ae72D0273DF7596a5Df5a85999b", - "txHash": "0x123059de903019c7bef6825fbf6908d249ea3f2987c47bbd4a188b0d3ab3151b", - "layout": { - "solcVersion": "0.8.20", - "storage": [ - { - "label": "_initialized", - "offset": 0, - "slot": "0", - "type": "t_uint8", - "contract": "Initializable", - "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", - "retypedFrom": "bool" - }, - { - "label": "_initializing", - "offset": 1, - "slot": "0", - "type": "t_bool", - "contract": "Initializable", - "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" - }, - { - "label": "__gap", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)50_storage", - "contract": "ContextUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:40" - }, - { - "label": "_balances", - "offset": 0, - "slot": "51", - "type": "t_mapping(t_address,t_uint256)", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:40" - }, - { - "label": "_allowances", - "offset": 0, - "slot": "52", - "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:42" - }, - { - "label": "_totalSupply", - "offset": 0, - "slot": "53", - "type": "t_uint256", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:44" - }, - { - "label": "_name", - "offset": 0, - "slot": "54", - "type": "t_string_storage", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:46" - }, - { - "label": "_symbol", - "offset": 0, - "slot": "55", - "type": "t_string_storage", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:47" - }, - { - "label": "__gap", - "offset": 0, - "slot": "56", - "type": "t_array(t_uint256)45_storage", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:376" - }, - { - "label": "__gap", - "offset": 0, - "slot": "101", - "type": "t_array(t_uint256)50_storage", - "contract": "ERC20BurnableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol:51" - }, - { - "label": "_owner", - "offset": 0, - "slot": "151", - "type": "t_address", - "contract": "OwnableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" - }, - { - "label": "__gap", - "offset": 0, - "slot": "152", - "type": "t_array(t_uint256)49_storage", - "contract": "OwnableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" - }, - { - "label": "_paused", - "offset": 0, - "slot": "201", - "type": "t_bool", - "contract": "PausableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:29" - }, - { - "label": "__gap", - "offset": 0, - "slot": "202", - "type": "t_array(t_uint256)49_storage", - "contract": "PausableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:116" - }, - { - "label": "_status", - "offset": 0, - "slot": "251", - "type": "t_uint256", - "contract": "ReentrancyGuardUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:38" - }, - { - "label": "__gap", - "offset": 0, - "slot": "252", - "type": "t_array(t_uint256)49_storage", - "contract": "ReentrancyGuardUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:88" - }, - { - "label": "underlying", - "offset": 0, - "slot": "301", - "type": "t_contract(IERC20Upgradeable)1205", - "contract": "RolloverVault", - "src": "contracts/RolloverVault.sol:107" - }, - { - "label": "_deployed", - "offset": 0, - "slot": "302", - "type": "t_struct(AddressSet)4926_storage", - "contract": "RolloverVault", - "src": "contracts/RolloverVault.sol:111" - }, - { - "label": "minDeploymentAmt", - "offset": 0, - "slot": "304", - "type": "t_uint256", - "contract": "RolloverVault", - "src": "contracts/RolloverVault.sol:119" - }, - { - "label": "perp", - "offset": 0, - "slot": "305", - "type": "t_contract(IPerpetualTranche)11760", - "contract": "RolloverVault", - "src": "contracts/RolloverVault.sol:122" - }, - { - "label": "feePolicy", - "offset": 0, - "slot": "306", - "type": "t_contract(IFeePolicy)11540", - "contract": "RolloverVault", - "src": "contracts/RolloverVault.sol:128" - }, - { - "label": "keeper", - "offset": 0, - "slot": "307", - "type": "t_address", - "contract": "RolloverVault", - "src": "contracts/RolloverVault.sol:133" - }, - { - "label": "minUnderlyingBal", - "offset": 0, - "slot": "308", - "type": "t_uint256", - "contract": "RolloverVault", - "src": "contracts/RolloverVault.sol:139" - }, - { - "label": "minUnderlyingPerc", - "offset": 0, - "slot": "309", - "type": "t_uint256", - "contract": "RolloverVault", - "src": "contracts/RolloverVault.sol:144" - } - ], - "types": { - "t_address": { - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_bytes32)dyn_storage": { - "label": "bytes32[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)45_storage": { - "label": "uint256[45]", - "numberOfBytes": "1440" - }, - "t_array(t_uint256)49_storage": { - "label": "uint256[49]", - "numberOfBytes": "1568" - }, - "t_array(t_uint256)50_storage": { - "label": "uint256[50]", - "numberOfBytes": "1600" - }, - "t_bool": { - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_contract(IERC20Upgradeable)1205": { - "label": "contract IERC20Upgradeable", - "numberOfBytes": "20" - }, - "t_contract(IFeePolicy)11540": { - "label": "contract IFeePolicy", - "numberOfBytes": "20" - }, - "t_contract(IPerpetualTranche)11760": { - "label": "contract IPerpetualTranche", - "numberOfBytes": "20" - }, - "t_mapping(t_address,t_mapping(t_address,t_uint256))": { - "label": "mapping(address => mapping(address => uint256))", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_uint256)": { - "label": "mapping(address => uint256)", - "numberOfBytes": "32" - }, - "t_mapping(t_bytes32,t_uint256)": { - "label": "mapping(bytes32 => uint256)", - "numberOfBytes": "32" - }, - "t_string_storage": { - "label": "string", - "numberOfBytes": "32" - }, - "t_struct(AddressSet)4926_storage": { - "label": "struct EnumerableSetUpgradeable.AddressSet", - "members": [ - { - "label": "_inner", - "type": "t_struct(Set)4611_storage", - "offset": 0, - "slot": "0" - } - ], - "numberOfBytes": "64" - }, - "t_struct(Set)4611_storage": { - "label": "struct EnumerableSetUpgradeable.Set", - "members": [ - { - "label": "_values", - "type": "t_array(t_bytes32)dyn_storage", - "offset": 0, - "slot": "0" - }, - { - "label": "_indexes", - "type": "t_mapping(t_bytes32,t_uint256)", - "offset": 0, - "slot": "1" - } - ], - "numberOfBytes": "64" - }, - "t_uint256": { - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint8": { - "label": "uint8", - "numberOfBytes": "1" - } - }, - "namespaces": {} - } - }, - "05e5d29a6278113c06023b8f1f5b607d9af399b6f5329927e2b87ce2308cbbc3": { - "address": "0x98EfcBa817563aeFED04Aac40bAaB20EaC0a93f6", - "txHash": "0x157ce923902289e793387d855ae85127626fea212e348b63c434132b9f606e16", - "layout": { - "solcVersion": "0.8.20", - "storage": [ - { - "label": "_initialized", - "offset": 0, - "slot": "0", - "type": "t_uint8", - "contract": "Initializable", - "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", - "retypedFrom": "bool" - }, - { - "label": "_initializing", - "offset": 1, - "slot": "0", - "type": "t_bool", - "contract": "Initializable", - "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" - }, - { - "label": "__gap", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)50_storage", - "contract": "ContextUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:40" - }, - { - "label": "_owner", - "offset": 0, - "slot": "51", - "type": "t_address", - "contract": "OwnableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" - }, - { - "label": "__gap", - "offset": 0, - "slot": "52", - "type": "t_array(t_uint256)49_storage", - "contract": "OwnableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" - }, - { - "label": "targetSubscriptionRatio", - "offset": 0, - "slot": "101", - "type": "t_uint256", - "contract": "FeePolicy", - "src": "contracts/FeePolicy.sol:78" - }, - { - "label": "deviationRatioBoundLower", - "offset": 0, - "slot": "102", - "type": "t_uint256", - "contract": "FeePolicy", - "src": "contracts/FeePolicy.sol:81" - }, - { - "label": "deviationRatioBoundUpper", - "offset": 0, - "slot": "103", - "type": "t_uint256", - "contract": "FeePolicy", - "src": "contracts/FeePolicy.sol:84" - }, - { - "label": "perpMintFeePerc", - "offset": 0, - "slot": "104", - "type": "t_uint256", - "contract": "FeePolicy", - "src": "contracts/FeePolicy.sol:92" - }, - { - "label": "perpBurnFeePerc", - "offset": 0, - "slot": "105", - "type": "t_uint256", - "contract": "FeePolicy", - "src": "contracts/FeePolicy.sol:95" - }, - { - "label": "perpRolloverFee", - "offset": 0, - "slot": "106", - "type": "t_struct(RolloverFeeSigmoidParams)3361_storage", - "contract": "FeePolicy", - "src": "contracts/FeePolicy.sol:107" - }, - { - "label": "vaultDeploymentFee", - "offset": 0, - "slot": "109", - "type": "t_uint256", - "contract": "FeePolicy", - "src": "contracts/FeePolicy.sol:117" - }, - { - "label": "vaultMintFeePerc", - "offset": 0, - "slot": "110", - "type": "t_uint256", - "contract": "FeePolicy", - "src": "contracts/FeePolicy.sol:120" - }, - { - "label": "vaultBurnFeePerc", - "offset": 0, - "slot": "111", - "type": "t_uint256", - "contract": "FeePolicy", - "src": "contracts/FeePolicy.sol:123" - }, - { - "label": "vaultUnderlyingToPerpSwapFeePerc", - "offset": 0, - "slot": "112", - "type": "t_uint256", - "contract": "FeePolicy", - "src": "contracts/FeePolicy.sol:126" - }, - { - "label": "vaultPerpToUnderlyingSwapFeePerc", - "offset": 0, - "slot": "113", - "type": "t_uint256", - "contract": "FeePolicy", - "src": "contracts/FeePolicy.sol:129" - } - ], - "types": { - "t_address": { - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_uint256)49_storage": { - "label": "uint256[49]", - "numberOfBytes": "1568" - }, - "t_array(t_uint256)50_storage": { - "label": "uint256[50]", - "numberOfBytes": "1600" - }, - "t_bool": { - "label": "bool", - "numberOfBytes": "1" - }, - "t_int256": { - "label": "int256", - "numberOfBytes": "32" - }, - "t_struct(RolloverFeeSigmoidParams)3361_storage": { - "label": "struct FeePolicy.RolloverFeeSigmoidParams", - "members": [ - { - "label": "lower", - "type": "t_int256", - "offset": 0, - "slot": "0" - }, - { - "label": "upper", - "type": "t_int256", - "offset": 0, - "slot": "1" - }, - { - "label": "growth", - "type": "t_int256", - "offset": 0, - "slot": "2" - } - ], - "numberOfBytes": "96" - }, - "t_uint256": { - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint8": { - "label": "uint8", - "numberOfBytes": "1" - } - }, - "namespaces": {} - } - }, - "133c9ad2891210fcd8ac56ff8f8e7c5bd48f122f92e6a1640807c90214787c7c": { - "address": "0xbD46a1Cde0AA5D8fa6ddd93dd73037f4B0E5b055", - "txHash": "0xba20ed683dd7d1578b5423c0668a40d2e049601d0ee29a553b5bcecf787ac975", - "layout": { - "solcVersion": "0.8.20", - "storage": [ - { - "label": "_initialized", - "offset": 0, - "slot": "0", - "type": "t_uint8", - "contract": "Initializable", - "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", - "retypedFrom": "bool" - }, - { - "label": "_initializing", - "offset": 1, - "slot": "0", - "type": "t_bool", - "contract": "Initializable", - "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" - }, - { - "label": "__gap", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)50_storage", - "contract": "ContextUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:40" - }, - { - "label": "_balances", - "offset": 0, - "slot": "51", - "type": "t_mapping(t_address,t_uint256)", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:40" - }, - { - "label": "_allowances", - "offset": 0, - "slot": "52", - "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:42" - }, - { - "label": "_totalSupply", - "offset": 0, - "slot": "53", - "type": "t_uint256", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:44" - }, - { - "label": "_name", - "offset": 0, - "slot": "54", - "type": "t_string_storage", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:46" - }, - { - "label": "_symbol", - "offset": 0, - "slot": "55", - "type": "t_string_storage", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:47" - }, - { - "label": "__gap", - "offset": 0, - "slot": "56", - "type": "t_array(t_uint256)45_storage", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:376" - }, - { - "label": "__gap", - "offset": 0, - "slot": "101", - "type": "t_array(t_uint256)50_storage", - "contract": "ERC20BurnableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol:51" - }, - { - "label": "_owner", - "offset": 0, - "slot": "151", - "type": "t_address", - "contract": "OwnableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" - }, - { - "label": "__gap", - "offset": 0, - "slot": "152", - "type": "t_array(t_uint256)49_storage", - "contract": "OwnableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" - }, - { - "label": "_paused", - "offset": 0, - "slot": "201", - "type": "t_bool", - "contract": "PausableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:29" - }, - { - "label": "__gap", - "offset": 0, - "slot": "202", - "type": "t_array(t_uint256)49_storage", - "contract": "PausableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:116" - }, - { - "label": "_status", - "offset": 0, - "slot": "251", - "type": "t_uint256", - "contract": "ReentrancyGuardUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:38" - }, - { - "label": "__gap", - "offset": 0, - "slot": "252", - "type": "t_array(t_uint256)49_storage", - "contract": "ReentrancyGuardUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:88" - }, - { - "label": "_decimals", - "offset": 0, - "slot": "301", - "type": "t_uint8", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:121" - }, - { - "label": "keeper", - "offset": 1, - "slot": "301", - "type": "t_address", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:127" - }, - { - "label": "feePolicy", - "offset": 0, - "slot": "302", - "type": "t_contract(IFeePolicy)11680", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:130" - }, - { - "label": "_pricingStrategy_DEPRECATED", - "offset": 0, - "slot": "303", - "type": "t_address", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:135" - }, - { - "label": "_discountStrategy_DEPRECATED", - "offset": 0, - "slot": "304", - "type": "t_address", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:142" - }, - { - "label": "bondIssuer", - "offset": 0, - "slot": "305", - "type": "t_contract(IBondIssuer)11562", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:146" - }, - { - "label": "_depositBond", - "offset": 0, - "slot": "306", - "type": "t_contract(IBondController)12227", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:149" - }, - { - "label": "minTrancheMaturitySec", - "offset": 0, - "slot": "307", - "type": "t_uint256", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:153" - }, - { - "label": "maxTrancheMaturitySec", - "offset": 0, - "slot": "308", - "type": "t_uint256", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:157" - }, - { - "label": "_matureValueTargetPerc_DEPRECATED", - "offset": 0, - "slot": "309", - "type": "t_uint256", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:164" - }, - { - "label": "maxSupply", - "offset": 0, - "slot": "310", - "type": "t_uint256", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:167" - }, - { - "label": "maxMintAmtPerTranche", - "offset": 0, - "slot": "311", - "type": "t_uint256", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:170" - }, - { - "label": "mintedSupplyPerTranche", - "offset": 0, - "slot": "312", - "type": "t_mapping(t_contract(ITranche)12254,t_uint256)", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:173" - }, - { - "label": "_appliedDiscounts_DEPRECATED", - "offset": 0, - "slot": "313", - "type": "t_mapping(t_contract(IERC20Upgradeable)1205,t_uint256)", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:179" - }, - { - "label": "_reserves", - "offset": 0, - "slot": "314", - "type": "t_struct(AddressSet)4926_storage", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:185" - }, - { - "label": "_matureTrancheBalance_DEPRECATED", - "offset": 0, - "slot": "316", - "type": "t_uint256", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:191" - }, - { - "label": "vault", - "offset": 0, - "slot": "317", - "type": "t_contract(IRolloverVault)11951", - "contract": "PerpetualTranche", - "src": "contracts/PerpetualTranche.sol:199" - } - ], - "types": { - "t_address": { - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_bytes32)dyn_storage": { - "label": "bytes32[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)45_storage": { - "label": "uint256[45]", - "numberOfBytes": "1440" - }, - "t_array(t_uint256)49_storage": { - "label": "uint256[49]", - "numberOfBytes": "1568" - }, - "t_array(t_uint256)50_storage": { - "label": "uint256[50]", - "numberOfBytes": "1600" - }, - "t_bool": { - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_contract(IBondController)12227": { - "label": "contract IBondController", - "numberOfBytes": "20" - }, - "t_contract(IBondIssuer)11562": { - "label": "contract IBondIssuer", - "numberOfBytes": "20" - }, - "t_contract(IERC20Upgradeable)1205": { - "label": "contract IERC20Upgradeable", - "numberOfBytes": "20" - }, - "t_contract(IFeePolicy)11680": { - "label": "contract IFeePolicy", - "numberOfBytes": "20" - }, - "t_contract(IRolloverVault)11951": { - "label": "contract IRolloverVault", - "numberOfBytes": "20" - }, - "t_contract(ITranche)12254": { - "label": "contract ITranche", - "numberOfBytes": "20" - }, - "t_mapping(t_address,t_mapping(t_address,t_uint256))": { - "label": "mapping(address => mapping(address => uint256))", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_uint256)": { - "label": "mapping(address => uint256)", - "numberOfBytes": "32" - }, - "t_mapping(t_bytes32,t_uint256)": { - "label": "mapping(bytes32 => uint256)", - "numberOfBytes": "32" - }, - "t_mapping(t_contract(IERC20Upgradeable)1205,t_uint256)": { - "label": "mapping(contract IERC20Upgradeable => uint256)", - "numberOfBytes": "32" - }, - "t_mapping(t_contract(ITranche)12254,t_uint256)": { - "label": "mapping(contract ITranche => uint256)", - "numberOfBytes": "32" - }, - "t_string_storage": { - "label": "string", - "numberOfBytes": "32" - }, - "t_struct(AddressSet)4926_storage": { - "label": "struct EnumerableSetUpgradeable.AddressSet", - "members": [ - { - "label": "_inner", - "type": "t_struct(Set)4611_storage", - "offset": 0, - "slot": "0" - } - ], - "numberOfBytes": "64" - }, - "t_struct(Set)4611_storage": { - "label": "struct EnumerableSetUpgradeable.Set", - "members": [ - { - "label": "_values", - "type": "t_array(t_bytes32)dyn_storage", - "offset": 0, - "slot": "0" - }, - { - "label": "_indexes", - "type": "t_mapping(t_bytes32,t_uint256)", - "offset": 0, - "slot": "1" - } - ], - "numberOfBytes": "64" - }, - "t_uint256": { - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint8": { - "label": "uint8", - "numberOfBytes": "1" - } - }, - "namespaces": {} - } - }, - "c4717800d2cfe21b5214872e6376be74362d8fd6977fd0a0c21a2b813e873c85": { - "address": "0x3F8c0c4A22522Eeab48F2129A7356A710ceE4E77", - "txHash": "0x45dcc71c4fd27f6ff63e351afd83b117089e6854fd84fd80f487e32f560bc5d5", - "layout": { - "solcVersion": "0.8.20", - "storage": [ - { - "label": "_initialized", - "offset": 0, - "slot": "0", - "type": "t_uint8", - "contract": "Initializable", - "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", - "retypedFrom": "bool" - }, - { - "label": "_initializing", - "offset": 1, - "slot": "0", - "type": "t_bool", - "contract": "Initializable", - "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" - }, - { - "label": "__gap", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)50_storage", - "contract": "ContextUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:40" - }, - { - "label": "_balances", - "offset": 0, - "slot": "51", - "type": "t_mapping(t_address,t_uint256)", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:40" - }, - { - "label": "_allowances", - "offset": 0, - "slot": "52", - "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:42" - }, - { - "label": "_totalSupply", - "offset": 0, - "slot": "53", - "type": "t_uint256", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:44" - }, - { - "label": "_name", - "offset": 0, - "slot": "54", - "type": "t_string_storage", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:46" - }, - { - "label": "_symbol", - "offset": 0, - "slot": "55", - "type": "t_string_storage", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:47" - }, - { - "label": "__gap", - "offset": 0, - "slot": "56", - "type": "t_array(t_uint256)45_storage", - "contract": "ERC20Upgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:376" - }, - { - "label": "__gap", - "offset": 0, - "slot": "101", - "type": "t_array(t_uint256)50_storage", - "contract": "ERC20BurnableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol:51" - }, - { - "label": "_owner", - "offset": 0, - "slot": "151", - "type": "t_address", - "contract": "OwnableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" - }, - { - "label": "__gap", - "offset": 0, - "slot": "152", - "type": "t_array(t_uint256)49_storage", - "contract": "OwnableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" - }, - { - "label": "_paused", - "offset": 0, - "slot": "201", - "type": "t_bool", - "contract": "PausableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:29" - }, - { - "label": "__gap", - "offset": 0, - "slot": "202", - "type": "t_array(t_uint256)49_storage", - "contract": "PausableUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:116" - }, - { - "label": "_status", - "offset": 0, - "slot": "251", - "type": "t_uint256", - "contract": "ReentrancyGuardUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:38" - }, - { - "label": "__gap", - "offset": 0, - "slot": "252", - "type": "t_array(t_uint256)49_storage", - "contract": "ReentrancyGuardUpgradeable", - "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:88" - }, - { - "label": "underlying", - "offset": 0, - "slot": "301", - "type": "t_contract(IERC20Upgradeable)1205", - "contract": "RolloverVault", - "src": "contracts/RolloverVault.sol:107" - }, - { - "label": "_deployed", - "offset": 0, - "slot": "302", - "type": "t_struct(AddressSet)4926_storage", - "contract": "RolloverVault", - "src": "contracts/RolloverVault.sol:111" - }, - { - "label": "minDeploymentAmt", - "offset": 0, - "slot": "304", - "type": "t_uint256", - "contract": "RolloverVault", - "src": "contracts/RolloverVault.sol:119" - }, - { - "label": "perp", - "offset": 0, - "slot": "305", - "type": "t_contract(IPerpetualTranche)11900", - "contract": "RolloverVault", - "src": "contracts/RolloverVault.sol:122" - }, - { - "label": "feePolicy", - "offset": 0, - "slot": "306", - "type": "t_contract(IFeePolicy)11680", - "contract": "RolloverVault", - "src": "contracts/RolloverVault.sol:128" - }, - { - "label": "keeper", - "offset": 0, - "slot": "307", - "type": "t_address", - "contract": "RolloverVault", - "src": "contracts/RolloverVault.sol:133" - }, - { - "label": "minUnderlyingBal", - "offset": 0, - "slot": "308", - "type": "t_uint256", - "contract": "RolloverVault", - "src": "contracts/RolloverVault.sol:139" - }, - { - "label": "minUnderlyingPerc", - "offset": 0, - "slot": "309", - "type": "t_uint256", - "contract": "RolloverVault", - "src": "contracts/RolloverVault.sol:144" - } - ], - "types": { - "t_address": { - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_bytes32)dyn_storage": { - "label": "bytes32[]", - "numberOfBytes": "32" - }, - "t_array(t_uint256)45_storage": { - "label": "uint256[45]", - "numberOfBytes": "1440" - }, - "t_array(t_uint256)49_storage": { - "label": "uint256[49]", - "numberOfBytes": "1568" - }, - "t_array(t_uint256)50_storage": { - "label": "uint256[50]", - "numberOfBytes": "1600" - }, - "t_bool": { - "label": "bool", - "numberOfBytes": "1" - }, - "t_bytes32": { - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_contract(IERC20Upgradeable)1205": { - "label": "contract IERC20Upgradeable", - "numberOfBytes": "20" - }, - "t_contract(IFeePolicy)11680": { - "label": "contract IFeePolicy", - "numberOfBytes": "20" - }, - "t_contract(IPerpetualTranche)11900": { - "label": "contract IPerpetualTranche", - "numberOfBytes": "20" - }, - "t_mapping(t_address,t_mapping(t_address,t_uint256))": { - "label": "mapping(address => mapping(address => uint256))", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_uint256)": { - "label": "mapping(address => uint256)", - "numberOfBytes": "32" - }, - "t_mapping(t_bytes32,t_uint256)": { - "label": "mapping(bytes32 => uint256)", - "numberOfBytes": "32" - }, - "t_string_storage": { - "label": "string", - "numberOfBytes": "32" - }, - "t_struct(AddressSet)4926_storage": { - "label": "struct EnumerableSetUpgradeable.AddressSet", - "members": [ - { - "label": "_inner", - "type": "t_struct(Set)4611_storage", - "offset": 0, - "slot": "0" - } - ], - "numberOfBytes": "64" - }, - "t_struct(Set)4611_storage": { - "label": "struct EnumerableSetUpgradeable.Set", - "members": [ - { - "label": "_values", - "type": "t_array(t_bytes32)dyn_storage", - "offset": 0, - "slot": "0" - }, - { - "label": "_indexes", - "type": "t_mapping(t_bytes32,t_uint256)", - "offset": 0, - "slot": "1" - } - ], - "numberOfBytes": "64" - }, - "t_uint256": { - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint8": { - "label": "uint8", - "numberOfBytes": "1" - } - }, - "namespaces": {} - } - } - } -} diff --git a/spot-contracts/.openzeppelin/sepolia.json b/spot-contracts/.openzeppelin/sepolia.json new file mode 100644 index 00000000..de91f3db --- /dev/null +++ b/spot-contracts/.openzeppelin/sepolia.json @@ -0,0 +1,901 @@ +{ + "manifestVersion": "3.2", + "admin": { + "address": "0x0584042677d469C0B95775368cF1EFfe9cc222F5", + "txHash": "0xb4f79db73bdb9e613779fb7f8525cb14819b21a170c1d46a84b9f02dbdca2762" + }, + "proxies": [ + { + "address": "0x2DdF288F26490D1147296cC0FA2B3c4da5E15f10", + "txHash": "0x8b03bdb50fa09ed2eebd1fe195ad9a245a4bd93df4ece963d5cf839e50fdaf63", + "kind": "transparent" + }, + { + "address": "0xdcCef9065876fD654bAddeBAa778FDA43E0bfC1F", + "txHash": "0x6c5ab049cab0bd3553b47fd8991aa62993dc46744304db9887e56bfc2045c085", + "kind": "transparent" + }, + { + "address": "0x107614c6602A8e602952Da107B8fE62b5Ab13b04", + "txHash": "0xda9cf80585a7da2935caa35a5dde76c35cf1e7a24bd0b4754e20a7a9eed275b1", + "kind": "transparent" + } + ], + "impls": { + "65cc9a3236bde54808c6dc9a5b271f2cbe3cab237ad5553af67ad3bcab47bd67": { + "address": "0x5396479b65ed39360Ba6C16f6D7c9fd357674534", + "txHash": "0xd02f9e1ecf28f092422ba15470a794c17e5a04b4a4453d6376be399328cd445d", + "layout": { + "solcVersion": "0.8.20", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:40" + }, + { + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" + }, + { + "label": "targetSubscriptionRatio", + "offset": 0, + "slot": "101", + "type": "t_uint256", + "contract": "FeePolicy", + "src": "contracts/FeePolicy.sol:84" + }, + { + "label": "deviationRatioBoundLower", + "offset": 0, + "slot": "102", + "type": "t_uint256", + "contract": "FeePolicy", + "src": "contracts/FeePolicy.sol:87" + }, + { + "label": "deviationRatioBoundUpper", + "offset": 0, + "slot": "103", + "type": "t_uint256", + "contract": "FeePolicy", + "src": "contracts/FeePolicy.sol:90" + }, + { + "label": "perpMintFeePerc", + "offset": 0, + "slot": "104", + "type": "t_uint256", + "contract": "FeePolicy", + "src": "contracts/FeePolicy.sol:98" + }, + { + "label": "perpBurnFeePerc", + "offset": 0, + "slot": "105", + "type": "t_uint256", + "contract": "FeePolicy", + "src": "contracts/FeePolicy.sol:101" + }, + { + "label": "perpRolloverFee", + "offset": 0, + "slot": "106", + "type": "t_struct(RolloverFeeSigmoidParams)5764_storage", + "contract": "FeePolicy", + "src": "contracts/FeePolicy.sol:113" + }, + { + "label": "vaultMintFeePerc", + "offset": 0, + "slot": "109", + "type": "t_uint256", + "contract": "FeePolicy", + "src": "contracts/FeePolicy.sol:121" + }, + { + "label": "vaultBurnFeePerc", + "offset": 0, + "slot": "110", + "type": "t_uint256", + "contract": "FeePolicy", + "src": "contracts/FeePolicy.sol:124" + }, + { + "label": "vaultUnderlyingToPerpSwapFeePerc", + "offset": 0, + "slot": "111", + "type": "t_uint256", + "contract": "FeePolicy", + "src": "contracts/FeePolicy.sol:127" + }, + { + "label": "vaultPerpToUnderlyingSwapFeePerc", + "offset": 0, + "slot": "112", + "type": "t_uint256", + "contract": "FeePolicy", + "src": "contracts/FeePolicy.sol:130" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_int256": { + "label": "int256", + "numberOfBytes": "32" + }, + "t_struct(RolloverFeeSigmoidParams)5764_storage": { + "label": "struct FeePolicy.RolloverFeeSigmoidParams", + "members": [ + { + "label": "lower", + "type": "t_int256", + "offset": 0, + "slot": "0" + }, + { + "label": "upper", + "type": "t_int256", + "offset": 0, + "slot": "1" + }, + { + "label": "growth", + "type": "t_int256", + "offset": 0, + "slot": "2" + } + ], + "numberOfBytes": "96" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } + }, + "b94ae93ec4994748604bed6ebbd132484686fb511a62020d3ca280c20426e0a8": { + "address": "0x47081ee3dD9FE896e99D132dfB759dD252868c36", + "txHash": "0xb3c6a40448183102f5f22c4adabd72ac815ee8365d236b118f287a4bdc117c56", + "layout": { + "solcVersion": "0.8.20", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:40" + }, + { + "label": "_balances", + "offset": 0, + "slot": "51", + "type": "t_mapping(t_address,t_uint256)", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:40" + }, + { + "label": "_allowances", + "offset": 0, + "slot": "52", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:42" + }, + { + "label": "_totalSupply", + "offset": 0, + "slot": "53", + "type": "t_uint256", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:44" + }, + { + "label": "_name", + "offset": 0, + "slot": "54", + "type": "t_string_storage", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:46" + }, + { + "label": "_symbol", + "offset": 0, + "slot": "55", + "type": "t_string_storage", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:47" + }, + { + "label": "__gap", + "offset": 0, + "slot": "56", + "type": "t_array(t_uint256)45_storage", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:376" + }, + { + "label": "__gap", + "offset": 0, + "slot": "101", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC20BurnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol:51" + }, + { + "label": "_owner", + "offset": 0, + "slot": "151", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "152", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" + }, + { + "label": "_paused", + "offset": 0, + "slot": "201", + "type": "t_bool", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:29" + }, + { + "label": "__gap", + "offset": 0, + "slot": "202", + "type": "t_array(t_uint256)49_storage", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:116" + }, + { + "label": "_status", + "offset": 0, + "slot": "251", + "type": "t_uint256", + "contract": "ReentrancyGuardUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:38" + }, + { + "label": "__gap", + "offset": 0, + "slot": "252", + "type": "t_array(t_uint256)49_storage", + "contract": "ReentrancyGuardUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:88" + }, + { + "label": "_decimals", + "offset": 0, + "slot": "301", + "type": "t_uint8", + "contract": "PerpetualTranche", + "src": "contracts/PerpetualTranche.sol:121" + }, + { + "label": "keeper", + "offset": 1, + "slot": "301", + "type": "t_address", + "contract": "PerpetualTranche", + "src": "contracts/PerpetualTranche.sol:127" + }, + { + "label": "feePolicy", + "offset": 0, + "slot": "302", + "type": "t_contract(IFeePolicy)11421", + "contract": "PerpetualTranche", + "src": "contracts/PerpetualTranche.sol:130" + }, + { + "label": "_pricingStrategy_DEPRECATED", + "offset": 0, + "slot": "303", + "type": "t_address", + "contract": "PerpetualTranche", + "src": "contracts/PerpetualTranche.sol:135" + }, + { + "label": "_discountStrategy_DEPRECATED", + "offset": 0, + "slot": "304", + "type": "t_address", + "contract": "PerpetualTranche", + "src": "contracts/PerpetualTranche.sol:142" + }, + { + "label": "bondIssuer", + "offset": 0, + "slot": "305", + "type": "t_contract(IBondIssuer)11341", + "contract": "PerpetualTranche", + "src": "contracts/PerpetualTranche.sol:146" + }, + { + "label": "_depositBond", + "offset": 0, + "slot": "306", + "type": "t_contract(IBondController)11968", + "contract": "PerpetualTranche", + "src": "contracts/PerpetualTranche.sol:149" + }, + { + "label": "minTrancheMaturitySec", + "offset": 0, + "slot": "307", + "type": "t_uint256", + "contract": "PerpetualTranche", + "src": "contracts/PerpetualTranche.sol:153" + }, + { + "label": "maxTrancheMaturitySec", + "offset": 0, + "slot": "308", + "type": "t_uint256", + "contract": "PerpetualTranche", + "src": "contracts/PerpetualTranche.sol:157" + }, + { + "label": "_matureValueTargetPerc_DEPRECATED", + "offset": 0, + "slot": "309", + "type": "t_uint256", + "contract": "PerpetualTranche", + "src": "contracts/PerpetualTranche.sol:164" + }, + { + "label": "maxSupply", + "offset": 0, + "slot": "310", + "type": "t_uint256", + "contract": "PerpetualTranche", + "src": "contracts/PerpetualTranche.sol:167" + }, + { + "label": "maxMintAmtPerTranche", + "offset": 0, + "slot": "311", + "type": "t_uint256", + "contract": "PerpetualTranche", + "src": "contracts/PerpetualTranche.sol:170" + }, + { + "label": "mintedSupplyPerTranche", + "offset": 0, + "slot": "312", + "type": "t_mapping(t_contract(ITranche)11995,t_uint256)", + "contract": "PerpetualTranche", + "src": "contracts/PerpetualTranche.sol:173" + }, + { + "label": "_appliedDiscounts_DEPRECATED", + "offset": 0, + "slot": "313", + "type": "t_mapping(t_contract(IERC20Upgradeable)1205,t_uint256)", + "contract": "PerpetualTranche", + "src": "contracts/PerpetualTranche.sol:179" + }, + { + "label": "_reserves", + "offset": 0, + "slot": "314", + "type": "t_struct(AddressSet)4926_storage", + "contract": "PerpetualTranche", + "src": "contracts/PerpetualTranche.sol:185" + }, + { + "label": "_matureTrancheBalance_DEPRECATED", + "offset": 0, + "slot": "316", + "type": "t_uint256", + "contract": "PerpetualTranche", + "src": "contracts/PerpetualTranche.sol:191" + }, + { + "label": "vault", + "offset": 0, + "slot": "317", + "type": "t_contract(IRolloverVault)11692", + "contract": "PerpetualTranche", + "src": "contracts/PerpetualTranche.sol:199" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)45_storage": { + "label": "uint256[45]", + "numberOfBytes": "1440" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_contract(IBondController)11968": { + "label": "contract IBondController", + "numberOfBytes": "20" + }, + "t_contract(IBondIssuer)11341": { + "label": "contract IBondIssuer", + "numberOfBytes": "20" + }, + "t_contract(IERC20Upgradeable)1205": { + "label": "contract IERC20Upgradeable", + "numberOfBytes": "20" + }, + "t_contract(IFeePolicy)11421": { + "label": "contract IFeePolicy", + "numberOfBytes": "20" + }, + "t_contract(IRolloverVault)11692": { + "label": "contract IRolloverVault", + "numberOfBytes": "20" + }, + "t_contract(ITranche)11995": { + "label": "contract ITranche", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_uint256)": { + "label": "mapping(address => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_uint256)": { + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_contract(IERC20Upgradeable)1205,t_uint256)": { + "label": "mapping(contract IERC20Upgradeable => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_contract(ITranche)11995,t_uint256)": { + "label": "mapping(contract ITranche => uint256)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(AddressSet)4926_storage": { + "label": "struct EnumerableSetUpgradeable.AddressSet", + "members": [ + { + "label": "_inner", + "type": "t_struct(Set)4611_storage", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Set)4611_storage": { + "label": "struct EnumerableSetUpgradeable.Set", + "members": [ + { + "label": "_values", + "type": "t_array(t_bytes32)dyn_storage", + "offset": 0, + "slot": "0" + }, + { + "label": "_indexes", + "type": "t_mapping(t_bytes32,t_uint256)", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } + }, + "31d602c9c7102be63744ee4f2dde2f008800ce0023c0791e98defe6ae2346024": { + "address": "0x16088740AeBfAbC96e41e8144Dbfffe41A40288a", + "txHash": "0x92c01b19a3167f090d4def0625f03346540af3fa28fb00ae2bdc888ab8508959", + "layout": { + "solcVersion": "0.8.20", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:40" + }, + { + "label": "_balances", + "offset": 0, + "slot": "51", + "type": "t_mapping(t_address,t_uint256)", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:40" + }, + { + "label": "_allowances", + "offset": 0, + "slot": "52", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:42" + }, + { + "label": "_totalSupply", + "offset": 0, + "slot": "53", + "type": "t_uint256", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:44" + }, + { + "label": "_name", + "offset": 0, + "slot": "54", + "type": "t_string_storage", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:46" + }, + { + "label": "_symbol", + "offset": 0, + "slot": "55", + "type": "t_string_storage", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:47" + }, + { + "label": "__gap", + "offset": 0, + "slot": "56", + "type": "t_array(t_uint256)45_storage", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:376" + }, + { + "label": "__gap", + "offset": 0, + "slot": "101", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC20BurnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol:51" + }, + { + "label": "_owner", + "offset": 0, + "slot": "151", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "152", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" + }, + { + "label": "_paused", + "offset": 0, + "slot": "201", + "type": "t_bool", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:29" + }, + { + "label": "__gap", + "offset": 0, + "slot": "202", + "type": "t_array(t_uint256)49_storage", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:116" + }, + { + "label": "_status", + "offset": 0, + "slot": "251", + "type": "t_uint256", + "contract": "ReentrancyGuardUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:38" + }, + { + "label": "__gap", + "offset": 0, + "slot": "252", + "type": "t_array(t_uint256)49_storage", + "contract": "ReentrancyGuardUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:88" + }, + { + "label": "underlying", + "offset": 0, + "slot": "301", + "type": "t_contract(IERC20Upgradeable)1205", + "contract": "RolloverVault", + "src": "contracts/RolloverVault.sol:107" + }, + { + "label": "_deployed", + "offset": 0, + "slot": "302", + "type": "t_struct(AddressSet)4926_storage", + "contract": "RolloverVault", + "src": "contracts/RolloverVault.sol:111" + }, + { + "label": "minDeploymentAmt", + "offset": 0, + "slot": "304", + "type": "t_uint256", + "contract": "RolloverVault", + "src": "contracts/RolloverVault.sol:119" + }, + { + "label": "perp", + "offset": 0, + "slot": "305", + "type": "t_contract(IPerpetualTranche)11641", + "contract": "RolloverVault", + "src": "contracts/RolloverVault.sol:122" + }, + { + "label": "feePolicy", + "offset": 0, + "slot": "306", + "type": "t_contract(IFeePolicy)11421", + "contract": "RolloverVault", + "src": "contracts/RolloverVault.sol:128" + }, + { + "label": "keeper", + "offset": 0, + "slot": "307", + "type": "t_address", + "contract": "RolloverVault", + "src": "contracts/RolloverVault.sol:133" + }, + { + "label": "minUnderlyingBal", + "offset": 0, + "slot": "308", + "type": "t_uint256", + "contract": "RolloverVault", + "src": "contracts/RolloverVault.sol:139" + }, + { + "label": "minUnderlyingPerc", + "offset": 0, + "slot": "309", + "type": "t_uint256", + "contract": "RolloverVault", + "src": "contracts/RolloverVault.sol:144" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)45_storage": { + "label": "uint256[45]", + "numberOfBytes": "1440" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_contract(IERC20Upgradeable)1205": { + "label": "contract IERC20Upgradeable", + "numberOfBytes": "20" + }, + "t_contract(IFeePolicy)11421": { + "label": "contract IFeePolicy", + "numberOfBytes": "20" + }, + "t_contract(IPerpetualTranche)11641": { + "label": "contract IPerpetualTranche", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_uint256)": { + "label": "mapping(address => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_uint256)": { + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(AddressSet)4926_storage": { + "label": "struct EnumerableSetUpgradeable.AddressSet", + "members": [ + { + "label": "_inner", + "type": "t_struct(Set)4611_storage", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Set)4611_storage": { + "label": "struct EnumerableSetUpgradeable.Set", + "members": [ + { + "label": "_values", + "type": "t_array(t_bytes32)dyn_storage", + "offset": 0, + "slot": "0" + }, + { + "label": "_indexes", + "type": "t_mapping(t_bytes32,t_uint256)", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } + } + } +} diff --git a/spot-contracts/README.md b/spot-contracts/README.md index cbc14c8c..41fb3ad9 100644 --- a/spot-contracts/README.md +++ b/spot-contracts/README.md @@ -25,12 +25,12 @@ yarn test ### Testnets -There is a testnet deployment on Goerli. +There is a testnet deployment on Sepolia. -- SPOT ERC-20 Token: [0x95014Bc18F82a98CFAA3253fbD3184125A01f848](https://goerli.etherscan.io//address/0x95014Bc18F82a98CFAA3253fbD3184125A01f848) -- Bond issuer: [0xbC060a1EbEC5eC869C4D51d4563244d4a223D307](https://goerli.etherscan.io//address/0xbC060a1EbEC5eC869C4D51d4563244d4a223D307) -- Router: [0x5e902bdCC408550b4BD612678bE2d57677664Dc9](https://goerli.etherscan.io//address/0x5e902bdCC408550b4BD612678bE2d57677664Dc9) -- RolloverVault: [0xca36B64BEbdf141623911987b93767dcA4bF6F1f](https://goerli.etherscan.io//address/0xca36B64BEbdf141623911987b93767dcA4bF6F1f) +- SPOT ERC-20 Token: [0xdcCef9065876fD654bAddeBAa778FDA43E0bfC1F](https://sepolia.etherscan.io//address/0xdcCef9065876fD654bAddeBAa778FDA43E0bfC1F) +- Bond issuer: [0x3838C8d4D092d40Cb27DD22Dafc6E1A81ea2DB60](https://sepolia.etherscan.io//address/0x3838C8d4D092d40Cb27DD22Dafc6E1A81ea2DB60) +- Router: [0x5B59915E5754C62C40Ba5e7467382ced958F8559](https://sepolia.etherscan.io//address/0x5B59915E5754C62C40Ba5e7467382ced958F8559) +- RolloverVault: [0x107614c6602A8e602952Da107B8fE62b5Ab13b04](https://sepolia.etherscan.io//address/0x107614c6602A8e602952Da107B8fE62b5Ab13b04) ## Contribute diff --git a/spot-contracts/contracts/BondIssuer.sol b/spot-contracts/contracts/BondIssuer.sol index 9196c52f..7b983471 100644 --- a/spot-contracts/contracts/BondIssuer.sol +++ b/spot-contracts/contracts/BondIssuer.sol @@ -32,12 +32,10 @@ contract BondIssuer is IBondIssuer, OwnableUpgradeable { uint256 private constant TRANCHE_RATIO_GRANULARITY = 1000; /// @notice Address of the bond factory. - // solhint-disable-next-line immutable-vars-naming - IBondFactory public immutable bondFactory; + IBondFactory public bondFactory; /// @notice The underlying rebasing token used for tranching. - // solhint-disable-next-line immutable-vars-naming - address public immutable collateral; + address public collateral; /// @notice The maximum maturity duration for the issued bonds. /// @dev In practice, bonds issued by this issuer won't have a constant duration as @@ -71,12 +69,9 @@ contract BondIssuer is IBondIssuer, OwnableUpgradeable { /// @notice The timestamp when the issue window opened during the last issue. uint256 public lastIssueWindowTimestamp; - /// @notice Contract constructor - /// @param bondFactory_ The bond factory reference. - /// @param collateral_ The address of the collateral ERC-20. - constructor(IBondFactory bondFactory_, address collateral_) { - bondFactory = bondFactory_; - collateral = collateral_; + /// @custom:oz-upgrades-unsafe-allow constructor + constructor() { + _disableInitializers(); } /// @notice Contract initializer. @@ -85,12 +80,16 @@ contract BondIssuer is IBondIssuer, OwnableUpgradeable { /// @param minIssueTimeIntervalSec_ The minimum time between successive issues. /// @param issueWindowOffsetSec_ The issue window offset. function init( + IBondFactory bondFactory_, + address collateral_, uint256 maxMaturityDuration_, uint256[] memory trancheRatios_, uint256 minIssueTimeIntervalSec_, uint256 issueWindowOffsetSec_ - ) public initializer { + ) external initializer { __Ownable_init(); + bondFactory = bondFactory_; + collateral = collateral_; updateMaxMaturityDuration(maxMaturityDuration_); updateTrancheRatios(trancheRatios_); updateIssuanceTimingConfig(minIssueTimeIntervalSec_, issueWindowOffsetSec_); @@ -107,11 +106,11 @@ contract BondIssuer is IBondIssuer, OwnableUpgradeable { function updateTrancheRatios(uint256[] memory trancheRatios_) public onlyOwner { trancheRatios = trancheRatios_; uint256 ratioSum; - for (uint8 i = 0; i < trancheRatios_.length; i++) { + uint8 numTranches = uint8(trancheRatios_.length); + for (uint8 i = 0; i < numTranches; ++i) { ratioSum += trancheRatios_[i]; } - - if (ratioSum > TRANCHE_RATIO_GRANULARITY) { + if (ratioSum != TRANCHE_RATIO_GRANULARITY) { revert UnacceptableTrancheRatios(); } } diff --git a/spot-contracts/contracts/FeePolicy.sol b/spot-contracts/contracts/FeePolicy.sol index 6d5d4000..3ae82605 100644 --- a/spot-contracts/contracts/FeePolicy.sol +++ b/spot-contracts/contracts/FeePolicy.sol @@ -59,17 +59,23 @@ contract FeePolicy is IFeePolicy, OwnableUpgradeable { // https://github.com/buttonwood-protocol/tranche/blob/main/contracts/BondController.sol uint256 private constant TRANCHE_RATIO_GRANULARITY = 1000; - /// @dev The returned fee percentages are fixed point numbers with {DECIMALS} places. - /// The decimals should line up with value expected by consumer (perp, vault). + /// @notice The returned fee percentages are fixed point numbers with {DECIMALS} places. + /// @dev The decimals should line up with value expected by consumer (perp, vault). /// NOTE: 10**DECIMALS => 100% or 1.0 uint8 public constant DECIMALS = 8; - uint256 public constant ONE = (1 * 10 ** DECIMALS); // 1.0 or 100% - /// @dev SIGMOID_BOUND is set to 1%, i.e) the rollover fee can be at most 1% on either direction. - uint256 public constant SIGMOID_BOUND = ONE / 100; // 0.01 or 1% + /// @notice Fixed point representation of 1.0 or 100%. + uint256 public constant ONE = (1 * 10 ** DECIMALS); - uint256 public constant TARGET_SR_LOWER_BOUND = (ONE * 75) / 100; // 0.75 or 75% - uint256 public constant TARGET_SR_UPPER_BOUND = 2 * ONE; // 2.0 or 200% + /// @notice Sigmoid asymptote bound. + /// @dev Set to 0.01 or 1%, i.e) the rollover fee can be at most 1% on either direction. + uint256 public constant SIGMOID_BOUND = ONE / 100; + + /// @notice Target subscription ratio lower bound, 0.75 or 75%. + uint256 public constant TARGET_SR_LOWER_BOUND = (ONE * 75) / 100; + + /// @notice Target subscription ratio higher bound, 2.0 or 200%. + uint256 public constant TARGET_SR_UPPER_BOUND = 2 * ONE; //----------------------------------------------------------------------------- /// @notice The target subscription ratio i.e) the normalization factor. @@ -111,11 +117,6 @@ contract FeePolicy is IFeePolicy, OwnableUpgradeable { //----------------------------------------------------------------------------- // Vault fee parameters - /// @notice The fixed amount vault fee charged during each deployment. - /// @dev Denominated in the underlying collateral asset and - /// Paid by the vault note holders to the system owner. - uint256 public vaultDeploymentFee; - /// @notice The percentage fee charged on minting vault notes. uint256 public vaultMintFeePerc; @@ -130,8 +131,13 @@ contract FeePolicy is IFeePolicy, OwnableUpgradeable { //----------------------------------------------------------------------------- + /// @custom:oz-upgrades-unsafe-allow constructor + constructor() { + _disableInitializers(); + } + /// @notice Contract initializer. - function init() public initializer { + function init() external initializer { __Ownable_init(); // initializing mint/burn fees to zero @@ -139,7 +145,6 @@ contract FeePolicy is IFeePolicy, OwnableUpgradeable { perpBurnFeePerc = 0; vaultMintFeePerc = 0; vaultBurnFeePerc = 0; - vaultDeploymentFee = 0; // initializing swap fees to 100%, to disable swapping initially vaultUnderlyingToPerpSwapFeePerc = ONE; @@ -234,12 +239,6 @@ contract FeePolicy is IFeePolicy, OwnableUpgradeable { vaultBurnFeePerc = vaultBurnFeePerc_; } - /// @notice Updates the vault's deployment fee parameters. - /// @param vaultDeploymentFee_ The new deployment fee denominated in the underlying tokens. - function updateVaultDeploymentFees(uint256 vaultDeploymentFee_) external onlyOwner { - vaultDeploymentFee = vaultDeploymentFee_; - } - /// @notice Updates the vault's share of the underlying to perp swap fee. /// @param feePerc The new fee percentage. function updateVaultUnderlyingToPerpSwapFeePerc(uint256 feePerc) external onlyOwner { @@ -263,14 +262,14 @@ contract FeePolicy is IFeePolicy, OwnableUpgradeable { /// @inheritdoc IFeePolicy /// @dev Minting perps reduces system dr, i.e) drPost < drPre. - function computePerpMintFeePerc(uint256 drPre, uint256 drPost) public view override returns (uint256) { - return _stepFnFeePerc(drPost, drPre, perpMintFeePerc, 0); + function computePerpMintFeePerc() public view override returns (uint256) { + return perpMintFeePerc; } /// @inheritdoc IFeePolicy /// @dev Burning perps increases system dr, i.e) drPost > drPre. - function computePerpBurnFeePerc(uint256 drPre, uint256 drPost) public view override returns (uint256) { - return _stepFnFeePerc(drPre, drPost, 0, perpBurnFeePerc); + function computePerpBurnFeePerc() public view override returns (uint256) { + return perpBurnFeePerc; } /// @inheritdoc IFeePolicy @@ -287,46 +286,35 @@ contract FeePolicy is IFeePolicy, OwnableUpgradeable { /// @inheritdoc IFeePolicy /// @dev Minting vault notes increases system dr, i.e) drPost > drPre. - function computeVaultMintFeePerc(uint256 drPre, uint256 drPost) external view override returns (uint256) { - return _stepFnFeePerc(drPre, drPost, 0, vaultMintFeePerc); + function computeVaultMintFeePerc() external view override returns (uint256) { + return vaultMintFeePerc; } /// @inheritdoc IFeePolicy - function computeVaultBurnFeePerc(uint256 /*drPre*/, uint256 /*drPost*/) external view override returns (uint256) { + function computeVaultBurnFeePerc() external view override returns (uint256) { return vaultBurnFeePerc; } - /// @inheritdoc IFeePolicy - function computeVaultDeploymentFee() external view override returns (uint256) { - return vaultDeploymentFee; - } - /// @inheritdoc IFeePolicy /// @dev Swapping by minting perps reduces system dr, i.e) drPost < drPre. - function computeUnderlyingToPerpSwapFeePercs( - uint256 drPre, + function computeUnderlyingToPerpVaultSwapFeePerc( + uint256 /*drPre*/, uint256 drPost - ) external view override returns (uint256, uint256) { + ) external view override returns (uint256) { // When the after op deviation ratio is below the bound, // swapping is disabled. (fees are set to 100%) - return ( - computePerpMintFeePerc(drPre, drPost), - (drPost < deviationRatioBoundLower ? ONE : vaultUnderlyingToPerpSwapFeePerc) - ); + return (drPost < deviationRatioBoundLower ? ONE : vaultUnderlyingToPerpSwapFeePerc); } /// @inheritdoc IFeePolicy /// @dev Swapping by burning perps increases system dr, i.e) drPost > drPre. - function computePerpToUnderlyingSwapFeePercs( - uint256 drPre, + function computePerpToUnderlyingVaultSwapFeePerc( + uint256 /*drPre*/, uint256 drPost - ) external view override returns (uint256, uint256) { + ) external view override returns (uint256) { // When the after op deviation ratio is above the bound, // swapping is disabled. (fees are set to 100%) - return ( - computePerpBurnFeePerc(drPre, drPost), - (drPost > deviationRatioBoundUpper ? ONE : vaultPerpToUnderlyingSwapFeePerc) - ); + return (drPost > deviationRatioBoundUpper ? ONE : vaultPerpToUnderlyingSwapFeePerc); } /// @inheritdoc IFeePolicy @@ -336,31 +324,8 @@ contract FeePolicy is IFeePolicy, OwnableUpgradeable { /// @inheritdoc IFeePolicy function computeDeviationRatio(SubscriptionParams memory s) public view returns (uint256) { - return computeDeviationRatio(s.perpTVL, s.vaultTVL, s.seniorTR); - } - - /// @inheritdoc IFeePolicy - function computeDeviationRatio(uint256 perpTVL, uint256 vaultTVL, uint256 seniorTR) public view returns (uint256) { // NOTE: We assume that perp's TVL and vault's TVL values have the same base denomination. - uint256 juniorTR = TRANCHE_RATIO_GRANULARITY - seniorTR; - return (vaultTVL * seniorTR).mulDiv(ONE, (perpTVL * juniorTR)).mulDiv(ONE, targetSubscriptionRatio); - } - - /// @dev Computes step function fee perc, with a dr cutoff at 1.0. Expects drL < drU. - function _stepFnFeePerc(uint256 drL, uint256 drU, uint256 f1, uint256 f2) private pure returns (uint256) { - // When drU is below the cutoff, we use f1. - if (drU <= ONE) { - return f1; - } - // When drL is above the cutoff, we use f2. - else if (drL > ONE) { - return f2; - } - // Otherwise we use f1 and f2 partially. - else { - uint256 deltaDR = drU - drL; - return (f1.mulDiv(ONE - drL, deltaDR, MathUpgradeable.Rounding.Up) + - f2.mulDiv(drU - ONE, deltaDR, MathUpgradeable.Rounding.Up)); - } + uint256 juniorTR = TRANCHE_RATIO_GRANULARITY - s.seniorTR; + return (s.vaultTVL * s.seniorTR).mulDiv(ONE, (s.perpTVL * juniorTR)).mulDiv(ONE, targetSubscriptionRatio); } } diff --git a/spot-contracts/contracts/PerpetualTranche.sol b/spot-contracts/contracts/PerpetualTranche.sol index e660ba8f..3c82d122 100644 --- a/spot-contracts/contracts/PerpetualTranche.sol +++ b/spot-contracts/contracts/PerpetualTranche.sol @@ -209,7 +209,7 @@ contract PerpetualTranche is /// @dev Throws if called by any account other than the keeper. modifier onlyKeeper() { - if (keeper != _msgSender()) { + if (keeper != msg.sender) { revert UnauthorizedCall(); } _; @@ -217,7 +217,7 @@ contract PerpetualTranche is /// @dev Throws if called not called by vault. modifier onlyVault() { - if (address(vault) != _msgSender()) { + if (address(vault) != msg.sender) { revert UnauthorizedCall(); } _; @@ -226,6 +226,11 @@ contract PerpetualTranche is //-------------------------------------------------------------------------- // Construction & Initialization + /// @custom:oz-upgrades-unsafe-allow constructor + constructor() { + _disableInitializers(); + } + /// @notice Contract state initialization. /// @param name ERC-20 Name of the Perp token. /// @param symbol ERC-20 Symbol of the Perp token. @@ -238,7 +243,7 @@ contract PerpetualTranche is IERC20Upgradeable collateral_, IBondIssuer bondIssuer_, IFeePolicy feePolicy_ - ) public initializer { + ) external initializer { __ERC20_init(name, symbol); __ERC20Burnable_init(); __Ownable_init(); @@ -262,18 +267,18 @@ contract PerpetualTranche is //-------------------------------------------------------------------------- // ADMIN only methods + /// @notice Updates the reference to the rollover vault. + /// @param vault_ The address of the new vault. + function updateVault(IRolloverVault vault_) external onlyOwner { + vault = vault_; + } + /// @notice Updates the reference to the keeper. /// @param keeper_ The address of the new keeper. function updateKeeper(address keeper_) public onlyOwner { keeper = keeper_; } - /// @notice Updates the reference to the rollover vault. - /// @param vault_ The address of the new vault. - function updateVault(IRolloverVault vault_) public onlyOwner { - vault = vault_; - } - /// @notice Update the reference to the bond issuer contract. /// @param bondIssuer_ New bond issuer address. function updateBondIssuer(IBondIssuer bondIssuer_) public onlyOwner { @@ -334,13 +339,13 @@ contract PerpetualTranche is /// @notice Pauses deposits, withdrawals and rollovers. /// @dev ERC-20 functions, like transfers will always remain operational. - function pause() public onlyKeeper { + function pause() external onlyKeeper { _pause(); } /// @notice Unpauses deposits, withdrawals and rollovers. /// @dev ERC-20 functions, like transfers will always remain operational. - function unpause() public onlyKeeper { + function unpause() external onlyKeeper { _unpause(); } @@ -364,7 +369,7 @@ contract PerpetualTranche is } // transfers tranche tokens from the sender to the reserve - _transferIntoReserve(msg.sender, trancheIn, trancheInAmt); + _transferIntoReserve(trancheIn, trancheInAmt); // mints perp tokens to the sender _mint(msg.sender, perpAmtMint); @@ -393,9 +398,10 @@ contract PerpetualTranche is _burn(msg.sender, perpAmtBurnt); // transfers reserve tokens out - for (uint8 i = 0; i < tokensOut.length; i++) { + uint8 tokensOutCount = uint8(tokensOut.length); + for (uint8 i = 0; i < tokensOutCount; ++i) { if (tokensOut[i].amount > 0) { - _transferOutOfReserve(msg.sender, tokensOut[i].token, tokensOut[i].amount); + _transferOutOfReserve(tokensOut[i].token, tokensOut[i].amount); } } @@ -423,10 +429,10 @@ contract PerpetualTranche is } // transfers tranche tokens from the sender to the reserve - _transferIntoReserve(msg.sender, trancheIn, r.trancheInAmt); + _transferIntoReserve(trancheIn, r.trancheInAmt); // transfers tranche from the reserve to the sender - _transferOutOfReserve(msg.sender, tokenOut, r.tokenOutAmt); + _transferOutOfReserve(tokenOut, r.tokenOutAmt); return r; } @@ -499,7 +505,7 @@ contract PerpetualTranche is } // Iterating through the reserve to find tranches that are ready to be rolled out. - for (uint8 i = 1; i < reserveCount; i++) { + for (uint8 i = 1; i < reserveCount; ++i) { IERC20Upgradeable token = _reserveAt(i); if (_isTimeForRollout(ITranche(address(token)))) { activeRolloverTokens[i] = token; @@ -510,7 +516,7 @@ contract PerpetualTranche is // We recreate a smaller array with just the tokens up for rollover. IERC20Upgradeable[] memory rolloverTokens = new IERC20Upgradeable[](numTokensUpForRollover); uint8 j = 0; - for (uint8 i = 0; i < reserveCount; i++) { + for (uint8 i = 0; i < reserveCount; ++i) { if (address(activeRolloverTokens[i]) != address(0)) { rolloverTokens[j++] = activeRolloverTokens[i]; } @@ -530,6 +536,9 @@ contract PerpetualTranche is ITranche trancheIn, uint256 trancheInAmt ) external override afterStateUpdate returns (uint256) { + if (!_isDepositTranche(trancheIn)) { + revert UnexpectedAsset(); + } return _computeMintAmt(trancheIn, trancheInAmt); } @@ -546,6 +555,9 @@ contract PerpetualTranche is IERC20Upgradeable tokenOut, uint256 trancheInAmtAvailable ) external override afterStateUpdate returns (RolloverData memory) { + if (!_isAcceptableRollover(trancheIn, tokenOut)) { + revert UnacceptableRollover(); + } return _computeRolloverAmt(trancheIn, tokenOut, trancheInAmtAvailable); } @@ -626,17 +638,17 @@ contract PerpetualTranche is //-------------------------------------------------------------------------- // Private methods - /// @dev Transfers tokens from the given address to self and updates the reserve set. + /// @dev Transfers tokens from the caller (msg.sender) and updates the reserve set. /// @return Reserve's token balance after transfer in. - function _transferIntoReserve(address from, IERC20Upgradeable token, uint256 trancheAmt) private returns (uint256) { - token.safeTransferFrom(from, address(this), trancheAmt); + function _transferIntoReserve(IERC20Upgradeable token, uint256 trancheAmt) private returns (uint256) { + token.safeTransferFrom(msg.sender, address(this), trancheAmt); return _syncReserve(token); } - /// @dev Transfers tokens from self into the given address and updates the reserve set. + /// @dev Transfers tokens from self into the caller (msg.sender) and updates the reserve set. /// @return Reserve's token balance after transfer out. - function _transferOutOfReserve(address to, IERC20Upgradeable token, uint256 tokenAmt) private returns (uint256) { - token.safeTransfer(to, tokenAmt); + function _transferOutOfReserve(IERC20Upgradeable token, uint256 tokenAmt) private returns (uint256) { + token.safeTransfer(msg.sender, tokenAmt); return _syncReserve(token); } @@ -677,25 +689,14 @@ contract PerpetualTranche is //----------------------------------------------------------------------------- // We charge no mint fee when interacting with other callers within the system. - uint256 feePerc = 0; - uint256 perpTVL = 0; - if (!_isProtocolCaller()) { - SubscriptionParams memory s = _querySubscriptionState(); - feePerc = feePolicy.computePerpMintFeePerc( - feePolicy.computeDeviationRatio(s), - feePolicy.computeDeviationRatio(s.perpTVL + valueIn, s.vaultTVL, s.seniorTR) - ); - perpTVL = s.perpTVL; - } else { - perpTVL = _reserveValue(); - } + uint256 feePerc = _isProtocolCaller() ? 0 : feePolicy.computePerpMintFeePerc(); //----------------------------------------------------------------------------- // Compute mint amt uint256 perpSupply = totalSupply(); uint256 perpAmtMint = valueIn; if (perpSupply > 0) { - perpAmtMint = perpAmtMint.mulDiv(perpSupply, perpTVL); + perpAmtMint = perpAmtMint.mulDiv(perpSupply, _reserveValue()); } // The mint fees are settled by simply minting fewer perps. @@ -712,25 +713,13 @@ contract PerpetualTranche is //----------------------------------------------------------------------------- // We charge no burn fee when interacting with other parts of the system. - uint256 feePerc = 0; - - if (!_isProtocolCaller()) { - SubscriptionParams memory s = _querySubscriptionState(); - feePerc = feePolicy.computePerpBurnFeePerc( - feePolicy.computeDeviationRatio(s), - feePolicy.computeDeviationRatio( - s.perpTVL.mulDiv(perpSupply - perpAmtBurnt, perpSupply), - s.vaultTVL, - s.seniorTR - ) - ); - } + uint256 feePerc = _isProtocolCaller() ? 0 : feePolicy.computePerpBurnFeePerc(); //----------------------------------------------------------------------------- // Compute redemption amounts uint8 reserveCount = uint8(_reserves.length()); TokenAmount[] memory reserveTokens = new TokenAmount[](reserveCount); - for (uint8 i = 0; i < reserveCount; i++) { + for (uint8 i = 0; i < reserveCount; ++i) { IERC20Upgradeable tokenOut = _reserveAt(i); reserveTokens[i] = TokenAmount({ token: tokenOut, @@ -758,7 +747,13 @@ contract PerpetualTranche is // between `trancheInAmt` and `tokenOutAmt`. // int256 feePerc = feePolicy.computePerpRolloverFeePerc( - feePolicy.computeDeviationRatio(_querySubscriptionState()) + feePolicy.computeDeviationRatio( + SubscriptionParams({ + perpTVL: _reserveValue(), + vaultTVL: vault.getTVL(), + seniorTR: _depositBond.getSeniorTrancheRatio() + }) + ) ); //----------------------------------------------------------------------------- @@ -910,23 +905,13 @@ contract PerpetualTranche is return _reserves.contains(address(token)); } - /// @dev Queries the current subscription state of the perp and vault systems. - function _querySubscriptionState() private view returns (SubscriptionParams memory) { - return - SubscriptionParams({ - perpTVL: _reserveValue(), - vaultTVL: IRolloverVault(vault).getTVL(), - seniorTR: _depositBond.getSeniorTrancheRatio() - }); - } - /// @dev Calculates the total value of all the tranches in the reserve. /// Value of each reserve tranche is denominated in the underlying collateral. function _reserveValue() private view returns (uint256) { IERC20Upgradeable underlying_ = _reserveAt(0); uint256 totalVal = underlying_.balanceOf(address(this)); uint8 reserveCount = uint8(_reserves.length()); - for (uint8 i = 1; i < reserveCount; i++) { + for (uint8 i = 1; i < reserveCount; ++i) { ITranche tranche = ITranche(address(_reserveAt(i))); IBondController parentBond = IBondController(tranche.bond()); totalVal += _computeReserveTrancheValue( @@ -974,6 +959,6 @@ contract PerpetualTranche is /// @dev Checks if caller is another module within the protocol. /// If so, we do not charge mint/burn for internal operations. function _isProtocolCaller() private view returns (bool) { - return (_msgSender() == address(vault)); + return (msg.sender == address(vault)); } } diff --git a/spot-contracts/contracts/RolloverVault.sol b/spot-contracts/contracts/RolloverVault.sol index 29774019..a39f80eb 100644 --- a/spot-contracts/contracts/RolloverVault.sol +++ b/spot-contracts/contracts/RolloverVault.sol @@ -148,7 +148,7 @@ contract RolloverVault is /// @dev Throws if called by any account other than the keeper. modifier onlyKeeper() { - if (_msgSender() != keeper) { + if (msg.sender != keeper) { revert UnauthorizedCall(); } _; @@ -157,6 +157,11 @@ contract RolloverVault is //-------------------------------------------------------------------------- // Construction & Initialization + /// @custom:oz-upgrades-unsafe-allow constructor + constructor() { + _disableInitializers(); + } + /// @notice Contract state initialization. /// @param name ERC-20 Name of the vault token. /// @param symbol ERC-20 Symbol of the vault token. @@ -167,7 +172,7 @@ contract RolloverVault is string memory symbol, IPerpetualTranche perp_, IFeePolicy feePolicy_ - ) public initializer { + ) external initializer { // initialize dependencies __ERC20_init(name, symbol); __ERC20Burnable_init(); @@ -279,9 +284,6 @@ contract RolloverVault is IERC20Upgradeable underlying_ = underlying; IPerpetualTranche perp_ = perp; - // We first pay the protocol - _deductProtocolFee(underlying_); - // `minUnderlyingBal` worth of underlying liquidity is excluded from the usable balance uint256 usableBal = underlying_.balanceOf(address(this)); if (usableBal <= minUnderlyingBal) { @@ -315,7 +317,7 @@ contract RolloverVault is } // execute redemption on each deployed asset - for (uint8 i = 0; i < deployedCount_; i++) { + for (uint8 i = 0; i < deployedCount_; ++i) { ITranche tranche = ITranche(_deployed.at(i)); uint256 trancheBalance = tranche.balanceOf(address(this)); @@ -388,10 +390,10 @@ contract RolloverVault is } // transfer user assets in - underlying.safeTransferFrom(_msgSender(), address(this), underlyingAmtIn); + underlying.safeTransferFrom(msg.sender, address(this), underlyingAmtIn); // mint notes - _mint(_msgSender(), notes); + _mint(msg.sender, notes); // sync underlying _syncAsset(underlying); @@ -409,16 +411,17 @@ contract RolloverVault is TokenAmount[] memory redemptions = computeRedemptionAmts(notes); // burn notes - _burn(_msgSender(), notes); + _burn(msg.sender, notes); // transfer assets out - for (uint8 i = 0; i < redemptions.length; i++) { + uint8 redemptionsCount = uint8(redemptions.length); + for (uint8 i = 0; i < redemptionsCount; ++i) { if (redemptions[i].amount == 0) { continue; } // Transfer token share out - redemptions[i].token.safeTransfer(_msgSender(), redemptions[i].amount); + redemptions[i].token.safeTransfer(msg.sender, redemptions[i].amount); // sync balances, wkt i=0 is the underlying and remaining are tranches if (i == 0) { @@ -453,7 +456,7 @@ contract RolloverVault is } // transfer underlying in - underlying_.safeTransferFrom(_msgSender(), address(this), underlyingAmtIn); + underlying_.safeTransferFrom(msg.sender, address(this), underlyingAmtIn); // tranche and mint perps as needed _trancheAndMintPerps(perp_, underlying_, s.perpTVL, s.seniorTR, perpAmtOut + perpFeeAmtToBurn); @@ -464,7 +467,7 @@ contract RolloverVault is } // transfer remaining perps out to the user - IERC20Upgradeable(address(perp_)).safeTransfer(_msgSender(), perpAmtOut); + IERC20Upgradeable(address(perp_)).safeTransfer(msg.sender, perpAmtOut); // NOTE: In case this operation mints slightly more perps than that are required for the swap, // The vault continues to hold the perp dust until the subsequent `swapPerpsForUnderlying` or manual `recover(perp)`. @@ -495,7 +498,7 @@ contract RolloverVault is } // transfer perps in - IERC20Upgradeable(perp_).safeTransferFrom(_msgSender(), address(this), perpAmtIn); + IERC20Upgradeable(perp_).safeTransferFrom(msg.sender, address(this), perpAmtIn); // Pay perp's fee share by burning some of the transferred perps if (perpFeeAmtToBurn > 0) { @@ -506,7 +509,7 @@ contract RolloverVault is _meldPerps(perp_); // transfer underlying out - underlying_.safeTransfer(_msgSender(), underlyingAmtOut); + underlying_.safeTransfer(msg.sender, underlyingAmtOut); // Revert if vault liquidity is too low. _enforceUnderlyingBalAfterSwap(underlying_, s.vaultTVL); @@ -520,75 +523,6 @@ contract RolloverVault is //-------------------------------------------------------------------------- // External & Public methods - /// @inheritdoc IVault - function computeMintAmt(uint256 underlyingAmtIn) public returns (uint256) { - //----------------------------------------------------------------------------- - SubscriptionParams memory s = _querySubscriptionState(perp); - uint256 feePerc = feePolicy.computeVaultMintFeePerc( - feePolicy.computeDeviationRatio(s), - feePolicy.computeDeviationRatio(s.perpTVL, s.vaultTVL + underlyingAmtIn, s.seniorTR) - ); - //----------------------------------------------------------------------------- - - // Compute mint amt - uint256 noteSupply = totalSupply(); - uint256 notes = (noteSupply > 0) - ? noteSupply.mulDiv(underlyingAmtIn, getTVL()) - : (underlyingAmtIn * INITIAL_RATE); - - // The mint fees are settled by simply minting fewer vault notes. - notes = notes.mulDiv(FEE_ONE - feePerc, FEE_ONE); - return notes; - } - - /// @inheritdoc IVault - function computeRedemptionAmts(uint256 noteAmtBurnt) public returns (TokenAmount[] memory) { - uint256 noteSupply = totalSupply(); - - //----------------------------------------------------------------------------- - SubscriptionParams memory s = _querySubscriptionState(perp); - uint256 feePerc = feePolicy.computeVaultBurnFeePerc( - feePolicy.computeDeviationRatio(s), - feePolicy.computeDeviationRatio( - s.perpTVL, - s.vaultTVL.mulDiv(noteSupply - noteAmtBurnt, noteSupply), - s.seniorTR - ) - ); - //----------------------------------------------------------------------------- - uint8 assetCount_ = 1 + uint8(_deployed.length()); - - // aggregating vault assets to be redeemed - TokenAmount[] memory redemptions = new TokenAmount[](assetCount_); - - // underlying share to be redeemed - IERC20Upgradeable underlying_ = underlying; - redemptions[0] = TokenAmount({ - token: underlying_, - amount: underlying_.balanceOf(address(this)).mulDiv(noteAmtBurnt, noteSupply) - }); - redemptions[0].amount = redemptions[0].amount.mulDiv(FEE_ONE - feePerc, FEE_ONE); - - for (uint8 i = 1; i < assetCount_; i++) { - // tranche token share to be redeemed - IERC20Upgradeable token = IERC20Upgradeable(_deployed.at(i - 1)); - redemptions[i] = TokenAmount({ - token: token, - amount: token.balanceOf(address(this)).mulDiv(noteAmtBurnt, noteSupply) - }); - - // deduct redemption fee - redemptions[i].amount = redemptions[i].amount.mulDiv(FEE_ONE - feePerc, FEE_ONE); - - // in case the redemption amount is just dust, we skip - if (redemptions[i].amount < TRANCHE_DUST_AMT) { - redemptions[i].amount = 0; - } - } - - return redemptions; - } - /// @inheritdoc IRolloverVault function computeUnderlyingToPerpSwapAmt( uint256 underlyingAmtIn @@ -601,9 +535,12 @@ contract RolloverVault is //----------------------------------------------------------------------------- // When user swaps underlying for vault's perps -> perps are minted by the vault // We thus compute fees based on the post-mint subscription state. - (uint256 perpFeePerc, uint256 vaultFeePerc) = feePolicy.computeUnderlyingToPerpSwapFeePercs( + uint256 perpFeePerc = feePolicy.computePerpMintFeePerc(); + uint256 vaultFeePerc = feePolicy.computeUnderlyingToPerpVaultSwapFeePerc( feePolicy.computeDeviationRatio(s), - feePolicy.computeDeviationRatio(s.perpTVL + underlyingAmtIn, s.vaultTVL, s.seniorTR) + feePolicy.computeDeviationRatio( + SubscriptionParams({ perpTVL: s.perpTVL + underlyingAmtIn, vaultTVL: s.vaultTVL, seniorTR: s.seniorTR }) + ) ); //----------------------------------------------------------------------------- @@ -628,9 +565,16 @@ contract RolloverVault is //----------------------------------------------------------------------------- // When user swaps perps for vault's underlying -> perps are redeemed by the vault // We thus compute fees based on the post-burn subscription state. - (uint256 perpFeePerc, uint256 vaultFeePerc) = feePolicy.computePerpToUnderlyingSwapFeePercs( + uint256 perpFeePerc = feePolicy.computePerpBurnFeePerc(); + uint256 vaultFeePerc = feePolicy.computePerpToUnderlyingVaultSwapFeePerc( feePolicy.computeDeviationRatio(s), - feePolicy.computeDeviationRatio(s.perpTVL - underlyingAmtOut, s.vaultTVL, s.seniorTR) + feePolicy.computeDeviationRatio( + SubscriptionParams({ + perpTVL: s.perpTVL - underlyingAmtOut, + vaultTVL: s.vaultTVL, + seniorTR: s.seniorTR + }) + ) ); //----------------------------------------------------------------------------- @@ -646,6 +590,63 @@ contract RolloverVault is //-------------------------------------------------------------------------- // External & Public read methods + /// @inheritdoc IVault + function computeMintAmt(uint256 underlyingAmtIn) public view returns (uint256) { + //----------------------------------------------------------------------------- + uint256 feePerc = feePolicy.computeVaultMintFeePerc(); + //----------------------------------------------------------------------------- + + // Compute mint amt + uint256 noteSupply = totalSupply(); + uint256 notes = (noteSupply > 0) + ? noteSupply.mulDiv(underlyingAmtIn, getTVL()) + : (underlyingAmtIn * INITIAL_RATE); + + // The mint fees are settled by simply minting fewer vault notes. + notes = notes.mulDiv(FEE_ONE - feePerc, FEE_ONE); + return notes; + } + + /// @inheritdoc IVault + function computeRedemptionAmts(uint256 noteAmtBurnt) public view returns (TokenAmount[] memory) { + uint256 noteSupply = totalSupply(); + + //----------------------------------------------------------------------------- + uint256 feePerc = feePolicy.computeVaultBurnFeePerc(); + //----------------------------------------------------------------------------- + uint8 assetCount_ = 1 + uint8(_deployed.length()); + + // aggregating vault assets to be redeemed + TokenAmount[] memory redemptions = new TokenAmount[](assetCount_); + + // underlying share to be redeemed + IERC20Upgradeable underlying_ = underlying; + redemptions[0] = TokenAmount({ + token: underlying_, + amount: underlying_.balanceOf(address(this)).mulDiv(noteAmtBurnt, noteSupply) + }); + redemptions[0].amount = redemptions[0].amount.mulDiv(FEE_ONE - feePerc, FEE_ONE); + + for (uint8 i = 1; i < assetCount_; ++i) { + // tranche token share to be redeemed + IERC20Upgradeable token = IERC20Upgradeable(_deployed.at(i - 1)); + redemptions[i] = TokenAmount({ + token: token, + amount: token.balanceOf(address(this)).mulDiv(noteAmtBurnt, noteSupply) + }); + + // deduct redemption fee + redemptions[i].amount = redemptions[i].amount.mulDiv(FEE_ONE - feePerc, FEE_ONE); + + // in case the redemption amount is just dust, we skip + if (redemptions[i].amount < TRANCHE_DUST_AMT) { + redemptions[i].amount = 0; + } + } + + return redemptions; + } + /// @inheritdoc IVault /// @dev The total value is denominated in the underlying asset. function getTVL() public view override returns (uint256) { @@ -653,7 +654,8 @@ contract RolloverVault is uint256 totalValue = underlying.balanceOf(address(this)); // The deployed asset value denominated in the underlying - for (uint8 i = 0; i < _deployed.length(); i++) { + uint8 deployedCount_ = uint8(_deployed.length()); + for (uint8 i = 0; i < deployedCount_; ++i) { ITranche tranche = ITranche(_deployed.at(i)); uint256 balance = tranche.balanceOf(address(this)); if (balance > TRANCHE_DUST_AMT) { @@ -763,7 +765,8 @@ contract RolloverVault is TokenAmount[] memory tranchesRedeemed = perp_.redeem(perpBalance); // sync and meld perp's tranches - for (uint8 i = 1; i < tranchesRedeemed.length; i++) { + uint8 tranchesRedeemedCount = uint8(tranchesRedeemed.length); + for (uint8 i = 1; i < tranchesRedeemedCount; ++i) { ITranche tranche = ITranche(address(tranchesRedeemed[i].token)); // if possible, meld redeemed tranche with @@ -781,11 +784,6 @@ contract RolloverVault is uint256 seniorTR, uint256 perpAmtToMint ) private { - // Skip if mint amount is zero - if (perpAmtToMint <= 0) { - return; - } - // Tranche as needed IBondController depositBond = perp_.getDepositBond(); ITranche trancheIntoPerp = perp_.getDepositTranche(); @@ -814,11 +812,6 @@ contract RolloverVault is /// and receives tranche tokens in return. /// Performs some book-keeping to keep track of the vault's assets. function _tranche(IBondController bond, IERC20Upgradeable underlying_, uint256 underlyingAmt) private { - // Skip if amount is zero - if (underlyingAmt <= 0) { - return; - } - // Get bond tranches BondTranches memory bt = bond.getTranches(); @@ -856,7 +849,8 @@ contract RolloverVault is // with each of the perp's tokens available for rollovers and execute a rollover. // We continue to rollover till either the vault's senior tranche balance is exhausted or // there are no more tokens in perp available to be rolled-over. - for (uint256 i = 0; (i < rolloverTokens.length && trancheInAmtAvailable > 0); i++) { + uint8 rolloverTokensCount = uint8(rolloverTokens.length); + for (uint8 i = 0; (i < rolloverTokensCount && trancheInAmtAvailable > 0); ++i) { // tokenOutOfPerp is the reserve token coming out of perp into the vault IERC20Upgradeable tokenOutOfPerp = rolloverTokens[i]; @@ -915,11 +909,6 @@ contract RolloverVault is } } - // @dev Transfers a the set fixed fee amount of underlying tokens to the owner. - function _deductProtocolFee(IERC20Upgradeable underlying_) private { - underlying_.safeTransfer(owner(), feePolicy.computeVaultDeploymentFee()); - } - /// @dev Syncs balance and updates the deployed list based on the vault's token balance. function _syncDeployedAsset(IERC20Upgradeable token) private { uint256 balance = token.balanceOf(address(this)); diff --git a/spot-contracts/contracts/_interfaces/IFeePolicy.sol b/spot-contracts/contracts/_interfaces/IFeePolicy.sol index 27724913..5699611e 100644 --- a/spot-contracts/contracts/_interfaces/IFeePolicy.sol +++ b/spot-contracts/contracts/_interfaces/IFeePolicy.sol @@ -4,17 +4,13 @@ pragma solidity ^0.8.0; import { SubscriptionParams } from "./CommonTypes.sol"; interface IFeePolicy { - /// @param dr The current system deviation ratio. - /// @param dr_ The deviation ratio of the system after the operation is complete. /// @return The percentage of the mint perp tokens to be charged as fees, /// as a fixed-point number with {DECIMALS} decimal places. - function computePerpMintFeePerc(uint256 dr, uint256 dr_) external view returns (uint256); + function computePerpMintFeePerc() external view returns (uint256); - /// @param dr The current system deviation ratio. - /// @param dr_ The deviation ratio of the system after the operation is complete. /// @return The percentage of the burnt perp tokens to be charged as fees, /// as a fixed-point number with {DECIMALS} decimal places. - function computePerpBurnFeePerc(uint256 dr, uint256 dr_) external view returns (uint256); + function computePerpBurnFeePerc() external view returns (uint256); /// @param dr The current system deviation ratio. /// @return The applied exchange rate adjustment between tranches into perp and @@ -28,43 +24,25 @@ interface IFeePolicy { /// example) 99 tranchesIn for 100 tranchesOut function computePerpRolloverFeePerc(uint256 dr) external view returns (int256); - /// @param dr The current system deviation ratio. - /// @param dr_ The deviation ratio of the system after the operation is complete. /// @return The percentage of the mint vault note amount to be charged as fees, /// as a fixed-point number with {DECIMALS} decimal places. - function computeVaultMintFeePerc(uint256 dr, uint256 dr_) external view returns (uint256); + function computeVaultMintFeePerc() external view returns (uint256); - /// @param dr The current system deviation ratio. - /// @param dr_ The deviation ratio of the system after the operation is complete. /// @return The percentage of the burnt vault note amount to be charged as fees, /// as a fixed-point number with {DECIMALS} decimal places. - function computeVaultBurnFeePerc(uint256 dr, uint256 dr_) external view returns (uint256); - - /// @return The fixed amount fee charged by the vault during each deployment, - /// denominated in the underlying collateral asset. - function computeVaultDeploymentFee() external view returns (uint256); + function computeVaultBurnFeePerc() external view returns (uint256); /// @param dr The current system deviation ratio. /// @param dr_ The deviation ratio of the system after the operation is complete. - /// @return perpFeePerc The percentage of perp tokens out to be charged as swap fees by perp, - /// as a fixed-point numbers with {DECIMALS} decimal places. - /// @return vaultFeePerc The percentage of perp tokens out to be charged as swap fees by the vault, + /// @return The percentage of perp tokens out to be charged as swap fees by the vault, /// as a fixed-point numbers with {DECIMALS} decimal places. - function computeUnderlyingToPerpSwapFeePercs( - uint256 dr, - uint256 dr_ - ) external view returns (uint256 perpFeePerc, uint256 vaultFeePerc); + function computeUnderlyingToPerpVaultSwapFeePerc(uint256 dr, uint256 dr_) external view returns (uint256); /// @param dr The current system deviation ratio. /// @param dr_ The deviation ratio of the system after the operation is complete. - /// @return perpFeePerc The percentage of underlying tokens out to be charged as swap fees by perp, + /// @return The percentage of underlying tokens out to be charged as swap fees by the vault, /// as a fixed-point numbers with {DECIMALS} decimal places. - /// @return vaultFeePerc The percentage of underlying tokens out to be charged as swap fees by the vault, - /// as a fixed-point numbers with {DECIMALS} decimal places. - function computePerpToUnderlyingSwapFeePercs( - uint256 dr, - uint256 dr_ - ) external view returns (uint256 perpFeePerc, uint256 vaultFeePerc); + function computePerpToUnderlyingVaultSwapFeePerc(uint256 dr, uint256 dr_) external view returns (uint256); /// @return Number of decimals representing a multiplier of 1.0. So, 100% = 1*10**decimals. function decimals() external view returns (uint8); @@ -72,10 +50,4 @@ interface IFeePolicy { /// @param s The subscription parameters of both the perp and vault systems. /// @return The deviation ratio given the system subscription parameters. function computeDeviationRatio(SubscriptionParams memory s) external view returns (uint256); - - /// @param perpTVL The current TVL of perp denominated in the underlying. - /// @param vaultTVL The current TVL of the vault denominated in the underlying. - /// @param seniorTR The tranche ratio of seniors accepted by perp. - /// @return The deviation ratio given the system subscription parameters. - function computeDeviationRatio(uint256 perpTVL, uint256 vaultTVL, uint256 seniorTR) external view returns (uint256); } diff --git a/spot-contracts/contracts/test/HelpersTester.sol b/spot-contracts/contracts/_test/HelpersTester.sol similarity index 97% rename from spot-contracts/contracts/test/HelpersTester.sol rename to spot-contracts/contracts/_test/HelpersTester.sol index f0c7a419..b082b957 100644 --- a/spot-contracts/contracts/test/HelpersTester.sol +++ b/spot-contracts/contracts/_test/HelpersTester.sol @@ -21,15 +21,15 @@ contract HelpersTester { return b.secondsToMaturity(); } - function getTranches(IBondController b) public view returns (BondTranches memory bt) { + function getTranches(IBondController b) public view returns (BondTranches memory) { return b.getTranches(); } - function trancheAt(IBondController b, uint8 index) public view returns (ITranche t) { + function trancheAt(IBondController b, uint8 index) public view returns (ITranche) { return b.trancheAt(index); } - function getSeniorTranche(IBondController b) public view returns (ITranche t) { + function getSeniorTranche(IBondController b) public view returns (ITranche) { return b.getSeniorTranche(); } diff --git a/spot-contracts/contracts/test/MathTester.sol b/spot-contracts/contracts/_test/MathTester.sol similarity index 100% rename from spot-contracts/contracts/test/MathTester.sol rename to spot-contracts/contracts/_test/MathTester.sol diff --git a/spot-contracts/contracts/test/mocks/MockERC20.sol b/spot-contracts/contracts/_test/mocks/MockERC20.sol similarity index 100% rename from spot-contracts/contracts/test/mocks/MockERC20.sol rename to spot-contracts/contracts/_test/mocks/MockERC20.sol diff --git a/spot-contracts/contracts/test/mocks/MockTranche.sol b/spot-contracts/contracts/_test/mocks/MockTranche.sol similarity index 89% rename from spot-contracts/contracts/test/mocks/MockTranche.sol rename to spot-contracts/contracts/_test/mocks/MockTranche.sol index 310c3077..9e19deb0 100644 --- a/spot-contracts/contracts/test/mocks/MockTranche.sol +++ b/spot-contracts/contracts/_test/mocks/MockTranche.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: BUSL-1.1 -pragma solidity ^0.8.15; +pragma solidity ^0.8.20; import { MockERC20 } from "./MockERC20.sol"; diff --git a/spot-contracts/contracts/test/mocks/MockVault.sol b/spot-contracts/contracts/_test/mocks/MockVault.sol similarity index 97% rename from spot-contracts/contracts/test/mocks/MockVault.sol rename to spot-contracts/contracts/_test/mocks/MockVault.sol index 1e9649f9..1c9c8415 100644 --- a/spot-contracts/contracts/test/mocks/MockVault.sol +++ b/spot-contracts/contracts/_test/mocks/MockVault.sol @@ -29,7 +29,7 @@ contract MockVault { function redeemPerps(IPerpetualTranche perp, uint256 perpAmt) public { perp.transferFrom(msg.sender, address(this), perpAmt); TokenAmount[] memory tokensOut = perp.redeem(perpAmt); - for (uint256 i = 0; i < tokensOut.length; i++) { + for (uint256 i = 0; i < tokensOut.length; ++i) { IERC20Upgradeable tokenOut = tokensOut[i].token; tokenOut.transfer(msg.sender, tokenOut.balanceOf(address(this))); } diff --git a/spot-contracts/contracts/_utils/BondHelpers.sol b/spot-contracts/contracts/_utils/BondHelpers.sol index fcc1f205..b9aefc14 100644 --- a/spot-contracts/contracts/_utils/BondHelpers.sol +++ b/spot-contracts/contracts/_utils/BondHelpers.sol @@ -5,7 +5,7 @@ import { IERC20Upgradeable } from "@openzeppelin/contracts-upgradeable/token/ERC import { IBondController } from "../_interfaces/buttonwood/IBondController.sol"; import { ITranche } from "../_interfaces/buttonwood/ITranche.sol"; import { TokenAmount } from "../_interfaces/CommonTypes.sol"; -import { UnacceptableTrancheLength } from "../_interfaces/ProtocolErrors.sol"; +import { UnacceptableDeposit, UnacceptableTrancheLength } from "../_interfaces/ProtocolErrors.sol"; import { SafeCastUpgradeable } from "@openzeppelin/contracts-upgradeable/utils/math/SafeCastUpgradeable.sol"; import { MathUpgradeable } from "@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol"; @@ -73,6 +73,10 @@ library BondHelpers { /// @param b The address of the bond contract. /// @return The tranche data, an array of tranche amounts. function previewDeposit(IBondController b, uint256 collateralAmount) internal view returns (TokenAmount[] memory) { + if (b.isMature()) { + revert UnacceptableDeposit(); + } + BondTranches memory bt = getTranches(b); TokenAmount[] memory tranchesOut = new TokenAmount[](2); diff --git a/spot-contracts/contracts/_utils/Sigmoid.sol b/spot-contracts/contracts/_utils/Sigmoid.sol index 93a717c8..0095ccee 100644 --- a/spot-contracts/contracts/_utils/Sigmoid.sol +++ b/spot-contracts/contracts/_utils/Sigmoid.sol @@ -45,7 +45,7 @@ library Sigmoid { int256 remaining = exp - (whole * one); int256 current = one / 2; - for (uint256 i = 0; i < 5; i++) { + for (uint256 i = 0; i < 5; ++i) { if (remaining >= current) { remaining = remaining - current; result = (result * ks[i]) / 10 ** 18; // 10**18 to match hardcoded ks values diff --git a/spot-contracts/deployments/goerli.json b/spot-contracts/deployments/goerli.json deleted file mode 100644 index 6acb5f20..00000000 --- a/spot-contracts/deployments/goerli.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "network": "goerli", - "startBlock": 7681808, - "ampl": "0x08c5b39F000705ebeC8427C1d64D6262392944EE", - "bondFactory": "0x98babbD6B3CfD2542B3401B376880E8b078B8091", - "bondIssuer": "0x2844757Aa3f942b11B9290Ce044fba1663E7c322", - "previousIssuers": [], - "proxyAdmin": "0x47bF554606254dCEC37119348AA201c5A4ef2C58", - "feePolicy": "0x89d619Cf7d3988cC36E96172A4227F9b5588B6BC", - "spot": "0x941AcD21154052357302c667cfdf69a2Af0914E5", - "vault": "0xc2f58c538D5440e54195b444B45C790316C41e32", - "router": "0x175a6256562b13D3A41d0C702Af7E3859E5b53bf" -} diff --git a/spot-contracts/deployments/sepolia.json b/spot-contracts/deployments/sepolia.json new file mode 100644 index 00000000..ddef753b --- /dev/null +++ b/spot-contracts/deployments/sepolia.json @@ -0,0 +1,13 @@ +{ + "network": "sepolia", + "startBlock": 5492003, + "ampl": "0x251410f849ad67bebffdb5a549e5f02d5d9c25ba", + "bondFactory": "0x25BcaEd6377CEAA345f12C2005a42e669B8a29fC", + "bondIssuer": "0x3838C8d4D092d40Cb27DD22Dafc6E1A81ea2DB60", + "previousIssuers": [], + "proxyAdmin": "0x0584042677d469C0B95775368cF1EFfe9cc222F5", + "feePolicy": "0x2DdF288F26490D1147296cC0FA2B3c4da5E15f10", + "spot": "0xdcCef9065876fD654bAddeBAa778FDA43E0bfC1F", + "vault": "0x107614c6602A8e602952Da107B8fE62b5Ab13b04", + "router": "0x5B59915E5754C62C40Ba5e7467382ced958F8559" +} diff --git a/spot-contracts/hardhat.config.ts b/spot-contracts/hardhat.config.ts index 2b24ebdc..5d66ddf7 100644 --- a/spot-contracts/hardhat.config.ts +++ b/spot-contracts/hardhat.config.ts @@ -30,13 +30,13 @@ export default { url: "http://127.0.0.1:8545", chainId: 1337, }, - goerli: { - // url: `https://goerli.infura.io/v3/${process.env.INFURA_SECRET}`, - url: `https://eth-goerli.g.alchemy.com/v2/${process.env.ALCHEMY_SECRET}`, + sepolia: { + // url: `https://sepolia.infura.io/v3/${process.env.INFURA_SECRET}`, + url: `https://eth-sepolia.g.alchemy.com/v2/${process.env.ALCHEMY_SECRET}`, accounts: { mnemonic: process.env.PROD_MNEMONIC || Wallet.createRandom().mnemonic.phrase, }, - gasMultiplier: 1.03, + gasMultiplier: 1.01, }, mainnet: { // url: `https://mainnet.infura.io/v3/${process.env.INFURA_SECRET}`, @@ -70,6 +70,7 @@ export default { apiKey: process.env.ETHERSCAN_API_KEY, }, mocha: { - bail: true, + bail: false, + timeout: 100000000, }, } as HardhatUserConfig; diff --git a/spot-contracts/tasks/deploy/perp.ts b/spot-contracts/tasks/deploy/perp.ts index f19a016c..7464cb94 100644 --- a/spot-contracts/tasks/deploy/perp.ts +++ b/spot-contracts/tasks/deploy/perp.ts @@ -23,19 +23,22 @@ task("deploy:BondIssuer") verify, issue, } = args; - console.log("Signer", await (await hre.ethers.getSigners())[0].getAddress()); - - const BondIssuer = await hre.ethers.getContractFactory("BondIssuer"); - const bondIssuer = await BondIssuer.deploy(bondFactoryAddress, collateralTokenAddress); - await bondIssuer.deployed(); - await (await bondIssuer.init(bondDuration, trancheRatios, issueFrequency, issueWindowOffset)).wait(); - if (issue) { - await (await bondIssuer.issue()).wait(); - } + const signers = await hre.ethers.getSigners(); + const deployer = signers[0]; + console.log("Signer", await deployer.getAddress()); + const BondIssuer = hre.ethers.getContractFactory("BondIssuer"); + const bondIssuer = await hre.upgrades.deployProxy( + BondIssuer.connect(deployer), + [bondFactoryAddress, collateralTokenAddress, bondDuration, trancheRatios, issueFrequency, issueWindowOffset], + { + initializer: "init(address,address,uint256,uint256[],uint256,uint256)", + }, + ); + // await (await bondIssuer.issue()).wait(); if (verify) { - await sleep(15); + await sleep(30); await hre.run("verify:contract", { address: bondIssuer.address, constructorArguments: [bondFactoryAddress, collateralTokenAddress], @@ -97,7 +100,7 @@ task("deploy:PerpSystem") await (await perp.updateVault(vault.address)).wait(); if (verify) { - await sleep(15); + await sleep(30); // We just need to verify the proxy once await hre.run("verify:contract", { address: feePolicy.address, @@ -128,7 +131,7 @@ task("deploy:Router") console.log("router", router.address); if (args.verify) { - await sleep(15); + await sleep(30); await hre.run("verify:contract", { address: router.address, }); diff --git a/spot-contracts/tasks/goeril.sh b/spot-contracts/tasks/goeril.sh deleted file mode 100644 index a94b34c8..00000000 --- a/spot-contracts/tasks/goeril.sh +++ /dev/null @@ -1,91 +0,0 @@ -######################################################################## -## DEPLOYMENT - -# using staging AMPL instance deployed to: 0x08c5b39F000705ebeC8427C1d64D6262392944EE -# https://github.com/ampleforth/ampleforth-contracts - -# using button wood's stating factory deployed to: 0xda5DbE504e7D532E4F8921B38E1F970D4b881BFB -# https://docs.prl.one/buttonwood/developers/deployed-contracts/goerli-testnet - -yarn hardhat --network goerli deploy:BondIssuer \ - --bond-factory-address "0x98babbD6B3CfD2542B3401B376880E8b078B8091" \ - --bond-duration "3600" \ - --issue-frequency "1200" \ - --issue-window-offset "0" \ - --collateral-token-address "0x08c5b39F000705ebeC8427C1d64D6262392944EE" \ - --tranche-ratios "[333,667]" \ - --issue true - -yarn hardhat --network goerli deploy:PerpSystem \ - --bond-issuer-address "0x2844757Aa3f942b11B9290Ce044fba1663E7c322" \ - --collateral-token-address "0x08c5b39F000705ebeC8427C1d64D6262392944EE" \ - --perp-name "SPOT" \ - --perp-symbol "SPOT" \ - --vault-name "Staked Ampleforth" \ - --vault-symbol "stAMPL" - -yarn hardhat --network goerli deploy:Router - -yarn hardhat --network goerli ops:perp:updateTolerableTrancheMaturity \ - --address 0x941AcD21154052357302c667cfdf69a2Af0914E5 \ - --minimum 600 \ - --maximum 3600 - -yarn hardhat --network goerli ops:fee:setSwapFees \ - --address "0x89d619Cf7d3988cC36E96172A4227F9b5588B6BC" \ - --fee-perc "0.05" - -######################################################################## -## OPS -yarn hardhat --network goerli ops:perp:info 0x941AcD21154052357302c667cfdf69a2Af0914E5 -yarn hardhat --network goerli ops:vault:info 0xc2f58c538D5440e54195b444B45C790316C41e32 -yarn hardhat --network goerli ops:perp:updateState 0x941AcD21154052357302c667cfdf69a2Af0914E5 -yarn hardhat --network goerli ops:vault:recoverAndRedeploy \ - --vault-address 0xc2f58c538D5440e54195b444B45C790316C41e32 -yarn hardhat --network goerli ops:vault:deploy \ - --vault-address 0xc2f58c538D5440e54195b444B45C790316C41e32 -yarn hardhat --network goerli ops:vault:recover \ - --vault-address 0xc2f58c538D5440e54195b444B45C790316C41e32 - -yarn hardhat --network goerli ops:rebase:MockAMPL \ - --ampl-address "0x08c5b39F000705ebeC8427C1d64D6262392944EE" \ - --rebase-perc 0.1 - -# Perp -yarn hardhat --network goerli ops:perp:trancheAndDeposit \ - --router-address 0x175a6256562b13D3A41d0C702Af7E3859E5b53bf \ - --perp-address 0x941AcD21154052357302c667cfdf69a2Af0914E5 \ - --collateral-amount 250 - -yarn hardhat --network goerli ops:perp:redeem \ - --router-address 0x175a6256562b13D3A41d0C702Af7E3859E5b53bf \ - --perp-address 0x941AcD21154052357302c667cfdf69a2Af0914E5 \ - --amount 10 - -## Vault -yarn hardhat --network goerli ops:vault:deposit \ - --vault-address 0xc2f58c538D5440e54195b444B45C790316C41e32 \ - --underlying-amount 250 - -yarn hardhat --network goerli ops:vault:redeem \ - --vault-address 0xc2f58c538D5440e54195b444B45C790316C41e32 \ - --amount "0.001" - -yarn hardhat --network goerli ops:vault:swapUnderlyingForPerps \ - --vault-address 0xc2f58c538D5440e54195b444B45C790316C41e32 \ - --underlying-amount 10 - -yarn hardhat --network goerli ops:vault:swapPerpsForUnderlying \ - --vault-address 0xc2f58c538D5440e54195b444B45C790316C41e32 \ - --perp-amount 10 - -## Tranches -yarn hardhat --network goerli ops:redeemTranches \ - --bond-issuer-address 0x2844757Aa3f942b11B9290Ce044fba1663E7c322 - -######################################################################## -## upgrade - -yarn hardhat --network goerli upgrade:perp:testnet 0x941AcD21154052357302c667cfdf69a2Af0914E5 - -yarn hardhat --network goerli upgrade:rolloverVault:testnet 0xca36B64BEbdf141623911987b93767dcA4bF6F1f diff --git a/spot-contracts/tasks/ops/vaults.ts b/spot-contracts/tasks/ops/vaults.ts index cef41427..8579abb5 100644 --- a/spot-contracts/tasks/ops/vaults.ts +++ b/spot-contracts/tasks/ops/vaults.ts @@ -101,7 +101,7 @@ task("ops:vault:info") console.log( "deviationRatio:", utils.formatUnits( - await feePolicy["computeDeviationRatio(uint256,uint256,uint256)"](perpTVL, vaultTVL, seniorTR), + await feePolicy["computeDeviationRatio((uint256,uint256,uint256))"]([perpTVL, vaultTVL, seniorTR]), feeDecimals, ), ); diff --git a/spot-contracts/tasks/sepolia.sh b/spot-contracts/tasks/sepolia.sh new file mode 100644 index 00000000..8649d660 --- /dev/null +++ b/spot-contracts/tasks/sepolia.sh @@ -0,0 +1,89 @@ +######################################################################## +## DEPLOYMENT + +yarn hardhat --network sepolia deploy:MockAMPL --verify "false" + +yarn hardhat --network sepolia deploy:BondFactory --verify "false" + +yarn hardhat --network sepolia deploy:BondIssuer \ + --bond-factory-address "0x25BcaEd6377CEAA345f12C2005a42e669B8a29fC" \ + --bond-duration "3600" \ + --issue-frequency "1200" \ + --issue-window-offset "0" \ + --collateral-token-address "0x251410f849ad67bebffdb5a549e5f02d5d9c25ba" \ + --tranche-ratios "[333,667]" \ + --issue true + +yarn hardhat --network sepolia deploy:PerpSystem \ + --bond-issuer-address "0x3838C8d4D092d40Cb27DD22Dafc6E1A81ea2DB60" \ + --collateral-token-address "0x251410f849ad67bebffdb5a549e5f02d5d9c25ba" \ + --perp-name "SPOT" \ + --perp-symbol "SPOT" \ + --vault-name "Staked Ampleforth" \ + --vault-symbol "stAMPL" + +yarn hardhat --network sepolia deploy:Router + +yarn hardhat --network sepolia ops:perp:updateTolerableTrancheMaturity \ + --address 0xdcCef9065876fD654bAddeBAa778FDA43E0bfC1F \ + --minimum 600 \ + --maximum 3600 + +yarn hardhat --network sepolia ops:fee:setSwapFees \ + --address "0x2DdF288F26490D1147296cC0FA2B3c4da5E15f10" \ + --fee-perc "0.05" + +######################################################################## +## OPS +yarn hardhat --network sepolia ops:perp:info 0xdcCef9065876fD654bAddeBAa778FDA43E0bfC1F +yarn hardhat --network sepolia ops:vault:info 0x107614c6602A8e602952Da107B8fE62b5Ab13b04 +yarn hardhat --network sepolia ops:perp:updateState 0xdcCef9065876fD654bAddeBAa778FDA43E0bfC1F +yarn hardhat --network sepolia ops:vault:recoverAndRedeploy \ + --vault-address 0x107614c6602A8e602952Da107B8fE62b5Ab13b04 +yarn hardhat --network sepolia ops:vault:deploy \ + --vault-address 0x107614c6602A8e602952Da107B8fE62b5Ab13b04 +yarn hardhat --network sepolia ops:vault:recover \ + --vault-address 0x107614c6602A8e602952Da107B8fE62b5Ab13b04 + +yarn hardhat --network sepolia ops:rebase:MockAMPL \ + --ampl-address "0x251410f849ad67bebffdb5a549e5f02d5d9c25ba" \ + --rebase-perc 0.1 + +# Perp +yarn hardhat --network sepolia ops:perp:trancheAndDeposit \ + --router-address 0x5B59915E5754C62C40Ba5e7467382ced958F8559 \ + --perp-address 0xdcCef9065876fD654bAddeBAa778FDA43E0bfC1F \ + --collateral-amount 250 + +yarn hardhat --network sepolia ops:perp:redeem \ + --router-address 0x5B59915E5754C62C40Ba5e7467382ced958F8559 \ + --perp-address 0xdcCef9065876fD654bAddeBAa778FDA43E0bfC1F \ + --amount 10 + +## Vault +yarn hardhat --network sepolia ops:vault:deposit \ + --vault-address 0x107614c6602A8e602952Da107B8fE62b5Ab13b04 \ + --underlying-amount 250 + +yarn hardhat --network sepolia ops:vault:redeem \ + --vault-address 0x107614c6602A8e602952Da107B8fE62b5Ab13b04 \ + --amount "0.001" + +yarn hardhat --network sepolia ops:vault:swapUnderlyingForPerps \ + --vault-address 0x107614c6602A8e602952Da107B8fE62b5Ab13b04 \ + --underlying-amount 10 + +yarn hardhat --network sepolia ops:vault:swapPerpsForUnderlying \ + --vault-address 0x107614c6602A8e602952Da107B8fE62b5Ab13b04 \ + --perp-amount 10 + +## Tranches +yarn hardhat --network sepolia ops:redeemTranches \ + --bond-issuer-address 0x3838C8d4D092d40Cb27DD22Dafc6E1A81ea2DB60 + +######################################################################## +## upgrade + +yarn hardhat --network sepolia upgrade:perp:testnet 0xdcCef9065876fD654bAddeBAa778FDA43E0bfC1F + +yarn hardhat --network sepolia upgrade:rolloverVault:testnet 0xca36B64BEbdf141623911987b93767dcA4bF6F1f diff --git a/spot-contracts/test/BondIssuer.ts b/spot-contracts/test/BondIssuer.ts index c732d772..f27497b1 100644 --- a/spot-contracts/test/BondIssuer.ts +++ b/spot-contracts/test/BondIssuer.ts @@ -1,5 +1,5 @@ import { expect } from "chai"; -import { ethers, network } from "hardhat"; +import { ethers, network, upgrades } from "hardhat"; import { Contract, Transaction, Signer } from "ethers"; import { TimeHelpers, setupBondFactory, bondAt } from "./helpers"; @@ -18,8 +18,13 @@ describe("BondIssuer", function () { token = await Token.deploy(); await token.init("Test token", "TEST"); const BondIssuer = await ethers.getContractFactory("BondIssuer"); - issuer = await BondIssuer.deploy(bondFactory.address, token.address); - await issuer.init(86400, [200, 300, 500], 3600, 900); + issuer = await upgrades.deployProxy( + BondIssuer.connect(deployer), + [bondFactory.address, token.address, 86400, [200, 300, 500], 3600, 900], + { + initializer: "init(address,address,uint256,uint256[],uint256,uint256)", + }, + ); await TimeHelpers.setNextBlockTimestamp(mockTime(0)); }); @@ -72,6 +77,10 @@ describe("BondIssuer", function () { describe("when tranche ratios are improper", function () { it("should revert", async function () { + await expect(issuer.updateTrancheRatios([200, 300, 499])).to.be.revertedWithCustomError( + issuer, + "UnacceptableTrancheRatios", + ); await expect(issuer.updateTrancheRatios([200, 300, 501])).to.be.revertedWithCustomError( issuer, "UnacceptableTrancheRatios", diff --git a/spot-contracts/test/FeePolicy.ts b/spot-contracts/test/FeePolicy.ts index f49366e5..a4660029 100644 --- a/spot-contracts/test/FeePolicy.ts +++ b/spot-contracts/test/FeePolicy.ts @@ -1,5 +1,5 @@ import { expect, use } from "chai"; -import { ethers } from "hardhat"; +import { ethers, upgrades } from "hardhat"; import { Contract, Signer } from "ethers"; import { smock } from "@defi-wonderland/smock"; @@ -16,9 +16,10 @@ describe("FeePolicy", function () { deployer = accounts[0]; otherUser = accounts[1]; - const factory = await ethers.getContractFactory("FeePolicy"); - feePolicy = await factory.deploy(); - await feePolicy.init(); + const FeePolicy = await ethers.getContractFactory("FeePolicy"); + feePolicy = await upgrades.deployProxy(FeePolicy.connect(deployer), [], { + initializer: "init()", + }); }); describe("#init", function () { @@ -125,9 +126,9 @@ describe("FeePolicy", function () { describe("when triggered by owner", function () { it("should update the mint fees", async function () { - expect(await feePolicy.computePerpMintFeePerc(toPerc("1"), toPerc("1"))).to.eq("0"); + expect(await feePolicy.computePerpMintFeePerc()).to.eq("0"); await feePolicy.connect(deployer).updatePerpMintFees(toPerc("0.01")); - expect(await feePolicy.computePerpMintFeePerc(toPerc("1"), toPerc("1"))).to.eq(toPerc("0.01")); + expect(await feePolicy.computePerpMintFeePerc()).to.eq(toPerc("0.01")); }); }); }); @@ -152,9 +153,9 @@ describe("FeePolicy", function () { describe("when triggered by owner", function () { it("should update the burn fees", async function () { - expect(await feePolicy.computePerpBurnFeePerc(toPerc("1.01"), toPerc("1.01"))).to.eq("0"); + expect(await feePolicy.computePerpBurnFeePerc()).to.eq("0"); await feePolicy.connect(deployer).updatePerpBurnFees(toPerc("0.01")); - expect(await feePolicy.computePerpBurnFeePerc(toPerc("1.01"), toPerc("1.01"))).to.eq(toPerc("0.01")); + expect(await feePolicy.computePerpBurnFeePerc()).to.eq(toPerc("0.01")); }); }); }); @@ -243,9 +244,9 @@ describe("FeePolicy", function () { describe("when triggered by owner", function () { beforeEach(async function () {}); it("should update the vault mint fees", async function () { - expect(await feePolicy.computeVaultMintFeePerc(toPerc("1.01"), toPerc("1.01"))).to.eq("0"); + expect(await feePolicy.computeVaultMintFeePerc()).to.eq("0"); await feePolicy.connect(deployer).updateVaultMintFees(toPerc("0.025")); - expect(await feePolicy.computeVaultMintFeePerc(toPerc("1.01"), toPerc("1.01"))).to.eq(toPerc("0.025")); + expect(await feePolicy.computeVaultMintFeePerc()).to.eq(toPerc("0.025")); }); }); }); @@ -270,27 +271,9 @@ describe("FeePolicy", function () { describe("when triggered by owner", function () { it("should update the vault burn fees", async function () { - expect(await feePolicy.computeVaultBurnFeePerc(toPerc("0"), toPerc("0"))).to.eq("0"); + expect(await feePolicy.computeVaultBurnFeePerc()).to.eq("0"); await feePolicy.connect(deployer).updateVaultBurnFees(toPerc("0.025")); - expect(await feePolicy.computeVaultBurnFeePerc(toPerc("0"), toPerc("0"))).to.eq(toPerc("0.025")); - }); - }); - }); - - describe("#updateVaultDeploymentFees", function () { - describe("when triggered by non-owner", function () { - it("should revert", async function () { - await expect(feePolicy.connect(otherUser).updateVaultDeploymentFees(toAmt("25"))).to.be.revertedWith( - "Ownable: caller is not the owner", - ); - }); - }); - - describe("when triggered by owner", function () { - it("should update the vault deployment fee", async function () { - expect(await feePolicy.computeVaultDeploymentFee()).to.eq("0"); - await feePolicy.connect(deployer).updateVaultDeploymentFees(toAmt("25")); - expect(await feePolicy.computeVaultDeploymentFee()).to.eq(toAmt("25")); + expect(await feePolicy.computeVaultBurnFeePerc()).to.eq(toPerc("0.025")); }); }); }); @@ -314,13 +297,13 @@ describe("FeePolicy", function () { describe("when triggered by owner", function () { it("should update the vault burn fees", async function () { - const _f = await feePolicy.computeUnderlyingToPerpSwapFeePercs(toPerc("1.01"), toPerc("1.01")); - expect(_f[0]).to.eq("0"); - expect(_f[1]).to.eq(toPerc("1")); + expect(await feePolicy.computeUnderlyingToPerpVaultSwapFeePerc(toPerc("1.01"), toPerc("1.01"))).to.eq( + toPerc("1"), + ); await feePolicy.connect(deployer).updateVaultUnderlyingToPerpSwapFeePerc(toPerc("0.1")); - const f = await feePolicy.computeUnderlyingToPerpSwapFeePercs(toPerc("1.01"), toPerc("1.01")); - expect(f[0]).to.eq("0"); - expect(f[1]).to.eq(toPerc("0.1")); + expect(await feePolicy.computeUnderlyingToPerpVaultSwapFeePerc(toPerc("1.01"), toPerc("1.01"))).to.eq( + toPerc("0.1"), + ); }); }); }); @@ -344,13 +327,9 @@ describe("FeePolicy", function () { describe("when triggered by owner", function () { it("should update the vault burn fees", async function () { - const _f = await feePolicy.computePerpToUnderlyingSwapFeePercs(toPerc("1"), toPerc("1")); - expect(_f[0]).to.eq("0"); - expect(_f[1]).to.eq(toPerc("1")); - await feePolicy.connect(deployer).updateVaultPerpToUnderlyingSwapFeePerc(toPerc("0.1")); - const f = await feePolicy.computePerpToUnderlyingSwapFeePercs(toPerc("1"), toPerc("1")); - expect(f[0]).to.eq("0"); - expect(f[1]).to.eq(toPerc("0.1")); + expect(await feePolicy.computePerpToUnderlyingVaultSwapFeePerc(toPerc("1"), toPerc("1"))).to.eq(toPerc("1")); + await feePolicy.connect(deployer).updateVaultPerpToUnderlyingSwapFeePerc(toPerc("0.2")); + expect(await feePolicy.computePerpToUnderlyingVaultSwapFeePerc(toPerc("1"), toPerc("1"))).to.eq(toPerc("0.2")); }); }); }); @@ -369,46 +348,45 @@ describe("FeePolicy", function () { await feePolicy.updateVaultMintFees(toPerc("0.05")); await feePolicy.updateVaultBurnFees(toPerc("0.075")); await feePolicy.updateDeviationRatioBounds(toPerc("0.85"), toPerc("1.15")); - await feePolicy.updateVaultDeploymentFees(toAmt("25")); }); describe("when dr is decreasing", function () { async function cmpFees(dr1, dr2, fees) { // perp mint, vault burn and swap u2p - expect(await feePolicy.computePerpMintFeePerc(toPerc(dr1), toPerc(dr2))).to.eq(toPerc(fees[0])); - expect(await feePolicy.computeVaultBurnFeePerc(toPerc(dr1), toPerc(dr2))).to.eq(toPerc(fees[1])); - const s = await feePolicy.computeUnderlyingToPerpSwapFeePercs(toPerc(dr1), toPerc(dr2)); - expect(s[0]).to.eq(toPerc(fees[0])); - expect(s[1]).to.eq(toPerc(fees[2])); + expect(await feePolicy.computePerpMintFeePerc()).to.eq(toPerc(fees[0])); + expect(await feePolicy.computeVaultBurnFeePerc()).to.eq(toPerc(fees[1])); + expect(await feePolicy.computeUnderlyingToPerpVaultSwapFeePerc(toPerc(dr1), toPerc(dr2))).to.eq( + toPerc(fees[2]), + ); } describe("when ONE < dr2, dr1", function () { it("should compute fees as expected", async function () { - await cmpFees("1.1", "1.01", ["0", "0.075", "0.1"]); + await cmpFees("1.1", "1.01", ["0.025", "0.075", "0.1"]); }); }); describe("when ONE <= dr2, dr1", function () { it("should compute fees as expected", async function () { - await cmpFees("1.01", "1", ["0", "0.075", "0.1"]); + await cmpFees("1.01", "1", ["0.025", "0.075", "0.1"]); }); }); describe("when dr2 < ONE < dr1", function () { it("should compute fees as expected", async function () { - await cmpFees("1.05", "0.95", ["0.0125", "0.075", "0.1"]); + await cmpFees("1.05", "0.95", ["0.025", "0.075", "0.1"]); }); }); describe("when dr2 < ONE < dr1", function () { it("should compute fees as expected", async function () { - await cmpFees("1.01", "0.96", ["0.02", "0.075", "0.1"]); + await cmpFees("1.01", "0.96", ["0.025", "0.075", "0.1"]); }); }); describe("when dr2 < ONE < dr1", function () { it("should compute fees as expected", async function () { - await cmpFees("1.1", "0.99", ["0.00227273", "0.075", "0.1"]); + await cmpFees("1.1", "0.99", ["0.025", "0.075", "0.1"]); }); }); @@ -426,7 +404,7 @@ describe("FeePolicy", function () { describe("when dr2 < lower < ONE < dr1", function () { it("should compute fees as expected", async function () { - await cmpFees("1.2", "0.8", ["0.0125", "0.075", "1"]); + await cmpFees("1.2", "0.8", ["0.025", "0.075", "1"]); }); }); @@ -440,40 +418,40 @@ describe("FeePolicy", function () { describe("when dr is increasing", function () { async function cmpFees(dr1, dr2, fees) { // perp burn, vault mint and swap p2u - expect(await feePolicy.computePerpBurnFeePerc(toPerc(dr1), toPerc(dr2))).to.eq(toPerc(fees[0])); - expect(await feePolicy.computeVaultMintFeePerc(toPerc(dr1), toPerc(dr2))).to.eq(toPerc(fees[1])); - const s = await feePolicy.computePerpToUnderlyingSwapFeePercs(toPerc(dr1), toPerc(dr2)); - expect(s[0]).to.eq(toPerc(fees[0])); - expect(s[1]).to.eq(toPerc(fees[2])); + expect(await feePolicy.computePerpBurnFeePerc()).to.eq(toPerc(fees[0])); + expect(await feePolicy.computeVaultMintFeePerc()).to.eq(toPerc(fees[1])); + expect(await feePolicy.computePerpToUnderlyingVaultSwapFeePerc(toPerc(dr1), toPerc(dr2))).to.eq( + toPerc(fees[2]), + ); } describe("when dr1, dr2 < ONE", function () { it("should compute fees as expected", async function () { - await cmpFees("0.9", "0.99", ["0", "0", "0.15"]); + await cmpFees("0.9", "0.99", ["0.035", "0.05", "0.15"]); }); }); describe("when dr1, dr2 <= ONE", function () { it("should compute fees as expected", async function () { - await cmpFees("0.9", "1", ["0", "0", "0.15"]); + await cmpFees("0.9", "1", ["0.035", "0.05", "0.15"]); }); }); describe("when dr1 < ONE < dr2", function () { it("should compute fees as expected", async function () { - await cmpFees("0.95", "1.05", ["0.0175", "0.025", "0.15"]); + await cmpFees("0.95", "1.05", ["0.035", "0.05", "0.15"]); }); }); describe("when dr1 < ONE < dr2", function () { it("should compute fees as expected", async function () { - await cmpFees("0.99", "1.04", ["0.028", "0.04", "0.15"]); + await cmpFees("0.99", "1.04", ["0.035", "0.05", "0.15"]); }); }); describe("when dr1 < ONE < dr2", function () { it("should compute fees as expected", async function () { - await cmpFees("0.99", "1.1", ["0.03181819", "0.04545455", "0.15"]); + await cmpFees("0.99", "1.1", ["0.035", "0.05", "0.15"]); }); }); @@ -521,12 +499,6 @@ describe("FeePolicy", function () { expect(await feePolicy.computePerpRolloverFeePerc(toPerc("5"))).to.eq(toPerc("0.00768997")); }); }); - - describe("deployment fee", function () { - it("should compute fees as expected", async function () { - expect(await feePolicy.computeVaultDeploymentFee()).to.eq(toAmt("25")); - }); - }); }); describe("#computeDeviationRatio", async function () { diff --git a/spot-contracts/test/RouterV2.ts b/spot-contracts/test/RouterV2.ts index 57d5ed9a..040f3433 100644 --- a/spot-contracts/test/RouterV2.ts +++ b/spot-contracts/test/RouterV2.ts @@ -38,8 +38,13 @@ describe("RouterV2", function () { ({ collateralToken } = await setupCollateralToken("Bitcoin", "BTC")); const BondIssuer = await ethers.getContractFactory("BondIssuer"); - issuer = await BondIssuer.deploy(bondFactory.address, collateralToken.address); - await issuer.init(3600, [200, 800], 1200, 0); + issuer = await upgrades.deployProxy( + BondIssuer.connect(deployer), + [bondFactory.address, collateralToken.address, 3600, [200, 800], 1200, 0], + { + initializer: "init(address,address,uint256,uint256[],uint256,uint256)", + }, + ); const FeePolicy = await ethers.getContractFactory("FeePolicy"); feePolicy = await smock.fake(FeePolicy); diff --git a/spot-contracts/test/perp/PerpetualTranche.ts b/spot-contracts/test/perp/PerpetualTranche.ts index 488a9b9b..d64f7e9c 100644 --- a/spot-contracts/test/perp/PerpetualTranche.ts +++ b/spot-contracts/test/perp/PerpetualTranche.ts @@ -474,8 +474,13 @@ describe("PerpetualTranche", function () { let issuer: Contract; beforeEach(async function () { const BondIssuer = await ethers.getContractFactory("BondIssuer"); - issuer = await BondIssuer.deploy(bondFactory.address, collateralToken.address); - await issuer.init(3600, [200, 800], 1200, 0); + issuer = await upgrades.deployProxy( + BondIssuer.connect(deployer), + [bondFactory.address, collateralToken.address, 3600, [200, 800], 1200, 0], + { + initializer: "init(address,address,uint256,uint256[],uint256,uint256)", + }, + ); await perp.updateBondIssuer(issuer.address); await advancePerpQueue(perp, 1200); @@ -509,8 +514,13 @@ describe("PerpetualTranche", function () { let issuer: Contract; beforeEach(async function () { const BondIssuer = await ethers.getContractFactory("BondIssuer"); - issuer = await BondIssuer.deploy(bondFactory.address, collateralToken.address); - await issuer.init(3600, [200, 800], 1200, 0); + issuer = await upgrades.deployProxy( + BondIssuer.connect(deployer), + [bondFactory.address, collateralToken.address, 3600, [200, 800], 1200, 0], + { + initializer: "init(address,address,uint256,uint256[],uint256,uint256)", + }, + ); await perp.updateBondIssuer(issuer.address); await advancePerpQueue(perp, 3600); @@ -548,8 +558,13 @@ describe("PerpetualTranche", function () { let issuer: Contract; beforeEach(async function () { const BondIssuer = await ethers.getContractFactory("BondIssuer"); - issuer = await BondIssuer.deploy(bondFactory.address, collateralToken.address); - await issuer.init(3600, [200, 800], 1200, 0); + issuer = await upgrades.deployProxy( + BondIssuer.connect(deployer), + [bondFactory.address, collateralToken.address, 3600, [200, 800], 1200, 0], + { + initializer: "init(address,address,uint256,uint256[],uint256,uint256)", + }, + ); await perp.updateBondIssuer(issuer.address); await advancePerpQueue(perp, 3600); bond = await bondAt(await perp.callStatic.getDepositBond()); @@ -588,8 +603,13 @@ describe("PerpetualTranche", function () { let issuer: Contract; beforeEach(async function () { const BondIssuer = await ethers.getContractFactory("BondIssuer"); - issuer = await BondIssuer.deploy(bondFactory.address, collateralToken.address); - await issuer.init(3600, [200, 800], 1200, 0); + issuer = await upgrades.deployProxy( + BondIssuer.connect(deployer), + [bondFactory.address, collateralToken.address, 3600, [200, 800], 1200, 0], + { + initializer: "init(address,address,uint256,uint256[],uint256,uint256)", + }, + ); await perp.updateBondIssuer(issuer.address); await advancePerpQueue(perp, 3600); @@ -687,8 +707,14 @@ describe("PerpetualTranche", function () { const reserveTranches: Contract[] = []; beforeEach(async function () { const BondIssuer = await ethers.getContractFactory("BondIssuer"); - issuer = await BondIssuer.deploy(bondFactory.address, collateralToken.address); - await issuer.init(10800, [500, 500], 1200, 0); + issuer = await upgrades.deployProxy( + BondIssuer.connect(deployer), + [bondFactory.address, collateralToken.address, 10800, [500, 500], 1200, 0], + { + initializer: "init(address,address,uint256,uint256[],uint256,uint256)", + }, + ); + await perp.updateBondIssuer(issuer.address); await perp.updateTolerableTrancheMaturity(0, 10800); await advancePerpQueue(perp, 10900); @@ -759,8 +785,13 @@ describe("PerpetualTranche", function () { const reserveTranches: Contract[] = []; beforeEach(async function () { const BondIssuer = await ethers.getContractFactory("BondIssuer"); - issuer = await BondIssuer.deploy(bondFactory.address, collateralToken.address); - await issuer.init(10800, [500, 500], 1200, 0); + issuer = await upgrades.deployProxy( + BondIssuer.connect(deployer), + [bondFactory.address, collateralToken.address, 10800, [500, 500], 1200, 0], + { + initializer: "init(address,address,uint256,uint256[],uint256,uint256)", + }, + ); await perp.updateBondIssuer(issuer.address); await perp.updateTolerableTrancheMaturity(0, 10800); await advancePerpQueue(perp, 10900); @@ -837,8 +868,13 @@ describe("PerpetualTranche", function () { const reserveTranches: Contract[] = []; beforeEach(async function () { const BondIssuer = await ethers.getContractFactory("BondIssuer"); - issuer = await BondIssuer.deploy(bondFactory.address, collateralToken.address); - await issuer.init(10800, [500, 500], 1200, 0); + issuer = await upgrades.deployProxy( + BondIssuer.connect(deployer), + [bondFactory.address, collateralToken.address, 10800, [500, 500], 1200, 0], + { + initializer: "init(address,address,uint256,uint256[],uint256,uint256)", + }, + ); await perp.updateBondIssuer(issuer.address); await perp.updateTolerableTrancheMaturity(0, 10800); await advancePerpQueue(perp, 10900); @@ -914,8 +950,13 @@ describe("PerpetualTranche", function () { const reserveTranches: Contract[] = []; beforeEach(async function () { const BondIssuer = await ethers.getContractFactory("BondIssuer"); - issuer = await BondIssuer.deploy(bondFactory.address, collateralToken.address); - await issuer.init(10800, [500, 500], 1200, 0); + issuer = await upgrades.deployProxy( + BondIssuer.connect(deployer), + [bondFactory.address, collateralToken.address, 10800, [500, 500], 1200, 0], + { + initializer: "init(address,address,uint256,uint256[],uint256,uint256)", + }, + ); await perp.updateBondIssuer(issuer.address); await perp.updateTolerableTrancheMaturity(0, 10800); await advancePerpQueue(perp, 10900); @@ -992,8 +1033,13 @@ describe("PerpetualTranche", function () { const reserveTranches: Contract[] = []; beforeEach(async function () { const BondIssuer = await ethers.getContractFactory("BondIssuer"); - issuer = await BondIssuer.deploy(bondFactory.address, collateralToken.address); - await issuer.init(10800, [500, 500], 1200, 0); + issuer = await upgrades.deployProxy( + BondIssuer.connect(deployer), + [bondFactory.address, collateralToken.address, 10800, [500, 500], 1200, 0], + { + initializer: "init(address,address,uint256,uint256[],uint256,uint256)", + }, + ); await perp.updateBondIssuer(issuer.address); await perp.updateTolerableTrancheMaturity(0, 10800); await advancePerpQueue(perp, 10900); @@ -1051,8 +1097,13 @@ describe("PerpetualTranche", function () { beforeEach(async function () { const bondFactory = await setupBondFactory(); const BondIssuer = await ethers.getContractFactory("BondIssuer"); - const issuer = await BondIssuer.deploy(bondFactory.address, collateralToken.address); - await issuer.init(10800, [500, 500], 1200, 0); + issuer = await upgrades.deployProxy( + BondIssuer.connect(deployer), + [bondFactory.address, collateralToken.address, 10800, [500, 500], 1200, 0], + { + initializer: "init(address,address,uint256,uint256[],uint256,uint256)", + }, + ); await perp.updateBondIssuer(issuer.address); await perp.updateTolerableTrancheMaturity(600, 10800); await advancePerpQueue(perp, 10900); @@ -1084,8 +1135,13 @@ describe("PerpetualTranche", function () { beforeEach(async function () { const bondFactory = await setupBondFactory(); const BondIssuer = await ethers.getContractFactory("BondIssuer"); - const issuer = await BondIssuer.deploy(bondFactory.address, collateralToken.address); - await issuer.init(10800, [500, 500], 1200, 0); + issuer = await upgrades.deployProxy( + BondIssuer.connect(deployer), + [bondFactory.address, collateralToken.address, 10800, [500, 500], 1200, 0], + { + initializer: "init(address,address,uint256,uint256[],uint256,uint256)", + }, + ); await perp.updateBondIssuer(issuer.address); await perp.updateTolerableTrancheMaturity(600, 10800); await advancePerpQueue(perp, 10900); @@ -1117,8 +1173,13 @@ describe("PerpetualTranche", function () { beforeEach(async function () { const bondFactory = await setupBondFactory(); const BondIssuer = await ethers.getContractFactory("BondIssuer"); - const issuer = await BondIssuer.deploy(bondFactory.address, collateralToken.address); - await issuer.init(10800, [500, 500], 1200, 0); + issuer = await upgrades.deployProxy( + BondIssuer.connect(deployer), + [bondFactory.address, collateralToken.address, 10800, [500, 500], 1200, 0], + { + initializer: "init(address,address,uint256,uint256[],uint256,uint256)", + }, + ); await perp.updateBondIssuer(issuer.address); await perp.updateTolerableTrancheMaturity(600, 10800); await advancePerpQueue(perp, 10900); diff --git a/spot-contracts/test/perp/PerpetualTranche_deposit.ts b/spot-contracts/test/perp/PerpetualTranche_deposit.ts index db4df034..c6a860be 100644 --- a/spot-contracts/test/perp/PerpetualTranche_deposit.ts +++ b/spot-contracts/test/perp/PerpetualTranche_deposit.ts @@ -39,9 +39,15 @@ describe("PerpetualTranche", function () { bondFactory = await setupBondFactory(); ({ collateralToken, rebaseOracle } = await setupCollateralToken("Bitcoin", "BTC")); + const BondIssuer = await ethers.getContractFactory("BondIssuer"); - issuer = await BondIssuer.deploy(bondFactory.address, collateralToken.address); - await issuer.init(3600, [500, 500], 1200, 0); + issuer = await upgrades.deployProxy( + BondIssuer.connect(deployer), + [bondFactory.address, collateralToken.address, 3600, [500, 500], 1200, 0], + { + initializer: "init(address,address,uint256,uint256[],uint256,uint256)", + }, + ); const FeePolicy = await ethers.getContractFactory("FeePolicy"); feePolicy = await smock.fake(FeePolicy); diff --git a/spot-contracts/test/perp/PerpetualTranche_redeem.ts b/spot-contracts/test/perp/PerpetualTranche_redeem.ts index 16d248de..61291431 100644 --- a/spot-contracts/test/perp/PerpetualTranche_redeem.ts +++ b/spot-contracts/test/perp/PerpetualTranche_redeem.ts @@ -40,9 +40,15 @@ describe("PerpetualTranche", function () { bondFactory = await setupBondFactory(); ({ collateralToken, rebaseOracle } = await setupCollateralToken("Bitcoin", "BTC")); + const BondIssuer = await ethers.getContractFactory("BondIssuer"); - issuer = await BondIssuer.deploy(bondFactory.address, collateralToken.address); - await issuer.init(3600, [500, 500], 1200, 0); + issuer = await upgrades.deployProxy( + BondIssuer.connect(deployer), + [bondFactory.address, collateralToken.address, 3600, [500, 500], 1200, 0], + { + initializer: "init(address,address,uint256,uint256[],uint256,uint256)", + }, + ); const FeePolicy = await ethers.getContractFactory("FeePolicy"); feePolicy = await smock.fake(FeePolicy); diff --git a/spot-contracts/test/perp/PerpetualTranche_rollover.ts b/spot-contracts/test/perp/PerpetualTranche_rollover.ts index c0387206..c6a2787d 100644 --- a/spot-contracts/test/perp/PerpetualTranche_rollover.ts +++ b/spot-contracts/test/perp/PerpetualTranche_rollover.ts @@ -46,9 +46,15 @@ describe("PerpetualTranche", function () { bondFactory = await setupBondFactory(); ({ collateralToken, rebaseOracle } = await setupCollateralToken("Bitcoin", "BTC")); + const BondIssuer = await ethers.getContractFactory("BondIssuer"); - issuer = await BondIssuer.deploy(bondFactory.address, collateralToken.address); - await issuer.init(10800, [500, 500], 1200, 0); + issuer = await upgrades.deployProxy( + BondIssuer.connect(deployer), + [bondFactory.address, collateralToken.address, 10800, [500, 500], 1200, 0], + { + initializer: "init(address,address,uint256,uint256[],uint256,uint256)", + }, + ); const FeePolicy = await ethers.getContractFactory("FeePolicy"); feePolicy = await smock.fake(FeePolicy); @@ -346,12 +352,8 @@ describe("PerpetualTranche", function () { }); describe("when trancheIn price is 0.5 and tokenOut is collateral which rebased up", function () { - let rolloverInTranche2: Contract; beforeEach(async function () { - const rolloverInTranches = await getTranches(rolloverInBond); - rolloverInTranche2 = rolloverInTranches[1]; await rebase(collateralToken, rebaseOracle, -0.75); - // simulating collateral rebase up, by just transferring some tokens in await mintCollteralToken(collateralToken, toFixedPtAmt("1000"), deployer); await collateralToken.transfer(perp.address, toFixedPtAmt("1000")); @@ -359,7 +361,7 @@ describe("PerpetualTranche", function () { it("should rollover the correct amount", async function () { const r = await perp.callStatic.computeRolloverAmt( - rolloverInTranche2.address, + rolloverInTranche.address, collateralToken.address, toFixedPtAmt("500"), ); @@ -369,19 +371,15 @@ describe("PerpetualTranche", function () { }); describe("when trancheIn price is 0.5 and tokenOut is collateral which rebased down", function () { - let rolloverInTranche2: Contract; beforeEach(async function () { await mintCollteralToken(collateralToken, toFixedPtAmt("1000"), deployer); await collateralToken.transfer(perp.address, toFixedPtAmt("1000")); - - const rolloverInTranches = await getTranches(rolloverInBond); - rolloverInTranche2 = rolloverInTranches[1]; await rebase(collateralToken, rebaseOracle, -0.75); }); it("should rollover the correct amount", async function () { const r = await perp.callStatic.computeRolloverAmt( - rolloverInTranche2.address, + rolloverInTranche.address, collateralToken.address, toFixedPtAmt("500"), ); diff --git a/spot-contracts/test/rollover-vault/RolloverVault.ts b/spot-contracts/test/rollover-vault/RolloverVault.ts index 08bce8e9..9c17b9d7 100644 --- a/spot-contracts/test/rollover-vault/RolloverVault.ts +++ b/spot-contracts/test/rollover-vault/RolloverVault.ts @@ -215,9 +215,15 @@ describe("RolloverVault", function () { beforeEach(async function () { const bondFactory = await setupBondFactory(); ({ collateralToken } = await setupCollateralToken("Bitcoin", "BTC")); + const BondIssuer = await ethers.getContractFactory("BondIssuer"); - const issuer = await BondIssuer.deploy(bondFactory.address, collateralToken.address); - await issuer.init(4800, [200, 800], 1200, 0); + const issuer = await upgrades.deployProxy( + BondIssuer.connect(deployer), + [bondFactory.address, collateralToken.address, 4800, [200, 800], 1200, 0], + { + initializer: "init(address,address,uint256,uint256[],uint256,uint256)", + }, + ); const PerpetualTranche = await ethers.getContractFactory("PerpetualTranche"); perp = await upgrades.deployProxy( diff --git a/spot-contracts/test/rollover-vault/RolloverVault_deploy.ts b/spot-contracts/test/rollover-vault/RolloverVault_deploy.ts index 3d7edc8d..c2e356c4 100644 --- a/spot-contracts/test/rollover-vault/RolloverVault_deploy.ts +++ b/spot-contracts/test/rollover-vault/RolloverVault_deploy.ts @@ -43,9 +43,15 @@ describe("RolloverVault", function () { bondFactory = await setupBondFactory(); ({ collateralToken, rebaseOracle } = await setupCollateralToken("Bitcoin", "BTC")); + const BondIssuer = await ethers.getContractFactory("BondIssuer"); - issuer = await BondIssuer.deploy(bondFactory.address, collateralToken.address); - await issuer.init(4800, [200, 800], 1200, 0); + issuer = await upgrades.deployProxy( + BondIssuer.connect(deployer), + [bondFactory.address, collateralToken.address, 4800, [200, 800], 1200, 0], + { + initializer: "init(address,address,uint256,uint256[],uint256,uint256)", + }, + ); const FeePolicy = await ethers.getContractFactory("FeePolicy"); feePolicy = await smock.fake(FeePolicy); @@ -386,27 +392,22 @@ describe("RolloverVault", function () { }); }); - describe("typical deploy with deployment fee", function () { + describe("typical deploy", function () { let txFn: Promise; beforeEach(async function () { await rebase(collateralToken, rebaseOracle, -0.9); - await feePolicy.computeVaultDeploymentFee.returns(toFixedPtAmt("10")); await feePolicy.computePerpRolloverFeePerc.returns(toPercFixedPtAmt("-0.01")); await collateralToken.transfer(vault.address, toFixedPtAmt("1000")); txFn = () => vault.deploy(); }); - it("should transfer deployment fee to owner", async function () { - await expect(txFn).to.changeTokenBalances(collateralToken, [deployer], [toFixedPtAmt("10")]); - }); - it("should tranche and rollover", async function () { const tx = txFn(); // Tranche - await expect(tx).to.emit(vault, "AssetSynced").withArgs(rolloverInTranches[0].address, toFixedPtAmt("198")); - await expect(tx).to.emit(vault, "AssetSynced").withArgs(rolloverInTranches[1].address, toFixedPtAmt("792")); + await expect(tx).to.emit(vault, "AssetSynced").withArgs(rolloverInTranches[0].address, toFixedPtAmt("200")); + await expect(tx).to.emit(vault, "AssetSynced").withArgs(rolloverInTranches[1].address, toFixedPtAmt("800")); // Rollover await expect(tx).to.emit(vault, "AssetSynced").withArgs(reserveTranches[1].address, toFixedPtAmt("200")); @@ -422,7 +423,7 @@ describe("RolloverVault", function () { // Final await expect(tx) .to.emit(vault, "AssetSynced") - .withArgs(collateralToken.address, toFixedPtAmt("415.94059405940594")); + .withArgs(collateralToken.address, toFixedPtAmt("425.940594059405940000")); }); it("should update the list of deployed assets", async function () { @@ -432,7 +433,7 @@ describe("RolloverVault", function () { vault, [collateralToken, reserveTranches[1], rolloverInTranches[0], rolloverInTranches[1]], [ - toFixedPtAmt("415.94059405940594"), + toFixedPtAmt("425.940594059405940000"), toFixedPtAmt("200"), toFixedPtAmt("0.000000000000000118"), toFixedPtAmt("475.247524752475248"), diff --git a/spot-contracts/test/rollover-vault/RolloverVault_deposit_redeem.ts b/spot-contracts/test/rollover-vault/RolloverVault_deposit_redeem.ts index 117011fb..80ec756e 100644 --- a/spot-contracts/test/rollover-vault/RolloverVault_deposit_redeem.ts +++ b/spot-contracts/test/rollover-vault/RolloverVault_deposit_redeem.ts @@ -50,9 +50,15 @@ describe("RolloverVault", function () { bondFactory = await setupBondFactory(); ({ collateralToken, rebaseOracle } = await setupCollateralToken("Bitcoin", "BTC")); + const BondIssuer = await ethers.getContractFactory("BondIssuer"); - issuer = await BondIssuer.deploy(bondFactory.address, collateralToken.address); - await issuer.init(4800, [200, 800], 1200, 0); + issuer = await upgrades.deployProxy( + BondIssuer.connect(deployer), + [bondFactory.address, collateralToken.address, 4800, [200, 800], 1200, 0], + { + initializer: "init(address,address,uint256,uint256[],uint256,uint256)", + }, + ); const FeePolicy = await ethers.getContractFactory("FeePolicy"); feePolicy = await smock.fake(FeePolicy); diff --git a/spot-contracts/test/rollover-vault/RolloverVault_recover.ts b/spot-contracts/test/rollover-vault/RolloverVault_recover.ts index 761b81fe..e3d97785 100644 --- a/spot-contracts/test/rollover-vault/RolloverVault_recover.ts +++ b/spot-contracts/test/rollover-vault/RolloverVault_recover.ts @@ -41,9 +41,15 @@ describe("RolloverVault", function () { bondFactory = await setupBondFactory(); ({ collateralToken } = await setupCollateralToken("Bitcoin", "BTC")); + const BondIssuer = await ethers.getContractFactory("BondIssuer"); - issuer = await BondIssuer.deploy(bondFactory.address, collateralToken.address); - await issuer.init(4800, [200, 800], 1200, 0); + issuer = await upgrades.deployProxy( + BondIssuer.connect(deployer), + [bondFactory.address, collateralToken.address, 4800, [200, 800], 1200, 0], + { + initializer: "init(address,address,uint256,uint256[],uint256,uint256)", + }, + ); const FeePolicy = await ethers.getContractFactory("FeePolicy"); feePolicy = await smock.fake(FeePolicy); @@ -455,6 +461,51 @@ describe("RolloverVault", function () { await expect(tx).to.emit(vault, "AssetSynced").withArgs(newTranchesIn[1].address, toFixedPtAmt("2400")); }); }); + + describe("with dust reminder", function () { + beforeEach(async function () { + await depositIntoBond(newBondIn, toFixedPtAmt("1000"), deployer); + await newTranchesIn[0].transfer(vault.address, "200000"); + }); + + it("should recover", async function () { + await expect(vault["recover(address)"](newTranchesIn[1].address)).not.to.be.reverted; + expect(await vault.assetCount()).to.eq(2); + await checkVaultAssetComposition( + vault, + [collateralToken, newTranchesIn[1]], + [toFixedPtAmt("6808.000000000001"), toFixedPtAmt("3199.9999999999992")], + ); + }); + + it("should sync assets", async function () { + const tx = vault["recover(address)"](newTranchesIn[1].address); + await expect(tx) + .to.emit(vault, "AssetSynced") + .withArgs(collateralToken.address, toFixedPtAmt("6808.000000000001")); + await expect(tx).to.emit(vault, "AssetSynced").withArgs(newTranchesIn[0].address, toFixedPtAmt("0")); + await expect(tx) + .to.emit(vault, "AssetSynced") + .withArgs(newTranchesIn[1].address, toFixedPtAmt("3199.9999999999992")); + }); + + it("should not recover dust when triggered again", async function () { + await depositIntoBond(newBondIn, toFixedPtAmt("10000"), deployer); + await newTranchesIn[0].transfer(vault.address, toFixedPtAmt("799.999999999999")); + await vault["recover(address)"](newTranchesIn[1].address); + const tx = vault["recover(address)"](newTranchesIn[1].address); + await tx; + await checkVaultAssetComposition( + vault, + [collateralToken, newTranchesIn[1]], + [toFixedPtAmt("10807.999999999996"), "3200000"], + ); + await expect(tx) + .to.emit(vault, "AssetSynced") + .withArgs(collateralToken.address, toFixedPtAmt("10807.999999999996")); + await expect(tx).to.emit(vault, "AssetSynced").withArgs(newTranchesIn[1].address, "3200000"); + }); + }); }); }); diff --git a/spot-contracts/test/rollover-vault/RolloverVault_swap.ts b/spot-contracts/test/rollover-vault/RolloverVault_swap.ts index f72be8c2..e2eb17b7 100644 --- a/spot-contracts/test/rollover-vault/RolloverVault_swap.ts +++ b/spot-contracts/test/rollover-vault/RolloverVault_swap.ts @@ -43,16 +43,22 @@ describe("RolloverVault", function () { bondFactory = await setupBondFactory(); ({ collateralToken, rebaseOracle } = await setupCollateralToken("Bitcoin", "BTC")); + const BondIssuer = await ethers.getContractFactory("BondIssuer"); - issuer = await BondIssuer.deploy(bondFactory.address, collateralToken.address); - await issuer.init(4800, [200, 800], 1200, 0); + issuer = await upgrades.deployProxy( + BondIssuer.connect(deployer), + [bondFactory.address, collateralToken.address, 4800, [200, 800], 1200, 0], + { + initializer: "init(address,address,uint256,uint256[],uint256,uint256)", + }, + ); const FeePolicy = await ethers.getContractFactory("FeePolicy"); feePolicy = await smock.fake(FeePolicy); await feePolicy.decimals.returns(8); - await feePolicy.computePerpMintFeePerc.returns("0"); - await feePolicy.computePerpBurnFeePerc.returns("0"); - await feePolicy.computePerpRolloverFeePerc.returns("0"); + await feePolicy.computePerpMintFeePerc.returns(0); + await feePolicy.computePerpBurnFeePerc.returns(0); + await feePolicy.computePerpRolloverFeePerc.returns(0); const PerpetualTranche = await ethers.getContractFactory("PerpetualTranche"); perp = await upgrades.deployProxy( @@ -91,7 +97,7 @@ describe("RolloverVault", function () { [collateralToken, ...reserveTranches.slice(-3)], [toFixedPtAmt("200"), toFixedPtAmt("200"), toFixedPtAmt("200"), toFixedPtAmt("200")], ); - await checkVaultAssetComposition(vault, [collateralToken], ["0"]); + await checkVaultAssetComposition(vault, [collateralToken], [0]); expect(await vault.assetCount()).to.eq(1); await mintCollteralToken(collateralToken, toFixedPtAmt("100000"), deployer); @@ -119,14 +125,15 @@ describe("RolloverVault", function () { describe("#swapUnderlyingForPerps", function () { describe("when fee is zero", function () { beforeEach(async function () { - await feePolicy.computeUnderlyingToPerpSwapFeePercs.returns([0, 0]); + await feePolicy.computePerpMintFeePerc.returns(0); + await feePolicy.computeUnderlyingToPerpVaultSwapFeePerc.returns(0); }); describe("when perp price is 1", function () { it("should compute swap amount", async function () { const s = await vault.callStatic.computeUnderlyingToPerpSwapAmt(toFixedPtAmt("100")); expect(s[0]).to.eq(toFixedPtAmt("100")); - expect(s[1]).to.eq("0"); + expect(s[1]).to.eq(0); expect(s[2].perpTVL).to.eq(toFixedPtAmt("800")); expect(s[2].vaultTVL).to.eq(toFixedPtAmt("2000")); expect(s[2].seniorTR).to.eq("200"); @@ -157,7 +164,7 @@ describe("RolloverVault", function () { it("should compute swap amount", async function () { const s = await vault.callStatic.computeUnderlyingToPerpSwapAmt(toFixedPtAmt("100")); expect(s[0]).to.eq(toFixedPtAmt("50")); - expect(s[1]).to.eq("0"); + expect(s[1]).to.eq(0); expect(s[2].perpTVL).to.eq(toFixedPtAmt("1600")); expect(s[2].vaultTVL).to.eq(toFixedPtAmt("2000")); expect(s[2].seniorTR).to.eq("200"); @@ -187,7 +194,7 @@ describe("RolloverVault", function () { it("should compute swap amount", async function () { const s = await vault.callStatic.computeUnderlyingToPerpSwapAmt(toFixedPtAmt("100")); expect(s[0]).to.eq(toFixedPtAmt("200")); - expect(s[1]).to.eq("0"); + expect(s[1]).to.eq(0); expect(s[2].perpTVL).to.eq(toFixedPtAmt("400")); expect(s[2].vaultTVL).to.eq(toFixedPtAmt("120")); expect(s[2].seniorTR).to.eq("200"); @@ -217,7 +224,7 @@ describe("RolloverVault", function () { it("should compute swap amount", async function () { const s = await vault.callStatic.computeUnderlyingToPerpSwapAmt(toFixedPtAmt("100")); expect(s[0]).to.eq(toFixedPtAmt("100")); - expect(s[1]).to.eq("0"); + expect(s[1]).to.eq(0); expect(s[2].perpTVL).to.eq(toFixedPtAmt("800")); expect(s[2].vaultTVL).to.eq(toFixedPtAmt("1780")); expect(s[2].seniorTR).to.eq("200"); @@ -248,7 +255,7 @@ describe("RolloverVault", function () { it("should compute swap amount", async function () { const s = await vault.callStatic.computeUnderlyingToPerpSwapAmt(toFixedPtAmt("100")); expect(s[0]).to.eq(toFixedPtAmt("100")); - expect(s[1]).to.eq("0"); + expect(s[1]).to.eq(0); expect(s[2].perpTVL).to.eq(toFixedPtAmt("800")); expect(s[2].vaultTVL).to.eq(toFixedPtAmt("2220")); expect(s[2].seniorTR).to.eq("200"); @@ -274,10 +281,8 @@ describe("RolloverVault", function () { describe("when fee is not zero", function () { beforeEach(async function () { - await feePolicy.computeUnderlyingToPerpSwapFeePercs.returns([ - toPercFixedPtAmt("0.05"), - toPercFixedPtAmt("0.1"), - ]); + await feePolicy.computePerpMintFeePerc.returns(toPercFixedPtAmt("0.05")); + await feePolicy.computeUnderlyingToPerpVaultSwapFeePerc.returns(toPercFixedPtAmt("0.1")); }); it("should compute swap amount", async function () { @@ -292,14 +297,14 @@ describe("RolloverVault", function () { describe("when swap amount is zero", function () { it("should be reverted", async function () { - await expect(vault.swapUnderlyingForPerps("0")).to.be.revertedWithCustomError(vault, "UnacceptableSwap"); + await expect(vault.swapUnderlyingForPerps(0)).to.be.revertedWithCustomError(vault, "UnacceptableSwap"); }); }); describe("when absolute liquidity is too low", function () { beforeEach(async function () { await vault.updateMinUnderlyingBal(toFixedPtAmt("1000")); - await vault.updateMinUnderlyingPerc("0"); + await vault.updateMinUnderlyingPerc(0); }); it("should be reverted", async function () { await expect(vault.swapUnderlyingForPerps(toFixedPtAmt("50"))).to.be.revertedWithCustomError( @@ -312,7 +317,7 @@ describe("RolloverVault", function () { describe("when percentage of liquidity is too low", function () { beforeEach(async function () { - await vault.updateMinUnderlyingBal("0"); + await vault.updateMinUnderlyingBal(0); await vault.updateMinUnderlyingPerc(toPercFixedPtAmt("0.40")); }); it("should be reverted", async function () { @@ -326,7 +331,8 @@ describe("RolloverVault", function () { describe("when fee is 100%", function () { it("should be reverted", async function () { - await feePolicy.computeUnderlyingToPerpSwapFeePercs.returns([0, toPercFixedPtAmt("1")]); + await feePolicy.computePerpMintFeePerc.returns(0); + await feePolicy.computeUnderlyingToPerpVaultSwapFeePerc.returns(toPercFixedPtAmt("1")); await expect(vault.swapUnderlyingForPerps(toFixedPtAmt("100"))).to.be.revertedWithCustomError( vault, "UnacceptableSwap", @@ -336,7 +342,8 @@ describe("RolloverVault", function () { describe("when fee is greater than 100%", function () { it("should be reverted", async function () { - await feePolicy.computeUnderlyingToPerpSwapFeePercs.returns([toPercFixedPtAmt("0.05"), toPercFixedPtAmt("1")]); + await feePolicy.computePerpMintFeePerc.returns(toPercFixedPtAmt("0.05")); + await feePolicy.computeUnderlyingToPerpVaultSwapFeePerc.returns(toPercFixedPtAmt("1")); await expect(vault.swapUnderlyingForPerps(toFixedPtAmt("100"))).to.be.reverted; }); }); @@ -344,7 +351,8 @@ describe("RolloverVault", function () { describe("on successful swap with zero fees", function () { let txFn: Promise; beforeEach(async function () { - await feePolicy.computeUnderlyingToPerpSwapFeePercs.returns([0, 0]); + await feePolicy.computePerpMintFeePerc.returns(0); + await feePolicy.computeUnderlyingToPerpVaultSwapFeePerc.returns(0); txFn = () => vault.swapUnderlyingForPerps(toFixedPtAmt("100")); }); @@ -354,7 +362,7 @@ describe("RolloverVault", function () { .to.emit(perp, "Transfer") .withArgs(constants.AddressZero, vault.address, toFixedPtAmt("100")); expect(await perp.totalSupply()).to.eq(toFixedPtAmt("900")); - expect(await perp.balanceOf(vault.address)).to.eq("0"); + expect(await perp.balanceOf(vault.address)).to.eq(0); }); it("should return the perp amt", async function () { @@ -373,7 +381,7 @@ describe("RolloverVault", function () { await checkReserveComposition( perp, [collateralToken, ...reserveTranches.slice(-3), currentTranchesIn[0]], - ["0", toFixedPtAmt("200"), toFixedPtAmt("200"), toFixedPtAmt("200"), toFixedPtAmt("200")], + [0, toFixedPtAmt("200"), toFixedPtAmt("200"), toFixedPtAmt("200"), toFixedPtAmt("200")], ); await checkVaultAssetComposition( @@ -387,7 +395,7 @@ describe("RolloverVault", function () { await checkReserveComposition( perp, [collateralToken, ...reserveTranches.slice(-3), currentTranchesIn[0]], - ["0", toFixedPtAmt("200"), toFixedPtAmt("200"), toFixedPtAmt("200"), toFixedPtAmt("300")], + [0, toFixedPtAmt("200"), toFixedPtAmt("200"), toFixedPtAmt("200"), toFixedPtAmt("300")], ); await checkVaultAssetComposition( @@ -407,7 +415,8 @@ describe("RolloverVault", function () { describe("on successful swap with zero perp fees", function () { let txFn: Promise; beforeEach(async function () { - await feePolicy.computeUnderlyingToPerpSwapFeePercs.returns([0, toPercFixedPtAmt("0.1")]); + await feePolicy.computePerpMintFeePerc.returns(0); + await feePolicy.computeUnderlyingToPerpVaultSwapFeePerc.returns(toPercFixedPtAmt("0.1")); txFn = () => vault.swapUnderlyingForPerps(toFixedPtAmt("100")); }); @@ -417,7 +426,7 @@ describe("RolloverVault", function () { .to.emit(perp, "Transfer") .withArgs(constants.AddressZero, vault.address, toFixedPtAmt("90")); expect(await perp.totalSupply()).to.eq(toFixedPtAmt("890")); - expect(await perp.balanceOf(vault.address)).to.eq("0"); + expect(await perp.balanceOf(vault.address)).to.eq(0); }); it("should return the perp amt", async function () { @@ -436,7 +445,7 @@ describe("RolloverVault", function () { await checkReserveComposition( perp, [collateralToken, ...reserveTranches.slice(-3), currentTranchesIn[0]], - ["0", toFixedPtAmt("200"), toFixedPtAmt("200"), toFixedPtAmt("200"), toFixedPtAmt("200")], + [0, toFixedPtAmt("200"), toFixedPtAmt("200"), toFixedPtAmt("200"), toFixedPtAmt("200")], ); await checkVaultAssetComposition( @@ -450,7 +459,7 @@ describe("RolloverVault", function () { await checkReserveComposition( perp, [collateralToken, ...reserveTranches.slice(-3), currentTranchesIn[0]], - ["0", toFixedPtAmt("200"), toFixedPtAmt("200"), toFixedPtAmt("200"), toFixedPtAmt("290")], + [0, toFixedPtAmt("200"), toFixedPtAmt("200"), toFixedPtAmt("200"), toFixedPtAmt("290")], ); await checkVaultAssetComposition( @@ -470,11 +479,8 @@ describe("RolloverVault", function () { describe("on successful swap", function () { let txFn: Promise; beforeEach(async function () { - await feePolicy.computePerpMintFeePerc.returns(toPercFixedPtAmt("1")); // though perp fee is set, it should ignore - await feePolicy.computeUnderlyingToPerpSwapFeePercs.returns([ - toPercFixedPtAmt("0.05"), - toPercFixedPtAmt("0.1"), - ]); + await feePolicy.computePerpMintFeePerc.returns(toPercFixedPtAmt("0.05")); + await feePolicy.computeUnderlyingToPerpVaultSwapFeePerc.returns(toPercFixedPtAmt("0.1")); txFn = () => vault.swapUnderlyingForPerps(toFixedPtAmt("100")); }); @@ -484,7 +490,7 @@ describe("RolloverVault", function () { .to.emit(perp, "Transfer") .withArgs(constants.AddressZero, vault.address, toFixedPtAmt("90")); expect(await perp.totalSupply()).to.eq(toFixedPtAmt("885")); - expect(await perp.balanceOf(vault.address)).to.eq("0"); + expect(await perp.balanceOf(vault.address)).to.eq(0); }); it("should burn perps as fee", async function () { @@ -509,7 +515,7 @@ describe("RolloverVault", function () { await checkReserveComposition( perp, [collateralToken, ...reserveTranches.slice(-3), currentTranchesIn[0]], - ["0", toFixedPtAmt("200"), toFixedPtAmt("200"), toFixedPtAmt("200"), toFixedPtAmt("200")], + [0, toFixedPtAmt("200"), toFixedPtAmt("200"), toFixedPtAmt("200"), toFixedPtAmt("200")], ); await checkVaultAssetComposition( @@ -523,7 +529,7 @@ describe("RolloverVault", function () { await checkReserveComposition( perp, [collateralToken, ...reserveTranches.slice(-3), currentTranchesIn[0]], - ["0", toFixedPtAmt("200"), toFixedPtAmt("200"), toFixedPtAmt("200"), toFixedPtAmt("290")], + [0, toFixedPtAmt("200"), toFixedPtAmt("200"), toFixedPtAmt("200"), toFixedPtAmt("290")], ); await checkVaultAssetComposition( @@ -543,7 +549,8 @@ describe("RolloverVault", function () { describe("on successful swap with imperfect rounding", function () { let txFn: Promise; beforeEach(async function () { - await feePolicy.computeUnderlyingToPerpSwapFeePercs.returns([toPercFixedPtAmt("0.1"), toPercFixedPtAmt("0.1")]); + await feePolicy.computePerpMintFeePerc.returns(toPercFixedPtAmt("0.1")); + await feePolicy.computeUnderlyingToPerpVaultSwapFeePerc.returns(toPercFixedPtAmt("0.1")); txFn = () => vault.swapUnderlyingForPerps(toFixedPtAmt("100.999999999999999999")); }); @@ -553,7 +560,7 @@ describe("RolloverVault", function () { .to.emit(perp, "Transfer") .withArgs(constants.AddressZero, vault.address, toFixedPtAmt("90.899999999999999999")); expect(await perp.totalSupply()).to.eq(toFixedPtAmt("880.799999999999999999")); - expect(await perp.balanceOf(vault.address)).to.eq("0"); + expect(await perp.balanceOf(vault.address)).to.eq(0); }); it("should burn perps as fee", async function () { @@ -584,7 +591,7 @@ describe("RolloverVault", function () { await checkReserveComposition( perp, [collateralToken, ...reserveTranches.slice(-3), currentTranchesIn[0]], - ["0", toFixedPtAmt("200"), toFixedPtAmt("200"), toFixedPtAmt("200"), toFixedPtAmt("200")], + [0, toFixedPtAmt("200"), toFixedPtAmt("200"), toFixedPtAmt("200"), toFixedPtAmt("200")], ); await checkVaultAssetComposition( @@ -598,7 +605,7 @@ describe("RolloverVault", function () { await checkReserveComposition( perp, [collateralToken, ...reserveTranches.slice(-3), currentTranchesIn[0]], - ["0", toFixedPtAmt("200"), toFixedPtAmt("200"), toFixedPtAmt("200"), toFixedPtAmt("290.899999999999999999")], + [0, toFixedPtAmt("200"), toFixedPtAmt("200"), toFixedPtAmt("200"), toFixedPtAmt("290.899999999999999999")], ); await checkVaultAssetComposition( @@ -619,10 +626,8 @@ describe("RolloverVault", function () { let txFn: Promise; beforeEach(async function () { await advancePerpQueueToBondMaturity(perp, await getDepositBond(perp)); - await feePolicy.computeUnderlyingToPerpSwapFeePercs.returns([ - toPercFixedPtAmt("0.05"), - toPercFixedPtAmt("0.1"), - ]); + await feePolicy.computePerpMintFeePerc.returns(toPercFixedPtAmt("0.05")); + await feePolicy.computeUnderlyingToPerpVaultSwapFeePerc.returns(toPercFixedPtAmt("0.1")); txFn = () => vault.swapUnderlyingForPerps(toFixedPtAmt("100")); }); @@ -632,7 +637,7 @@ describe("RolloverVault", function () { .to.emit(perp, "Transfer") .withArgs(constants.AddressZero, vault.address, toFixedPtAmt("90")); expect(await perp.totalSupply()).to.eq(toFixedPtAmt("885")); - expect(await perp.balanceOf(vault.address)).to.eq("0"); + expect(await perp.balanceOf(vault.address)).to.eq(0); }); it("should burn perps as fee", async function () { @@ -690,14 +695,15 @@ describe("RolloverVault", function () { describe("#swapPerpsForUnderlying", function () { describe("when fee is zero", function () { beforeEach(async function () { - await feePolicy.computePerpToUnderlyingSwapFeePercs.returns([0, 0]); + await feePolicy.computePerpBurnFeePerc.returns(0); + await feePolicy.computePerpToUnderlyingVaultSwapFeePerc.returns(0); }); describe("when perp price is 1", function () { it("should compute swap amount", async function () { const s = await vault.callStatic.computePerpToUnderlyingSwapAmt(toFixedPtAmt("100")); expect(s[0]).to.eq(toFixedPtAmt("100")); - expect(s[1]).to.eq("0"); + expect(s[1]).to.eq(0); expect(s[2].perpTVL).to.eq(toFixedPtAmt("800")); expect(s[2].vaultTVL).to.eq(toFixedPtAmt("2000")); expect(s[2].seniorTR).to.eq("200"); @@ -711,7 +717,7 @@ describe("RolloverVault", function () { it("should compute swap amount", async function () { const s = await vault.callStatic.computePerpToUnderlyingSwapAmt(toFixedPtAmt("100")); expect(s[0]).to.eq(toFixedPtAmt("200")); - expect(s[1]).to.eq("0"); + expect(s[1]).to.eq(0); expect(s[2].perpTVL).to.eq(toFixedPtAmt("1600")); expect(s[2].vaultTVL).to.eq(toFixedPtAmt("2000")); expect(s[2].seniorTR).to.eq("200"); @@ -725,7 +731,7 @@ describe("RolloverVault", function () { it("should compute swap amount", async function () { const s = await vault.callStatic.computePerpToUnderlyingSwapAmt(toFixedPtAmt("100")); expect(s[0]).to.eq(toFixedPtAmt("50")); - expect(s[1]).to.eq("0"); + expect(s[1]).to.eq(0); expect(s[2].perpTVL).to.eq(toFixedPtAmt("400")); expect(s[2].vaultTVL).to.eq(toFixedPtAmt("120")); expect(s[2].seniorTR).to.eq("200"); @@ -735,10 +741,8 @@ describe("RolloverVault", function () { describe("when fee is not zero", function () { beforeEach(async function () { - await feePolicy.computePerpToUnderlyingSwapFeePercs.returns([ - toPercFixedPtAmt("0.05"), - toPercFixedPtAmt("0.15"), - ]); + await feePolicy.computePerpBurnFeePerc.returns(toPercFixedPtAmt("0.05")); + await feePolicy.computePerpToUnderlyingVaultSwapFeePerc.returns(toPercFixedPtAmt("0.15")); }); it("should compute swap amount", async function () { @@ -753,13 +757,14 @@ describe("RolloverVault", function () { describe("when swap amount is zero", function () { it("should be reverted", async function () { - await expect(vault.swapPerpsForUnderlying("0")).to.be.revertedWithCustomError(vault, "UnacceptableSwap"); + await expect(vault.swapPerpsForUnderlying(0)).to.be.revertedWithCustomError(vault, "UnacceptableSwap"); }); }); describe("when fee is 100%", function () { it("should be reverted", async function () { - await feePolicy.computePerpToUnderlyingSwapFeePercs.returns([0, toPercFixedPtAmt("1")]); + await feePolicy.computePerpBurnFeePerc.returns(0); + await feePolicy.computePerpToUnderlyingVaultSwapFeePerc.returns(toPercFixedPtAmt("1")); await expect(vault.swapPerpsForUnderlying(toFixedPtAmt("100"))).to.be.revertedWithCustomError( vault, "UnacceptableSwap", @@ -769,7 +774,8 @@ describe("RolloverVault", function () { describe("when fee is greater than 100%", function () { it("should be reverted", async function () { - await feePolicy.computePerpToUnderlyingSwapFeePercs.returns([toPercFixedPtAmt("0.05"), toPercFixedPtAmt("1")]); + await feePolicy.computePerpBurnFeePerc.returns(toPercFixedPtAmt("0.05")); + await feePolicy.computePerpToUnderlyingVaultSwapFeePerc.returns(toPercFixedPtAmt("1")); await expect(vault.swapPerpsForUnderlying(toFixedPtAmt("100"))).to.be.reverted; }); }); @@ -777,7 +783,8 @@ describe("RolloverVault", function () { describe("on successful swap with zero fees", function () { let txFn: Promise; beforeEach(async function () { - await feePolicy.computePerpToUnderlyingSwapFeePercs.returns([toPercFixedPtAmt("0"), toPercFixedPtAmt("0")]); + await feePolicy.computePerpBurnFeePerc.returns(0); + await feePolicy.computePerpToUnderlyingVaultSwapFeePerc.returns(0); txFn = () => vault.swapPerpsForUnderlying(toFixedPtAmt("100")); }); @@ -787,7 +794,7 @@ describe("RolloverVault", function () { .to.emit(perp, "Transfer") .withArgs(vault.address, constants.AddressZero, toFixedPtAmt("100")); expect(await perp.totalSupply()).to.eq(toFixedPtAmt("700")); - expect(await perp.balanceOf(vault.address)).to.eq("0"); + expect(await perp.balanceOf(vault.address)).to.eq(0); }); it("should return the underlying amt", async function () { @@ -806,7 +813,7 @@ describe("RolloverVault", function () { await checkReserveComposition( perp, [collateralToken, ...reserveTranches.slice(-3), currentTranchesIn[0]], - ["0", toFixedPtAmt("200"), toFixedPtAmt("200"), toFixedPtAmt("200"), toFixedPtAmt("200")], + [0, toFixedPtAmt("200"), toFixedPtAmt("200"), toFixedPtAmt("200"), toFixedPtAmt("200")], ); await checkVaultAssetComposition( @@ -820,7 +827,7 @@ describe("RolloverVault", function () { await checkReserveComposition( perp, [collateralToken, ...reserveTranches.slice(-3), currentTranchesIn[0]], - ["0", toFixedPtAmt("175"), toFixedPtAmt("175"), toFixedPtAmt("175"), toFixedPtAmt("175")], + [0, toFixedPtAmt("175"), toFixedPtAmt("175"), toFixedPtAmt("175"), toFixedPtAmt("175")], ); await checkVaultAssetComposition( @@ -840,7 +847,8 @@ describe("RolloverVault", function () { describe("on successful swap with zero perp fees", function () { let txFn: Promise; beforeEach(async function () { - await feePolicy.computePerpToUnderlyingSwapFeePercs.returns([toPercFixedPtAmt("0"), toPercFixedPtAmt("0.1")]); + await feePolicy.computePerpBurnFeePerc.returns(0); + await feePolicy.computePerpToUnderlyingVaultSwapFeePerc.returns(toPercFixedPtAmt("0.1")); txFn = () => vault.swapPerpsForUnderlying(toFixedPtAmt("100")); }); @@ -850,7 +858,7 @@ describe("RolloverVault", function () { .to.emit(perp, "Transfer") .withArgs(vault.address, constants.AddressZero, toFixedPtAmt("100")); expect(await perp.totalSupply()).to.eq(toFixedPtAmt("700")); - expect(await perp.balanceOf(vault.address)).to.eq("0"); + expect(await perp.balanceOf(vault.address)).to.eq(0); }); it("should return the underlying amt", async function () { @@ -869,7 +877,7 @@ describe("RolloverVault", function () { await checkReserveComposition( perp, [collateralToken, ...reserveTranches.slice(-3), currentTranchesIn[0]], - ["0", toFixedPtAmt("200"), toFixedPtAmt("200"), toFixedPtAmt("200"), toFixedPtAmt("200")], + [0, toFixedPtAmt("200"), toFixedPtAmt("200"), toFixedPtAmt("200"), toFixedPtAmt("200")], ); await checkVaultAssetComposition( @@ -883,7 +891,7 @@ describe("RolloverVault", function () { await checkReserveComposition( perp, [collateralToken, ...reserveTranches.slice(-3), currentTranchesIn[0]], - ["0", toFixedPtAmt("175"), toFixedPtAmt("175"), toFixedPtAmt("175"), toFixedPtAmt("175")], + [0, toFixedPtAmt("175"), toFixedPtAmt("175"), toFixedPtAmt("175"), toFixedPtAmt("175")], ); await checkVaultAssetComposition( @@ -903,11 +911,8 @@ describe("RolloverVault", function () { describe("on successful swap", function () { let txFn: Promise; beforeEach(async function () { - await feePolicy.computePerpBurnFeePerc.returns(toPercFixedPtAmt("1")); // though perp fee is set, it should ignore - await feePolicy.computePerpToUnderlyingSwapFeePercs.returns([ - toPercFixedPtAmt("0.1"), - toPercFixedPtAmt("0.15"), - ]); + await feePolicy.computePerpBurnFeePerc.returns(toPercFixedPtAmt("0.1")); + await feePolicy.computePerpToUnderlyingVaultSwapFeePerc.returns(toPercFixedPtAmt("0.15")); txFn = () => vault.swapPerpsForUnderlying(toFixedPtAmt("100")); }); @@ -917,7 +922,7 @@ describe("RolloverVault", function () { .to.emit(perp, "Transfer") .withArgs(vault.address, constants.AddressZero, toFixedPtAmt("90")); expect(await perp.totalSupply()).to.eq(toFixedPtAmt("700")); - expect(await perp.balanceOf(vault.address)).to.eq("0"); + expect(await perp.balanceOf(vault.address)).to.eq(0); }); it("should burn perps as fee", async function () { @@ -942,7 +947,7 @@ describe("RolloverVault", function () { await checkReserveComposition( perp, [collateralToken, ...reserveTranches.slice(-3), currentTranchesIn[0]], - ["0", toFixedPtAmt("200"), toFixedPtAmt("200"), toFixedPtAmt("200"), toFixedPtAmt("200")], + [0, toFixedPtAmt("200"), toFixedPtAmt("200"), toFixedPtAmt("200"), toFixedPtAmt("200")], ); await checkVaultAssetComposition( @@ -957,7 +962,7 @@ describe("RolloverVault", function () { perp, [collateralToken, ...reserveTranches.slice(-3), currentTranchesIn[0]], [ - "0", + 0, toFixedPtAmt("177.215189873417721519"), toFixedPtAmt("177.215189873417721519"), toFixedPtAmt("177.215189873417721519"), @@ -989,7 +994,8 @@ describe("RolloverVault", function () { describe("on successful swap with imperfect rounding", function () { let txFn: Promise; beforeEach(async function () { - await feePolicy.computePerpToUnderlyingSwapFeePercs.returns([toPercFixedPtAmt("0.1"), toPercFixedPtAmt("0.1")]); + await feePolicy.computePerpBurnFeePerc.returns(toPercFixedPtAmt("0.1")); + await feePolicy.computePerpToUnderlyingVaultSwapFeePerc.returns(toPercFixedPtAmt("0.1")); txFn = () => vault.swapPerpsForUnderlying(toFixedPtAmt("100.999999999999999999")); }); @@ -999,7 +1005,7 @@ describe("RolloverVault", function () { .to.emit(perp, "Transfer") .withArgs(vault.address, constants.AddressZero, toFixedPtAmt("90.899999999999999999")); expect(await perp.totalSupply()).to.eq(toFixedPtAmt("699.000000000000000001")); - expect(await perp.balanceOf(vault.address)).to.eq("0"); + expect(await perp.balanceOf(vault.address)).to.eq(0); }); it("should burn perps as fee", async function () { @@ -1026,7 +1032,7 @@ describe("RolloverVault", function () { await checkReserveComposition( perp, [collateralToken, ...reserveTranches.slice(-3), currentTranchesIn[0]], - ["0", toFixedPtAmt("200"), toFixedPtAmt("200"), toFixedPtAmt("200"), toFixedPtAmt("200")], + [0, toFixedPtAmt("200"), toFixedPtAmt("200"), toFixedPtAmt("200"), toFixedPtAmt("200")], ); await checkVaultAssetComposition( @@ -1041,7 +1047,7 @@ describe("RolloverVault", function () { perp, [collateralToken, ...reserveTranches.slice(-3), currentTranchesIn[0]], [ - "0", + 0, toFixedPtAmt("176.984428408659323966"), toFixedPtAmt("176.984428408659323966"), toFixedPtAmt("176.984428408659323966"), @@ -1073,10 +1079,8 @@ describe("RolloverVault", function () { describe("on successful swap with some the juniors in the vault", function () { let txFn: Promise; beforeEach(async function () { - await feePolicy.computePerpToUnderlyingSwapFeePercs.returns([ - toPercFixedPtAmt("0.1"), - toPercFixedPtAmt("0.15"), - ]); + await feePolicy.computePerpBurnFeePerc.returns(toPercFixedPtAmt("0.1")); + await feePolicy.computePerpToUnderlyingVaultSwapFeePerc.returns(toPercFixedPtAmt("0.15")); remainingJuniorTranches[1].transfer(vault.address, toFixedPtAmt("100")); remainingJuniorTranches[2].transfer(vault.address, toFixedPtAmt("100")); remainingJuniorTranches[3].transfer(vault.address, toFixedPtAmt("100")); @@ -1089,7 +1093,7 @@ describe("RolloverVault", function () { .to.emit(perp, "Transfer") .withArgs(vault.address, constants.AddressZero, toFixedPtAmt("180")); expect(await perp.totalSupply()).to.eq(toFixedPtAmt("600")); - expect(await perp.balanceOf(vault.address)).to.eq("0"); + expect(await perp.balanceOf(vault.address)).to.eq(0); }); it("should burn perps as fee", async function () { @@ -1114,7 +1118,7 @@ describe("RolloverVault", function () { await checkReserveComposition( perp, [collateralToken, ...reserveTranches.slice(-3), currentTranchesIn[0]], - ["0", toFixedPtAmt("200"), toFixedPtAmt("200"), toFixedPtAmt("200"), toFixedPtAmt("200")], + [0, toFixedPtAmt("200"), toFixedPtAmt("200"), toFixedPtAmt("200"), toFixedPtAmt("200")], ); await checkVaultAssetComposition( @@ -1129,7 +1133,7 @@ describe("RolloverVault", function () { perp, [collateralToken, ...reserveTranches.slice(-3), currentTranchesIn[0]], [ - "0", + 0, toFixedPtAmt("153.846153846153846154"), toFixedPtAmt("153.846153846153846154"), toFixedPtAmt("153.846153846153846154"), @@ -1161,10 +1165,8 @@ describe("RolloverVault", function () { describe("on successful swap with all the juniors in the vault", function () { let txFn: Promise; beforeEach(async function () { - await feePolicy.computePerpToUnderlyingSwapFeePercs.returns([ - toPercFixedPtAmt("0.1"), - toPercFixedPtAmt("0.15"), - ]); + await feePolicy.computePerpBurnFeePerc.returns(toPercFixedPtAmt("0.1")); + await feePolicy.computePerpToUnderlyingVaultSwapFeePerc.returns(toPercFixedPtAmt("0.15")); remainingJuniorTranches[1].transfer(vault.address, toFixedPtAmt("800")); remainingJuniorTranches[2].transfer(vault.address, toFixedPtAmt("800")); @@ -1179,7 +1181,7 @@ describe("RolloverVault", function () { .to.emit(perp, "Transfer") .withArgs(vault.address, constants.AddressZero, toFixedPtAmt("180")); expect(await perp.totalSupply()).to.eq(toFixedPtAmt("600")); - expect(await perp.balanceOf(vault.address)).to.eq("0"); + expect(await perp.balanceOf(vault.address)).to.eq(0); }); it("should burn perps as fee", async function () { @@ -1204,7 +1206,7 @@ describe("RolloverVault", function () { await checkReserveComposition( perp, [collateralToken, ...reserveTranches.slice(-3), currentTranchesIn[0]], - ["0", toFixedPtAmt("200"), toFixedPtAmt("200"), toFixedPtAmt("200"), toFixedPtAmt("200")], + [0, toFixedPtAmt("200"), toFixedPtAmt("200"), toFixedPtAmt("200"), toFixedPtAmt("200")], ); await checkVaultAssetComposition( @@ -1219,7 +1221,7 @@ describe("RolloverVault", function () { perp, [collateralToken, ...reserveTranches.slice(-3), currentTranchesIn[0]], [ - "0", + 0, toFixedPtAmt("153.846153846153846154"), toFixedPtAmt("153.846153846153846154"), toFixedPtAmt("153.846153846153846154"),