Sales Policy
Last updated
Last updated
Uno Re will be insuring a set of pre-defined smart contracts/protocols. Each protocol will have an associated SalesPolicy contract which will be created by the addProtocol
function in the Sales Policy Factory Contract. When the addProtocol
function will be called a new Sales Policy contract will be created based on ERC271. The ERC721 is to represent bought policies for that particular protocol.
And we partner with Biconomy and support gasless meta transactions based on EIP-712 signature for the policy purchase function.
To buy a policy for insuring funds in a particular protocol the buyPolicy
function will be called through executeMetaTransaction function by the user.
executeMetaTransaction function is in EIP712MetaTransaction basic contract of biconomy, which is inherited into SalesPolicy contract and it will help gasless metatransaction with biconomy SDK or API.
We need to verify if the buyer sends the correct policy info including coverage amount and policy price. So we will check this function transaction on the backend using the signer's signature, which is determined by the project team.
_coverageAmount : refers to the amount being insured in that particular protocol
_coverageDuration : refers to the duration for which the cover is being bought
_policyPriceInUSDT : refers to the price of the policy in USDT
_signedTime : refers to the time at which the signature was signed
_premiumCurrency : refers to the currency in which the policy is being bought
r : refers to sign parameters
s : refers to sign parameters
v : refers to sign parameters