|
| 1 | +# What is RadInsurance ? |
| 2 | + |
| 3 | +RadInsurance is a simplified version of a decentralized insurance protocol. The objective of this protocol is to improve the implementation of insurance by providing a more robust protocol in the future. The simplified protocol has several features that are explained in details. |
| 4 | + |
| 5 | +Firstly, the protocol involves insurers investing in an insurance policy and being rewarded based on the contributions made by the insured. The rate of reward for insurers is equal to the rate of contributions made by the insured. This means that the more the insured contribute, the more the insurers will be rewarded. |
| 6 | + |
| 7 | +Secondly, the maximum coverage for the insurance policy is equal to the amount invested by insurers. This means that the coverage provided by the insurance policy is directly proportional to the investment made by the insurers. |
| 8 | + |
| 9 | +Thirdly, insurers cannot withdraw their investment but can sell it on the marketplace of insurers in case of liquidity needs. This provides flexibility to insurers who might need liquidity in the future. |
| 10 | + |
| 11 | +Lastly, fixed service fees are deducted during the investment of insurers and the subscription of the insured. |
| 12 | + |
| 13 | +In summary, the main idea is to propose a simplified version of a decentralized insurance protocol that has certain features that can improve the implementation of insurance. These features include rewards for insurers based on contributions made by the insured, a coverage directly proportional to the investment made by the insurers, flexibility for insurers to sell their investment on the marketplace and fixed service fees for both insurers and the insured. |
| 14 | + |
| 15 | +If you are an insurance professionnal or if you have extensive knowledge of insurance topics, feel free to join us, you are welcome to the team ! :smiley: |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | +## Quick start |
| 20 | + |
| 21 | +Open a terminal window |
| 22 | + |
| 23 | +Build scrypto project : |
| 24 | + |
| 25 | + ./scrypto/build.sh |
| 26 | + |
| 27 | +### This application allows to : |
| 28 | + |
| 29 | +An administrator to create an insurance policy : |
| 30 | + |
| 31 | + cd ./scrypto/rad_insurance/demo && ./create_policy.sh |
| 32 | + |
| 33 | +Anonymous users to invest liquidity in an insurance policy and thus become an insurer : |
| 34 | + |
| 35 | + cd ./scrypto/rad_insurance/demo && ./invest_as_insurer.sh |
| 36 | + |
| 37 | +Insurers to withdraw their rewards : |
| 38 | + |
| 39 | + cd ./scrypto/rad_insurance/demo && ./rewards_withdrawal.sh |
| 40 | + |
| 41 | +Anonymous users to subscribe to an insurance policy and thus become insured : |
| 42 | + |
| 43 | + cd ./scrypto/rad_insurance/demo && ./subscribe_to_insurance_policy.sh |
| 44 | + |
| 45 | +Insured to report a claim : |
| 46 | + |
| 47 | + cd ./scrypto/rad_insurance/demo && ./report_a_claim.sh |
| 48 | + |
| 49 | +The administrator to accept the claim report and allow the insured to withdraw the amount : |
| 50 | + |
| 51 | + cd ./scrypto/rad_insurance/demo && ./make_claim_as_accepted.sh |
| 52 | + |
| 53 | +The administrator to refuse the claim report : |
| 54 | + |
| 55 | + cd ./scrypto/rad_insurance/demo && ./make_claim_as_refused.sh |
| 56 | + |
| 57 | +Insurers to claim withdraw : |
| 58 | + |
| 59 | + cd ./scrypto/rad_insurance/demo && ./claim_withdraw.sh |
| 60 | + |
| 61 | +Insurers to get rewards : |
| 62 | + |
| 63 | + cd ./scrypto/rad_insurance/demo && ./get_rewards.sh |
| 64 | + |
| 65 | +Insurers to withdraw sale amount : |
| 66 | + |
| 67 | + cd ./scrypto/rad_insurance/demo && ./withdrawal_sale_amount.sh |
| 68 | + |
| 69 | +Insurers to buy on marketplace : |
| 70 | + |
| 71 | + cd ./scrypto/rad_insurance/demo && ./buy_on_marketplace.sh |
| 72 | + |
| 73 | +Insurers to list on marketplace : |
| 74 | + |
| 75 | + cd ./scrypto/rad_insurance/demo && ./list_on_marketplace.sh |
| 76 | + |
| 77 | +Insurers to delist on marketplace : |
| 78 | + |
| 79 | + cd ./scrypto/rad_insurance/demo && ./delist_on_marketplace.sh |
| 80 | + |
| 81 | + |
| 82 | +# Run front application |
| 83 | + |
| 84 | +Open a new terminal window |
| 85 | + |
| 86 | +Go to scrypto-frontend folder and install packages |
| 87 | + |
| 88 | + cd ./scrypto-frontend && npm install |
| 89 | + |
| 90 | +The frontend application is developed in Angular. You can therefore launch the application with this command : |
| 91 | + |
| 92 | + ng serve |
| 93 | + |
| 94 | +Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files. |
| 95 | + |
| 96 | +##### :warning: We encountered compilation errors from the @radixdlt/radix-dapp-toolkit module |
| 97 | +the following error occurs: |
| 98 | + |
| 99 | + |
| 100 | + |
| 101 | +The file containing the bug is located in the following path : |
| 102 | +` node_modules/@radixdlt/wallet-sdk/dist/IO/schemas.d.ts` |
| 103 | + |
| 104 | +To fix this error, you can just add the missing braces around `z` in the import : |
| 105 | + |
| 106 | + import { z } from 'zod'; |
0 commit comments