solace-fi / solace-core

solace.fi smart contracts
GNU General Public License v3.0
6 stars 3 forks source link

Product - Position Description #190

Closed leonardishere closed 3 years ago

leonardishere commented 3 years ago

Currently each policy can only cover a single position in a single protocol, designated by address positionContract. We don't want to provide blanket coverage for entire protocols but should support multiple positions within that protocol. Switch address positionContract to bytes positionDescription, a byte encoded description of the position(s). The description of our current products will be a simple concatenation of the positionContracts. On Product.buyPolicy() we need to verify the positionDescription is valid and each positionContract is within the coveredPlatform. This also allows for coverage of other "less conformant" protocols, such as Uniswap V3 where the description would be a concatenation of the LP Token IDs.