⚠️ CYG Rewards were paused on July 7th 2024 due to upgrade from v1 to v2 (see below). Will be resumed shortly starting with a new rewarder contract.
1.0.0
- Was deployed on Polygon (PoS) and Arbitrum. Calculated epoch on the fly, causing the contract to be out of sync if no tx made it advance manually. (Oct 10 2023)2.0.0
- Introduces a variable to keep track of epochs internally. Removes unneeded checks when claiming CYG and some gas optimizations. (Jan 10 2024)
The CYG token is a LayerZero OFT, meaning the token is native to each chain. The token on Ethereum is also integrated wtih Starknet Core to allow CYG to be bridged between these two, as LayerZero does not support Starknet yet.
The Pillars Of Creation is a contract that allows borrowers and lenders to collect CYG based on how much they have deposited at the core contracts. Borrowers accrue CYG rewards based on their borrowed amount, while lenders accrue CYG rewards based on their deposited USD amount.
The CYG emissions per block is based on the total amount of CYG rewards, the total number of epochs and an emissions curve that reduces each epoch's emissions by 2.5% until it reaches its planned death.
totalCygAtN = ((totalRewards - accumulatedRewards) * reductionFactor) / emissionsCurve(epoch)
where totalRewards is the total amount of rewards that will be distributed over all epochs, accumulatedRewards is the total amount of rewards that have been distributed in previous epochs, reductionFactor is the percentage by which the rewards are reduced every epoch, and emissionsCurve(epoch) is the function that returns the curve.
The emissions curve is calculated using the following formula:
emissionsCurve(epoch) = (1 - reductionFactor)^epoch
where reductionFactor is the percentage by which the rewards are reduced every epoch, and epoch is the current epoch.
The total CYG on each chain is 5,000,000 M to be minted over 6 years, with most rewards (>70%) going to lenders/borrowers and the rest to the DAO, where each epoch emissions reduce by 1%:
|
800k |_______.
| |
700k | |
| | Example with 1.75M totalRewards, 2% reduction and 100 epochs
600k | |
| | Epochs | Rewards
500M | | -------------|---------------
| |_______. 00 - 24 | 800,037.32
rewards 400k | | | 25 - 49 | 482,794.30
| | | 50 - 74 | 291,349.33
300k | | |_______. 75 - 99 | 175,819.05
| | | | | 1,750,000.00
200k | | | |_______
| | | | |
100k | | | | |
| | | | |
|_______|_______|_______|_______|__
00-24 25-49 50-74 75-99
epochs
The total CYG emissions schedule for borrowers and lenders is:
Epoch | Epoch Rewards | Cyg Per Block |
---|---|---|
0 | 40351.3824 | 0.0159941742770167 |
1 | 39544.354752 | 0.0156742907914764 |
2 | 38753.46765696 | 0.0153608049756469 |
3 | 37978.3983038208 | 0.0150535888761339 |
4 | 37218.8303377444 | 0.0147525170986113 |
5 | 36474.4537309895 | 0.014457466756639 |
6 | 35744.9646563697 | 0.0141683174215063 |
7 | 35030.0653632423 | 0.0138849510730761 |
8 | 34329.4640559775 | 0.0136072520516146 |
9 | 33642.8747748579 | 0.0133351070105823 |
10 | 32970.0172793608 | 0.0130684048703707 |
11 | 32310.6169337735 | 0.0128070367729633 |
12 | 31664.4045950981 | 0.012550896037504 |
13 | 31031.1165031961 | 0.0122998781167539 |
14 | 30410.4941731322 | 0.0120538805544188 |
15 | 29802.2842896695 | 0.0118128029433305 |
16 | 29206.2386038761 | 0.0115765468844638 |
17 | 28622.1138317986 | 0.0113450159467746 |
18 | 28049.6715551626 | 0.0111181156278391 |
19 | 27488.6781240594 | 0.0108957533152823 |
20 | 26938.9045615782 | 0.0106778382489766 |
21 | 26400.1264703466 | 0.0104642814839971 |
22 | 25872.1239409397 | 0.0102549958543172 |
23 | 25354.6814621209 | 0.0100498959372308 |
24 | 24847.5878328785 | 0.00984889801848621 |
25 | 24350.6360762209 | 0.00965192005811649 |
26 | 23863.6233546965 | 0.00945888165695416 |
27 | 23386.3508876026 | 0.00926970402381508 |
28 | 22918.6238698505 | 0.00908430994333877 |
29 | 22460.2513924535 | 0.008902623744472 |
30 | 22011.0463646044 | 0.00872457126958256 |
31 | 21570.8254373124 | 0.00855007984419091 |
32 | 21139.4089285661 | 0.00837907824730709 |
33 | 20716.6207499948 | 0.00821149668236095 |
34 | 20302.2883349949 | 0.00804726674871373 |
35 | 19896.242568295 | 0.00788632141373945 |
36 | 19498.3177169291 | 0.00772859498546467 |
37 | 19108.3513625905 | 0.00757402308575537 |
38 | 18726.1843353387 | 0.00742254262404026 |
39 | 18351.6606486319 | 0.00727409177155946 |
40 | 17984.6274356593 | 0.00712860993612827 |
41 | 17624.9348869461 | 0.0069860377374057 |
42 | 17272.4361892072 | 0.00684631698265759 |
43 | 16926.987465423 | 0.00670939064300444 |
44 | 16588.4477161146 | 0.00657520283014435 |
45 | 16256.6787617923 | 0.00644369877354146 |
46 | 15931.5451865564 | 0.00631482479807063 |
47 | 15612.9142828253 | 0.00618852830210922 |
48 | 15300.6559971688 | 0.00606475773606704 |
49 | 14994.6428772254 | 0.0059434625813457 |
50 | 14694.7500196809 | 0.00582459332971878 |
51 | 14400.8550192873 | 0.00570810146312441 |
52 | 14112.8379189016 | 0.00559393943386192 |
53 | 13830.5811605235 | 0.00548206064518468 |
54 | 13553.9695373131 | 0.00537241943228099 |
55 | 13282.8901465668 | 0.00526497104363537 |
56 | 13017.2323436355 | 0.00515967162276266 |
57 | 12756.8876967627 | 0.00505647819030741 |
58 | 12501.7499428275 | 0.00495534862650126 |
59 | 12251.7149439709 | 0.00485624165397123 |
60 | 12006.6806450915 | 0.00475911682089181 |
61 | 11766.5470321897 | 0.00466393448447397 |
62 | 11531.2160915459 | 0.00457065579478449 |
63 | 11300.591769715 | 0.0044792426788888 |
64 | 11074.5799343207 | 0.00438965782531103 |
65 | 10853.0883356343 | 0.00430186466880481 |
66 | 10636.0265689216 | 0.00421582737542871 |
67 | 10423.3060375431 | 0.00413151082792013 |
68 | 10214.8399167923 | 0.00404888061136173 |
69 | 10010.5431184564 | 0.0039679029991345 |
70 | 9810.33225608731 | 0.00388854493915181 |
71 | 9614.12561096556 | 0.00381077404036877 |
72 | 9421.84309874625 | 0.00373455855956139 |
73 | 9233.40623677132 | 0.00365986738837017 |
74 | 9048.7381120359 | 0.00358667004060276 |
75 | 8867.76334979518 | 0.00351493663979071 |
76 | 8690.40808279928 | 0.00344463790699489 |
77 | 8516.59992114329 | 0.003375745148855 |
78 | 8346.26792272043 | 0.0033082302458779 |
79 | 8179.34256426602 | 0.00324206564096034 |
80 | 8015.7557129807 | 0.00317722432814113 |
81 | 7855.44059872108 | 0.00311367984157831 |
82 | 7698.33178674666 | 0.00305140624474674 |
83 | 7544.36515101173 | 0.00299037811985181 |
84 | 7393.47784799149 | 0.00293057055745477 |
85 | 7245.60829103166 | 0.00287195914630568 |
86 | 7100.69612521103 | 0.00281451996337956 |
87 | 6958.68220270681 | 0.00275822956411197 |
88 | 6819.50855865267 | 0.00270306497282973 |
89 | 6683.11838747962 | 0.00264900367337314 |
90 | 6549.45601973003 | 0.00259602359990567 |
91 | 6418.46689933543 | 0.00254410312790756 |
92 | 6290.09756134872 | 0.00249322106534941 |
93 | 6164.29561012174 | 0.00244335664404242 |
94 | 6041.00969791931 | 0.00239448951116157 |
95 | 5920.18950396092 | 0.00234659972093834 |
96 | 5801.7857138817 | 0.00229966772651957 |
97 | 5685.74999960407 | 0.00225367437198918 |
98 | 5572.03499961199 | 0.0022086008845494 |
99 | 5460.59429961975 | 0.00216442886685841 |
1,750,000 |
TODO: Example of collecting CYG for borrowers and lenders