find a valid bug in this contract with  fuzzing involves analyzing the ABI or bytecode, generating randomized valid inputs for their functions, executing the contract with these inputs, and examining the results to identify and report any weaknesses here is contract and the ABI 0x0003000000000002000100000000000200020000000103550000006001100270000002f30010019d000100000000001f00000001012001900000003d0000c13d0000008001000039000000400010043f0000000001000031000000040110008c0000013d0000413d0000000201000367000000000101043b000000e001100270000002fa0210009c000000970000a13d000002fb0210009c000000a90000a13d000002fc0210009c000000e80000613d000002fd0210009c000000f40000613d000002fe0110009c0000013d0000c13d0000000001000416000000000101004b0000013d0000c13d000000040100008a0000000001100031000002f502000041000000000301004b00000000030000190000000003024019000002f501100197000000000401004b000000000200a019000002f50110009c00000000010300190000000001026019000000000101004b0000013d0000c13d000000400100043d000100000001001d0000030601000041000000000010043900000000010004120000000400100443000000200100003900000024001004430bc601b20000040f000002f60110019700000001030000290000000000130435000002f301000041000002f30230009c0000000001034019000000400110021000000307011001c700000bc70001042e000000e001000039000000400010043f0000000001000416000000000101004b0000013d0000c13d00000000020000310000001f01200039000000200300008a000000000431016f000000400600043d0000000001640019000000000441004b00000000040000190000000104004039000002f40510009c000000910000213d0000000104400190000000910000c13d000000400010043f0000001f0120018f000000020400036700000005052002720000005d0000613d000000000700001900000005087002100000000009860019000000000884034f000000000808043b00000000008904350000000107700039000000000857004b000000550000413d000000000701004b0000006c0000613d0000000505500210000000000454034f00000000055600190000000301100210000000000705043300000000071701cf000000000717022f000000000404043b0000010001100089000000000414022f00000000011401cf000000000171019f0000000000150435000002f501000041000000c00420008c00000000040000190000000004014019000002f505200197000000000705004b000000000100a019000002f50550009c000000000104c019000000000101004b0000013d0000c13d0000000041060434000002f60510009c0000013d0000213d0000000005040433000002f40450009c0000013d0000213d000000000426001900000000026500190000001f05200039000002f507000041000000000845004b00000000080000190000000008078019000002f505500197000002f509400197000000000a95004b0000000007008019000000000595013f000002f50550009c00000000050800190000000005076019000000000505004b0000013d0000c13d0000000057020434000002f40270009c0000014a0000a13d000002f80100004100000000001004350000004101000039000000040010043f000002f90100004100000bc800010430000003010210009c000000c20000213d000003040210009c000001020000613d000003050110009c0000013d0000c13d0000000001000416000000000101004b0000013d0000c13d00000000010000310bc6028c0000040f0bc605d90000040f000002f301000041000000400200043d000002f30320009c0000000001024019000000400110021000000bc70001042e000002ff0210009c0000011d0000613d000003000110009c0000013d0000c13d0000000001000416000000000101004b0000013d0000c13d00000000010000310bc602a10000040f0bc609860000040f0000000002010019000000400100043d000100000001001d0bc602d00000040f00000001040000290000000001410049000002f302000041000002f30310009c0000000001028019000002f30340009c000000000204401900000040022002100000006001100210000000000121019f00000bc70001042e000003020210009c0000012c0000613d000003030110009c0000013d0000c13d0000000001000416000000000101004b0000013d0000c13d000000040100008a0000000001100031000002f502000041000000000301004b00000000030000190000000003024019000002f501100197000000000401004b000000000200a019000002f50110009c00000000010300190000000001026019000000000101004b0000013d0000c13d000000400100043d000100000001001d0000030601000041000000000010043900000000010004120000000400100443000000400100003900000024001004430bc601b20000040f00000001030000290000000000130435000002f301000041000002f30230009c0000000001034019000000400110021000000307011001c700000bc70001042e0000000001000416000000000101004b0000013d0000c13d00000000010000310bc602df0000040f0bc6032b0000040f000002f301000041000000400200043d000002f30320009c0000000001024019000000400110021000000bc70001042e0000000001000416000000000101004b0000013d0000c13d00000000010000310bc6028c0000040f0bc607be0000040f000000400200043d0000000000120435000002f301000041000002f30320009c0000000001024019000000400110021000000307011001c700000bc70001042e0000000001000416000000000101004b0000013d0000c13d000000040100008a0000000001100031000002f502000041000000000301004b00000000030000190000000003024019000002f501100197000000000401004b000000000200a019000002f50110009c00000000010300190000000001026019000000000101004b0000013d0000c13d000003060100004100000000001004390000000001000412000000040010044300000024000004430bc601b20000040f000002f601100197000000800010043f000003080100004100000bc70001042e0000000001000416000000000101004b0000013d0000c13d00000000010000310bc6028c0000040f0bc60ba90000040f000002f601100197000000400200043d0000000000120435000002f301000041000002f30320009c0000000001024019000000400110021000000307011001c700000bc70001042e0000000001000416000000000101004b0000013d0000c13d000000040100008a0000000001100031000002f502000041000000000301004b00000000030000190000000003024019000002f501100197000000000401004b000000000200a019000002f50110009c00000000010300190000000001026019000000000101004b0000013f0000613d000000000100001900000bc8000104300000000101000039000000000101041a000002f601100197000000400200043d0000000000120435000002f301000041000002f30320009c0000000001024019000000400110021000000307011001c700000bc70001042e00000005087002100000003f02800039000000000932016f000000400200043d0000000009920019000000000a29004b000000000a000019000000010a004039000002f40b90009c000000910000213d000000010aa00190000000910000c13d000000400090043f00000000007204350000000007580019000000000847004b0000013d0000213d000000000875004b000001650000813d00000000080200190000000059050434000002f60a90009c0000013d0000213d00000020088000390000000000980435000000000975004b0000015e0000413d00000040056000390000000005050433000002f40750009c0000013d0000213d00000000056500190000001f07500039000002f508000041000000000947004b00000000090000190000000009088019000002f507700197000002f50a400197000000000ba7004b00000000080080190000000007a7013f000002f50770009c00000000070900190000000007086019000000000707004b0000013d0000c13d0000000057050434000002f40870009c000000910000213d00000005087002100000003f09800039000000000939016f000000400300043d0000000009930019000000000a39004b000000000a000019000000010a004039000002f40b90009c000000910000213d000000010aa00190000000910000c13d000000400090043f00000000007304350000000007580019000000000447004b0000013d0000213d000000000475004b000001970000813d00000000040300190000000058050434000002f60980009c0000013d0000213d00000020044000390000000000840435000000000875004b000001900000413d00000060046000390000000004040433000002f60540009c0000013d0000213d00000080056000390000000005050433000002f60750009c0000013d0000213d000000a00660003900000000060604330bc601c00000040f000000800100043d000001400000044300000160001004430000002001000039000000a00200043d0000018000100443000001a0002004430000004002000039000000c00300043d000001c000200443000001e000300443000001000010044300000003010000390000012000100443000002f70100004100000bc70001042e000002f3010000410000000002000414000002f30320009c0000000001024019000000c00110021000000309011001c700008005020000390bc60bc10000040f0000000102200190000001be0000613d000000000101043b000000000001042d000000000100001900000bc800010430000b000000000002000100000006001d000200000005001d000b00000003001d000900000002001d000000800010043f000002f6054001970000000101000039000000000201041a0000030a02200197000000000252019f000000000021041b000000400100043d000002f3020000410000000003000414000002f30430009c0000000003028019000002f30410009c00000000010280190000004001100210000000c002300210000000000112019f0000030b011001c70000800d0200003900000002030000390000030c04000041000a00000003001d0bc60bbc0000040f00000001012001900000025f0000613d000000400100043d0000030d0210009c0000000906000029000002610000813d0000000b02000029000000000202043300000000030604330000004004100039000000400040043f00000020041000390000030e0500004100000000005404350000000a040000290000000000410435000000000223004b000002670000c13d0000000001060433000000000101004b000002410000613d0000801001000039000500000001001d0000800d01000039000400000001001d0000000301000039000300000001001d00000000020000190000000b010000290000000001010433000000000121004b000002590000a13d00000005012002100000002001100039000a00000002001d0000000b0200002900000000022100190000000001610019000600000001001d0000000001010433000002f601100197000700000002001d0000000002020433000800000002001d0000000000100435000000200000043f000002f3010000410000000002000414000002f30320009c0000000001024019000000c00110021000000310011001c700000005020000290bc60bc10000040f00000001022001900000025f0000613d0000000802000029000002f602200197000000000101043b000000000301041a0000030a03300197000000000223019f000000000021041b000000090600002900000000010604330000000a02000029000000000121004b000002590000a13d0000000b010000290000000001010433000000000121004b000002590000a13d0000000701000029000000000201043300000006010000290000000003010433000000400100043d000002f3040000410000000005000414000002f30650009c0000000005048019000002f30610009c00000000010480190000004001100210000000c004500210000000000114019f0000030b011001c7000002f605300197000002f6062001970000031104000041000000040200002900000003030000290bc60bbc0000040f00000001012001900000025f0000613d0000000a02000029000000010220003900000009060000290000000001060433000000000112004b000001f80000413d0000000205000029000000a00050043f0000000102000029000000c00020043f000000400100043d0000000000210435000002f3020000410000000003000414000002f30430009c0000000003028019000002f30410009c00000000010280190000004001100210000000c002300210000000000112019f000002f60550019700000312011001c70000800d02000039000000020300003900000313040000410bc60bbc0000040f00000001012001900000025f0000613d000000000001042d000002f80100004100000000001004350000003201000039000000040010043f000002f90100004100000bc800010430000000000100001900000bc800010430000002f80100004100000000001004350000004101000039000000040010043f000002f90100004100000bc800010430000000400200043d0000030f030000410000000000320435000000040320003900000020040000390000000000430435000000000301043300000024042000390000000000340435000000000403004b0000027f0000613d0000004404200039000000000500001900000000064500190000002005500039000000000715001900000000070704330000000000760435000000000635004b000002740000413d000000000135004b0000027f0000a13d000000000143001900000000000104350000001f01300039000000200300008a000000000131016f0000004401100039000002f303000041000002f30410009c0000000001038019000002f30420009c000000000203801900000040022002100000006001100210000000000121019f00000bc800010430000000040110008a000002f5020000410000001f0310008c00000000030000190000000003022019000002f501100197000000000401004b0000000002008019000002f50110009c00000000010300190000000001026019000000000101004b0000029f0000613d00000004010000390000000201100367000000000101043b000002f60210009c0000029f0000213d000000000001042d000000000100001900000bc800010430000000040210008a000002f5030000410000001f0420008c00000000040000190000000004032019000002f502200197000000000502004b0000000003008019000002f50220009c00000000020400190000000002036019000000000202004b000002ce0000613d00000002020003670000000403200370000000000303043b000002f40430009c000002ce0000213d0000002304300039000002f505000041000000000614004b00000000060000190000000006058019000002f507100197000002f504400197000000000874004b0000000005008019000000000474013f000002f50440009c00000000040600190000000004056019000000000404004b000002ce0000c13d0000000404300039000000000242034f000000000202043b000002f40420009c000002ce0000213d000000240330003900000005042002100000000004340019000000000114004b000002ce0000213d0000000001030019000000000001042d000000000100001900000bc80001043000000020030000390000000004310436000000000302043300000000003404350000004001100039000000000403004b000002de0000613d00000000040000190000002002200039000000000502043300000000015104360000000104400039000000000534004b000002d80000413d000000000001042d000000040210008a000002f5030000410000003f0420008c00000000040000190000000004032019000002f502200197000000000502004b0000000003008019000002f50220009c00000000020400190000000002036019000000000202004b000003290000613d00000002030003670000000402300370000000000402043b000002f40240009c000003290000213d0000002302400039000002f505000041000000000612004b00000000060000190000000006058019000002f507100197000002f502200197000000000872004b0000000005008019000000000272013f000002f50220009c00000000020600190000000002056019000000000202004b000003290000c13d0000000402400039000000000223034f000000000202043b000002f40520009c000003290000213d000000240540003900000005042002100000000004540019000000000414004b000003290000213d0000002404300370000000000604043b000002f40460009c000003290000213d0000002304600039000002f507000041000000000814004b00000000080000190000000008078019000002f509100197000002f504400197000000000a94004b0000000007008019000000000494013f000002f50440009c00000000040800190000000004076019000000000404004b000003290000c13d0000000404600039000000000343034f000000000403043b000002f40340009c000003290000213d000000240360003900000005064002100000000006360019000000000116004b000003290000213d0000000001050019000000000001042d000000000100001900000bc8000104300009000000000002000800000004001d000600000003001d000900000002001d000500000001001d000000400200043d000700000002001d0000031401000041000000000012043500000306010000410000000000100439000000000100041200000004001004430000002400000443000002f3010000410000000002000414000002f30320009c0000000001024019000000c00110021000000309011001c700008005020000390bc60bc10000040f00000007090000290000000508000029000000060600002900000001022001900000050f0000613d000000000201043b0000000001000414000002f602200197000000040320008c0000034d0000c13d00000001030000310000037e0000013d000002f303000041000002f30410009c0000000001038019000002f30490009c00000000030940190000004003300210000000c001100210000000000131019f00000315011001c70bc60bc10000040f000000070900002900000000030100190000006003300270000002f303300197000000200430008c000000200500003900000000050340190000001f0450018f00000005055002720000036a0000613d000000000600001900000005076002100000000008790019000000000771034f000000000707043b00000000007804350000000106600039000000000756004b000003620000413d000000000604004b000003790000613d0000000505500210000000000651034f00000000055900190000000304400210000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f000000010220019000000006060000290000000508000029000005670000613d0000001f01300039000000200700008a000000000171016f000000000a91001900000000011a004b00000000010000190000000101004039000002f402a0009c000005170000213d0000000101100190000005170000c13d0000004000a0043f000002f5010000410000000102000031000000200320008c00000000030000190000000003014019000002f502200197000000000402004b000000000100a019000002f50220009c000000000103c019000000000101004b0000050f0000c13d0000000005090433000002f60150009c0000050f0000213d000003160100004100000000001a04350000000001000411000002f60b1001970000000401a000390000000000b104350000000001000414000000040250008c000003a40000c13d0000000103000031000003dd0000013d00020000000b001d000700000007001d000002f302000041000002f30310009c0000000001028019000002f303a0009c00000000020a40190000004002200210000000c001100210000000000121019f000002f9011001c7000400000005001d000000000205001900030000000a001d0bc60bc10000040f000000030a00002900000000030100190000006003300270000002f303300197000000200430008c000000200500003900000000050340190000001f0450018f0000000505500272000003c60000613d0000000006000019000000050760021000000000087a0019000000000771034f000000000707043b00000000007804350000000106600039000000000756004b000003be0000413d000000000604004b000003d50000613d0000000505500210000000000651034f00000000055a00190000000304400210000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f00000001022001900000000606000029000000070700002900000005080000290000000405000029000000020b0000290000058d0000613d0000001f01300039000000000171016f0000000009a10019000000000119004b00000000010000190000000101004039000002f40290009c000005170000213d0000000101100190000005170000c13d000000400090043f000002f5010000410000000102000031000000200320008c00000000030000190000000003014019000002f502200197000000000402004b000000000100a019000002f50220009c000000000103c019000000000101004b0000050f0000c13d00000000010a0433000000000201004b0000000002000019000000010200c039000000000221004b0000050f0000c13d000000000201004b000004580000c13d0000031701000041000000000019043500000004019000390000000000b104350000000001000414000000040250008c000004050000c13d00000001030000310000043a0000013d000700000007001d000002f302000041000002f30310009c0000000001028019000002f30390009c00000000020940190000004002200210000000c001100210000000000121019f000002f9011001c70000000002050019000400000009001d0bc60bc10000040f000000040900002900000000030100190000006003300270000002f303300197000000200430008c000000200500003900000000050340190000001f0450018f0000000505500272000004250000613d000000000600001900000005076002100000000008790019000000000771034f000000000707043b00000000007804350000000106600039000000000756004b0000041d0000413d000000000604004b000004340000613d0000000505500210000000000651034f00000000055900190000000304400210000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f0000000102200190000000060600002900000007070000290000000508000029000005b30000613d0000001f01300039000000000171016f0000000002910019000000000112004b00000000010000190000000101004039000002f40320009c000005170000213d0000000101100190000005170000c13d000000400020043f000002f5010000410000000103000031000000200430008c00000000040000190000000004014019000002f503300197000000000503004b000000000100a019000002f50330009c000000000104c019000000000101004b0000050f0000c13d0000000001090433000000000301004b0000000003000019000000010300c039000000000331004b00000000090200190000050f0000c13d000003180290009c000005170000213d0000004002900039000000400020043f00000020029000390000031903000041000000000032043500000001020000390000000000290435000000000101004b0000051d0000613d00000000020000310000000901000029000002f40110009c000005170000213d000000090100002900000005011002100000003f03100039000000000373016f000000400900043d0000000003390019000000000493004b00000000040000190000000104004039000002f40530009c000005170000213d0000000104400190000005170000c13d000000400030043f000000090300002900000000003904350000000001810019000000000221004b0000050f0000213d000000000281004b000004860000a13d00000000020900190000000203800367000000000303043b000002f60430009c0000050f0000213d000000200220003900000000003204350000002008800039000000000318004b0000047d0000413d00000000020000310000000801000029000002f40110009c000005170000213d000000080100002900000005011002100000003f03100039000000000373016f000000400400043d0000000003340019000900000004001d000000000443004b00000000040000190000000104004039000002f40530009c000005170000213d0000000104400190000005170000c13d000000400030043f0000000803000029000000090400002900000000003404350000000001610019000000000221004b0000050f0000213d000000000261004b000004ab0000a13d00000009020000290000000203600367000000000303043b000002f60430009c0000050f0000213d000000200220003900000000003204350000002006600039000000000316004b000004a20000413d000000400100043d000003180210009c000005170000213d0000000902000029000000000202043300000000030904330000004004100039000000400040043f00000020041000390000030e05000041000000000054043500000002040000390000000000410435000000000223004b000005420000c13d0000000001090433000000000101004b0000050e0000613d0000801001000039000300000001001d0000800d01000039000200000001001d0000000301000039000100000001001d0000000002000019000700000009001d00000009010000290000000001010433000000000121004b000005110000a13d00000005012002100000002001100039000800000002001d000000090200002900000000022100190000000001910019000400000001001d0000000001010433000002f601100197000500000002001d0000000002020433000600000002001d0000000000100435000000200000043f000002f3010000410000000002000414000002f30320009c0000000001024019000000c00110021000000310011001c700000003020000290bc60bc10000040f000000070400002900000001022001900000050f0000613d0000000602000029000002f602200197000000000101043b000000000301041a0000030a03300197000000000223019f000000000021041b00000000010404330000000802000029000000000121004b000005110000a13d00000009010000290000000001010433000000000121004b000005110000a13d0000000501000029000000000201043300000004010000290000000003010433000000400100043d000002f3040000410000000005000414000002f30650009c0000000005048019000002f30610009c00000000010480190000004001100210000000c004500210000000000114019f0000030b011001c7000002f605300197000002f6062001970000031104000041000000020200002900000001030000290bc60bbc0000040f000000070900002900000001012001900000050f0000613d000000080200002900000001022000390000000001090433000000000112004b000004c50000413d000000000001042d000000000100001900000bc800010430000002f80100004100000000001004350000003201000039000000040010043f000002f90100004100000bc800010430000002f80100004100000000001004350000004101000039000000040010043f000002f90100004100000bc800010430000000400100043d0000030f0200004100000000002104350000000402100039000000200300003900000000003204350000000008090019000000000209043300000024031000390000000000230435000000000302004b000005360000613d0000004403100039000000000400001900000000053400190000002004400039000000000684001900000000060604330000000000650435000000000524004b0000052b0000413d000000000424004b000005360000a13d000000000332001900000000000304350000001f02200039000000000272016f0000004402200039000002f303000041000002f30420009c0000000002038019000002f30410009c000000000103801900000040011002100000006002200210000000000112019f00000bc8000104300000000008070019000000400200043d0000030f030000410000000000320435000000040320003900000020040000390000000000430435000000000301043300000024042000390000000000340435000000000403004b0000055b0000613d0000004404200039000000000500001900000000064500190000002005500039000000000715001900000000070704330000000000760435000000000635004b000005500000413d000000000135004b0000055b0000a13d000000000143001900000000000104350000001f01300039000000000181016f0000004401100039000002f303000041000002f30410009c0000000001038019000002f30420009c000000000203801900000040022002100000006001100210000000000121019f00000bc800010430000000400200043d0000001f0430018f0000000503300272000005740000613d000000000500001900000005065002100000000007620019000000000661034f000000000606043b00000000006704350000000105500039000000000635004b0000056c0000413d000000000504004b000005830000613d0000000503300210000000000131034f00000000033200190000000304400210000000000503043300000000054501cf000000000545022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000130435000002f3010000410000000103000031000002f30430009c0000000003018019000002f30420009c000000000102401900000040011002100000006002300210000000000112019f00000bc800010430000000400200043d0000001f0430018f00000005033002720000059a0000613d000000000500001900000005065002100000000007620019000000000661034f000000000606043b00000000006704350000000105500039000000000635004b000005920000413d000000000504004b000005a90000613d0000000503300210000000000131034f00000000033200190000000304400210000000000503043300000000054501cf000000000545022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000130435000002f3010000410000000103000031000002f30430009c0000000003018019000002f30420009c000000000102401900000040011002100000006002300210000000000112019f00000bc800010430000000400200043d0000001f0430018f0000000503300272000005c00000613d000000000500001900000005065002100000000007620019000000000661034f000000000606043b00000000006704350000000105500039000000000635004b000005b80000413d000000000504004b000005cf0000613d0000000503300210000000000131034f00000000033200190000000304400210000000000503043300000000054501cf000000000545022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000130435000002f3010000410000000103000031000002f30430009c0000000003018019000002f30420009c000000000102401900000040011002100000006002300210000000000112019f00000bc8000104300005000000000002000400000001001d000000400200043d000500000002001d0000031401000041000000000012043500000306010000410000000000100439000000000100041200000004001004430000002400000443000002f3010000410000000002000414000002f30320009c0000000001024019000000c00110021000000309011001c700008005020000390bc60bc10000040f000000050900002900000001022001900000071e0000613d000000000201043b0000000001000414000002f602200197000000040320008c000005f60000c13d0000000103000031000006250000013d000002f303000041000002f30410009c0000000001038019000002f30490009c00000000030940190000004003300210000000c001100210000000000131019f00000315011001c70bc60bc10000040f000000050900002900000000030100190000006003300270000002f303300197000000200430008c000000200500003900000000050340190000001f0450018f0000000505500272000006130000613d000000000600001900000005076002100000000008790019000000000771034f000000000707043b00000000007804350000000106600039000000000756004b0000060b0000413d000000000604004b000006220000613d0000000505500210000000000651034f00000000055900190000000304400210000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f00000001022001900000074c0000613d0000001f01300039000000200600008a000000000161016f000000000a91001900000000011a004b00000000010000190000000101004039000002f402a0009c000007200000213d0000000101100190000007200000c13d0000004000a0043f000002f5010000410000000102000031000000200320008c00000000030000190000000003014019000002f502200197000000000402004b000000000100a019000002f50220009c000000000103c019000000000101004b0000071e0000c13d0000000005090433000002f60150009c0000071e0000213d000003160100004100000000001a04350000000001000411000002f6071001970000000401a0003900000000007104350000000001000414000000040250008c0000064b0000c13d0000000103000031000006820000013d000100000007001d000500000006001d000002f302000041000002f30310009c0000000001028019000002f303a0009c00000000020a40190000004002200210000000c001100210000000000121019f000002f9011001c7000300000005001d000000000205001900020000000a001d0bc60bc10000040f000000020a00002900000000030100190000006003300270000002f303300197000000200430008c000000200500003900000000050340190000001f0450018f00000005055002720000066d0000613d0000000006000019000000050760021000000000087a0019000000000771034f000000000707043b00000000007804350000000106600039000000000756004b000006650000413d000000000604004b0000067c0000613d0000000505500210000000000651034f00000000055a00190000000304400210000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f0000000102200190000000050600002900000003050000290000000107000029000007720000613d0000001f01300039000000000161016f0000000009a10019000000000119004b00000000010000190000000101004039000002f40290009c000007200000213d0000000101100190000007200000c13d000000400090043f000002f5010000410000000102000031000000200320008c00000000030000190000000003014019000002f502200197000000000402004b000000000100a019000002f50220009c000000000103c019000000000101004b0000071e0000c13d00000000010a0433000000000201004b0000000002000019000000010200c039000000000221004b0000071e0000c13d000000000201004b000006fb0000c13d00000317010000410000000000190435000000040190003900000000007104350000000001000414000000040250008c000006aa0000c13d0000000103000031000006dd0000013d000500000006001d000002f302000041000002f30310009c0000000001028019000002f30390009c00000000020940190000004002200210000000c001100210000000000121019f000002f9011001c70000000002050019000300000009001d0bc60bc10000040f000000030900002900000000030100190000006003300270000002f303300197000000200430008c000000200500003900000000050340190000001f0450018f0000000505500272000006ca0000613d000000000600001900000005076002100000000008790019000000000771034f000000000707043b00000000007804350000000106600039000000000756004b000006c20000413d000000000604004b000006d90000613d0000000505500210000000000651034f00000000055900190000000304400210000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f00000001022001900000000506000029000007980000613d0000001f01300039000000000161016f0000000002910019000000000112004b00000000010000190000000101004039000002f40320009c000007200000213d0000000101100190000007200000c13d000000400020043f000002f5010000410000000103000031000000200430008c00000000040000190000000004014019000002f503300197000000000503004b000000000100a019000002f50330009c000000000104c019000000000101004b0000071e0000c13d0000000001090433000000000301004b0000000003000019000000010300c039000000000331004b00000000090200190000071e0000c13d000003180290009c000007200000213d0000004002900039000000400020043f00000020029000390000031903000041000000000032043500000001020000390000000000290435000000000101004b000007260000613d0000000401000029000002f605100197000000000102041a0000030a01100197000000000151019f000000000012041b000000400100043d000002f3020000410000000003000414000002f30430009c0000000003028019000002f30410009c00000000010280190000004001100210000000c002300210000000000112019f0000030b011001c70000800d0200003900000002030000390000030c040000410bc60bbc0000040f00000001012001900000071e0000613d000000000001042d000000000100001900000bc800010430000002f80100004100000000001004350000004101000039000000040010043f000002f90100004100000bc8000104300000000007060019000000400100043d0000030f0200004100000000002104350000000402100039000000200300003900000000003204350000000008090019000000000209043300000024031000390000000000230435000000000302004b000007400000613d0000004403100039000000000400001900000000053400190000002004400039000000000684001900000000060604330000000000650435000000000524004b000007350000413d000000000424004b000007400000a13d000000000332001900000000000304350000001f02200039000000000272016f0000004402200039000002f303000041000002f30420009c0000000002038019000002f30410009c000000000103801900000040011002100000006002200210000000000112019f00000bc800010430000000400200043d0000001f0430018f0000000503300272000007590000613d000000000500001900000005065002100000000007620019000000000661034f000000000606043b00000000006704350000000105500039000000000635004b000007510000413d000000000504004b000007680000613d0000000503300210000000000131034f00000000033200190000000304400210000000000503043300000000054501cf000000000545022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000130435000002f3010000410000000103000031000002f30430009c0000000003018019000002f30420009c000000000102401900000040011002100000006002300210000000000112019f00000bc800010430000000400200043d0000001f0430018f00000005033002720000077f0000613d000000000500001900000005065002100000000007620019000000000661034f000000000606043b00000000006704350000000105500039000000000635004b000007770000413d000000000504004b0000078e0000613d0000000503300210000000000131034f00000000033200190000000304400210000000000503043300000000054501cf000000000545022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000130435000002f3010000410000000103000031000002f30430009c0000000003018019000002f30420009c000000000102401900000040011002100000006002300210000000000112019f00000bc800010430000000400200043d0000001f0430018f0000000503300272000007a50000613d000000000500001900000005065002100000000007620019000000000661034f000000000606043b00000000006704350000000105500039000000000635004b0000079d0000413d000000000504004b000007b40000613d0000000503300210000000000131034f00000000033200190000000304400210000000000503043300000000054501cf000000000545022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000130435000002f3010000410000000103000031000002f30430009c0000000003018019000002f30420009c000000000102401900000040011002100000006002300210000000000112019f00000bc8000104300004000000000002000400000001001d000002f601100197000200000001001d0000000000100435000000200000043f000002f3010000410000000002000414000002f30320009c0000000001024019000000c00110021000000310011001c700008010020000390bc60bc10000040f00000001022001900000090c0000613d000000000101043b000000000101041a000300000001001d000003060100004100000000001004390000000001000412000100000001001d000000040010044300000020010000390000002400100443000002f3010000410000000002000414000002f30320009c0000000001024019000000c00110021000000309011001c700008005020000390bc60bc10000040f0000000303000029000002f60330019700000001022001900000090c0000613d000000000101043b0000000402000029000000000121013f000002f601100198000007f30000613d000000000103004b000008050000613d000000400a00043d0000031a0100004100000000001a04350000000001000414000000040230008c000008130000c13d0000000103000031000008440000013d000003060100004100000000001004390000000101000029000000040010044300000040010000390000002400100443000002f3010000410000000002000414000002f30320009c0000000001024019000000c00110021000000309011001c700008005020000390bc60bc10000040f00000001022001900000090c0000613d000000000101043b0000090b0000013d0000000101000039000000000201041a000000400900043d0000031b0100004100000000001904350000000401900039000000020300002900000000003104350000000001000414000002f602200197000000040320008c000008770000c13d0000000103000031000008a70000013d000002f302000041000002f30410009c0000000001028019000002f304a0009c00000000020a40190000004002200210000000c001100210000000000121019f00000315011001c7000000000203001900040000000a001d0bc60bc10000040f000000040a00002900000000030100190000006003300270000002f303300197000000200430008c000000200500003900000000050340190000001f0450018f0000000505500272000008320000613d0000000006000019000000050760021000000000087a0019000000000771034f000000000707043b00000000007804350000000106600039000000000756004b0000082a0000413d000000000604004b000008410000613d0000000505500210000000000651034f00000000055a00190000000304400210000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f0000000102200190000009140000613d0000001f01300039000000200600008a000000000161016f0000000009a10019000000000119004b00000000010000190000000101004039000002f40290009c0000090e0000213d00000001011001900000090e0000c13d000000400090043f000002f5010000410000000102000031000000200320008c00000000030000190000000003014019000002f502200197000000000402004b000000000100a019000002f50220009c000000000103c019000000000101004b0000090c0000c13d00000000010a0433000002f502000041000000000301004b00000000030000190000000003024019000002f504100197000000000504004b000000000200a019000002f50440009c000000000203c019000000000202004b0000086a0000c13d000000000201004b0000090b0000c13d0000000101000039000000000201041a0000031b0100004100000000001904350000000401900039000000020300002900000000003104350000000001000414000002f602200197000000040320008c000008c10000c13d0000000103000031000008f30000013d000002f303000041000002f30410009c0000000001038019000002f30490009c00000000030940190000004003300210000000c001100210000000000131019f000002f9011001c7000400000009001d0bc60bc10000040f000000040900002900000000030100190000006003300270000002f303300197000000200430008c000000200500003900000000050340190000001f0450018f0000000505500272000008950000613d000000000600001900000005076002100000000008790019000000000771034f000000000707043b00000000007804350000000106600039000000000756004b0000088d0000413d000000000604004b000008a40000613d0000000505500210000000000651034f00000000055900190000000304400210000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f00000001022001900000093a0000613d0000001f01300039000000200200008a000000000221016f0000000001920019000000000221004b00000000020000190000000102004039000002f40310009c0000090e0000213d00000001022001900000090e0000c13d000000400010043f000002f5010000410000000102000031000000200320008c00000000030000190000000003014019000002f502200197000000000402004b000000000100a019000002f50220009c000000000103c019000000000101004b0000090c0000c13d00000000010904330000090b0000013d000300000006001d000002f303000041000002f30410009c0000000001038019000002f30490009c00000000030940190000004003300210000000c001100210000000000131019f000002f9011001c7000400000009001d0bc60bc10000040f000000040900002900000000030100190000006003300270000002f303300197000000200430008c000000200500003900000000050340190000001f0450018f0000000505500272000008e00000613d000000000600001900000005076002100000000008790019000000000771034f000000000707043b00000000007804350000000106600039000000000756004b000008d80000413d000000000604004b000008ef0000613d0000000505500210000000000651034f00000000055900190000000304400210000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f00000001022001900000000306000029000009600000613d0000001f01300039000000000261016f0000000001920019000000000221004b00000000020000190000000102004039000002f40310009c0000090e0000213d00000001022001900000090e0000c13d000000400010043f000002f5010000410000000102000031000000200320008c00000000030000190000000003014019000002f502200197000000000402004b000000000100a019000002f50220009c000000000103c019000000000101004b0000090c0000c13d0000000001090433000000000001042d000000000100001900000bc800010430000002f80100004100000000001004350000004101000039000000040010043f000002f90100004100000bc800010430000000400200043d0000001f0430018f0000000503300272000009210000613d000000000500001900000005065002100000000007620019000000000661034f000000000606043b00000000006704350000000105500039000000000635004b000009190000413d000000000504004b000009300000613d0000000503300210000000000131034f00000000033200190000000304400210000000000503043300000000054501cf000000000545022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000130435000002f3010000410000000103000031000002f30430009c0000000003018019000002f30420009c000000000102401900000040011002100000006002300210000000000112019f00000bc800010430000000400200043d0000001f0430018f0000000503300272000009470000613d000000000500001900000005065002100000000007620019000000000661034f000000000606043b00000000006704350000000105500039000000000635004b0000093f0000413d000000000504004b000009560000613d0000000503300210000000000131034f00000000033200190000000304400210000000000503043300000000054501cf000000000545022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000130435000002f3010000410000000103000031000002f30430009c0000000003018019000002f30420009c000000000102401900000040011002100000006002300210000000000112019f00000bc800010430000000400200043d0000001f0430018f00000005033002720000096d0000613d000000000500001900000005065002100000000007620019000000000661034f000000000606043b00000000006704350000000105500039000000000635004b000009650000413d000000000504004b0000097c0000613d0000000503300210000000000131034f00000000033200190000000304400210000000000503043300000000054501cf000000000545022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000130435000002f3010000410000000103000031000002f30430009c0000000003018019000002f30420009c000000000102401900000040011002100000006002300210000000000112019f00000bc800010430000e000000000002000700000001001d000900000002001d0000031c0120009c00000b310000813d000000090100002900000005031002100000003f01300039000000200200008a000200000002001d000000000121016f000000400200043d0000000001120019000800000002001d000000000221004b00000000020000190000000102004039000002f40410009c00000b310000213d000000010220019000000b310000c13d000000400010043f0000000901000029000000080200002900000000071204360000001f0130018f000000000200003100000002022003670000000503300272000009ad0000613d000000000400001900000005054002100000000006570019000000000552034f000000000505043b00000000005604350000000104400039000000000534004b000009a50000413d000000000401004b000009bc0000613d0000000503300210000000000232034f00000000033700190000000301100210000000000403043300000000041401cf000000000414022f000000000202043b0000010001100089000000000212022f00000000011201cf000000000141019f00000000001304350000000901000029000000000101004b00000b270000613d0000801001000039000600000001001d0000000001000412000a00000001001d0000002001000039000500000001001d0000800501000039000400000001001d0000004001000039000100000001001d0000000003000019000300000007001d000c00000003001d00000005023002100000000701000029000b00000002001d00000000011200190000000201100367000000000101043b000e00000001001d0000031d0110009c00000b290000813d0000000e010000290000000000100435000000200000043f000002f3010000410000000002000414000002f30320009c0000000001024019000000c00110021000000310011001c700000006020000290bc60bc10000040f000000010220019000000b290000613d000000000101043b000000000101041a000d00000001001d000003060100004100000000001004390000000a01000029000000040010044300000005010000290000002400100443000002f3010000410000000002000414000002f30320009c0000000001024019000000c00110021000000309011001c700000004020000290bc60bc10000040f0000000d03000029000002f603300197000000010220019000000b290000613d000000000101043b0000000e02000029000000000121013f000002f60110019800000a060000613d000000000103004b00000a180000613d000000400a00043d0000031a0100004100000000001a04350000000001000414000000040230008c00000a260000c13d000000010300003100000a560000013d000003060100004100000000001004390000000a01000029000000040010044300000001010000290000002400100443000002f3010000410000000002000414000002f30320009c0000000001024019000000c00110021000000309011001c700008005020000390bc60bc10000040f000000010220019000000b290000613d000000000101043b00000b1a0000013d0000000101000039000000000201041a000000400900043d0000031b01000041000000000019043500000004019000390000000e0300002900000000003104350000000001000414000002f602200197000000040320008c00000a890000c13d000000010300003100000ab80000013d000002f302000041000002f30410009c0000000001028019000002f304a0009c00000000020a40190000004002200210000000c001100210000000000121019f00000315011001c70000000002030019000d0000000a001d0bc60bc10000040f0000000d0a00002900000000030100190000006003300270000002f303300197000000200430008c00000020050000390000000005034019000000050450027200000a440000613d0000000006000019000000050760021000000000087a0019000000000771034f000000000707043b00000000007804350000000106600039000000000746004b00000a3c0000413d0000001f0550019000000a530000613d0000000504400210000000000641034f00000000044a00190000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f0000000000540435000100000003001f000000010220019000000b370000613d0000001f013000390000000202000029000000000121016f0000000009a10019000000000119004b00000000010000190000000101004039000002f40290009c00000b310000213d000000010110019000000b310000c13d000000400090043f000002f5010000410000000102000031000000200320008c00000000030000190000000003014019000002f502200197000000000402004b000000000100a019000002f50220009c000000000103c019000000000101004b00000b290000c13d00000000010a0433000002f502000041000000000301004b00000000030000190000000003024019000002f504100197000000000504004b000000000200a019000002f50440009c000000000203c019000000000202004b00000a7c0000c13d000000000201004b00000b1a0000c13d0000000101000039000000000201041a0000031b01000041000000000019043500000004019000390000000e0300002900000000003104350000000001000414000002f602200197000000040320008c00000ad20000c13d000000010300003100000b010000013d000002f303000041000002f30410009c0000000001038019000002f30490009c00000000030940190000004003300210000000c001100210000000000131019f000002f9011001c7000e00000009001d0bc60bc10000040f0000000e0900002900000000030100190000006003300270000002f303300197000000200430008c00000020050000390000000005034019000000050450027200000aa60000613d000000000600001900000005076002100000000008790019000000000771034f000000000707043b00000000007804350000000106600039000000000746004b00000a9e0000413d0000001f0550019000000ab50000613d0000000504400210000000000641034f00000000044900190000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f0000000000540435000100000003001f000000010220019000000b5d0000613d0000001f013000390000000202000029000000000221016f0000000001920019000000000221004b00000000020000190000000102004039000002f40310009c00000b310000213d000000010220019000000b310000c13d000000400010043f000002f5010000410000000102000031000000200320008c00000000030000190000000003014019000002f502200197000000000402004b000000000100a019000002f50220009c000000000103c019000000000101004b00000b290000c13d000000000109043300000b1a0000013d000002f303000041000002f30410009c0000000001038019000002f30490009c00000000030940190000004003300210000000c001100210000000000131019f000002f9011001c7000e00000009001d0bc60bc10000040f0000000e0900002900000000030100190000006003300270000002f303300197000000200430008c00000020050000390000000005034019000000050450027200000aef0000613d000000000600001900000005076002100000000008790019000000000771034f000000000707043b00000000007804350000000106600039000000000746004b00000ae70000413d0000001f0550019000000afe0000613d0000000504400210000000000641034f00000000044900190000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f0000000000540435000100000003001f000000010220019000000b830000613d0000001f013000390000000202000029000000000221016f0000000001920019000000000221004b00000000020000190000000102004039000002f40310009c00000b310000213d000000010220019000000b310000c13d000000400010043f000002f5010000410000000102000031000000200320008c00000000030000190000000003014019000002f502200197000000000402004b000000000100a019000002f50220009c000000000103c019000000000101004b00000b290000c13d0000000001090433000000080200002900000000020204330000000c03000029000000000232004b000000030700002900000b2b0000a13d0000000b020000290000000002720019000000000012043500000001033000390000000901000029000000000113004b000009cb0000413d0000000801000029000000000001042d000000000100001900000bc800010430000002f80100004100000000001004350000003201000039000000040010043f000002f90100004100000bc800010430000002f80100004100000000001004350000004101000039000000040010043f000002f90100004100000bc800010430000000400200043d0000001f0430018f000000050330027200000b440000613d000000000500001900000005065002100000000007620019000000000661034f000000000606043b00000000006704350000000105500039000000000635004b00000b3c0000413d000000000504004b00000b530000613d0000000503300210000000000131034f00000000033200190000000304400210000000000503043300000000054501cf000000000545022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000130435000002f3010000410000000103000031000002f30430009c0000000003018019000002f30420009c000000000102401900000040011002100000006002300210000000000112019f00000bc800010430000000400200043d0000001f0430018f000000050330027200000b6a0000613d000000000500001900000005065002100000000007620019000000000661034f000000000606043b00000000006704350000000105500039000000000635004b00000b620000413d000000000504004b00000b790000613d0000000503300210000000000131034f00000000033200190000000304400210000000000503043300000000054501cf000000000545022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000130435000002f3010000410000000103000031000002f30430009c0000000003018019000002f30420009c000000000102401900000040011002100000006002300210000000000112019f00000bc800010430000000400200043d0000001f0430018f000000050330027200000b900000613d000000000500001900000005065002100000000007620019000000000661034f000000000606043b00000000006704350000000105500039000000000635004b00000b880000413d000000000504004b00000b9f0000613d0000000503300210000000000131034f00000000033200190000000304400210000000000503043300000000054501cf000000000545022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000130435000002f3010000410000000103000031000002f30430009c0000000003018019000002f30420009c000000000102401900000040011002100000006002300210000000000112019f00000bc800010430000002f6011001970000000000100435000000200000043f000002f3010000410000000002000414000002f30320009c0000000001024019000000c00110021000000310011001c700008010020000390bc60bc10000040f000000010220019000000bba0000613d000000000101043b000000000101041a000002f601100197000000000001042d000000000100001900000bc80001043000000bbf002104210000000102000039000000000001042d0000000002000019000000000001042d00000bc4002104230000000102000039000000000001042d0000000002000019000000000001042d00000bc60000043200000bc70001042e00000bc80001043000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffff000000000000000000000000000000000000000000000000ffffffffffffffff8000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffff00000002000000000000000000000000000001000000010000000000000000004e487b710000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000240000000000000000000000000000000000000000000000000000000000000000000000000000000092bf2bdf00000000000000000000000000000000000000000000000000000000abfd530f00000000000000000000000000000000000000000000000000000000abfd531000000000000000000000000000000000000000000000000000000000b3596f0700000000000000000000000000000000000000000000000000000000e19f47000000000000000000000000000000000000000000000000000000000092bf2be0000000000000000000000000000000000000000000000000000000009d23d9f2000000000000000000000000000000000000000000000000000000006210308b000000000000000000000000000000000000000000000000000000006210308c000000000000000000000000000000000000000000000000000000008c89b64f000000000000000000000000000000000000000000000000000000000542975c00000000000000000000000000000000000000000000000000000000170aee73310ab089e4439a4c15d089f94afb7896ff553aecb10793d0ab882de59d99a32e000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000200000008000000000000000000200000200000000000000000000000000000044000000000000000000000000ffffffffffffffffffffffff00000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000ce7a780d33665b1ea097af5f155e3821b809ecbaa839d3b33aa83ba28168cefb000000000000000000000000000000000000000000000000ffffffffffffffc0373600000000000000000000000000000000000000000000000000000000000008c379a000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000004000000000000000000000000022c5b7b2d8561d39f7f210b6b326a1aa69f15311163082308ac4877db6339dc10200000000000000000000000000000000000020000000000000000000000000e27c4c1372396a3d15a9922f74f9dfc7c72b1ad6d63868470787249c356454c1707cd71600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000013ee32e0000000000000000000000000000000000000000000000000000000007be53ca100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffbf350000000000000000000000000000000000000000000000000000000000000050d25bcd00000000000000000000000000000000000000000000000000000000b3596f0700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000100000000000000000000000000000000000000000c5351414e86eeebf54383bf540882fcf0d464f462a22da1ba1c289876aba69f and here is // SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.12;

import {AggregatorInterface} from '../dependencies/chainlink/AggregatorInterface.sol';
import {Errors} from '../protocol/libraries/helpers/Errors.sol';
import {IACLManager} from '../interfaces/IACLManager.sol';
import {IPoolAddressesProvider} from '../interfaces/IPoolAddressesProvider.sol';
import {IPriceOracleGetter} from '../interfaces/IPriceOracleGetter.sol';
import {IAaveOracle} from '../interfaces/IAaveOracle.sol';

/**
 * @title AaveOracle
 * @author Aave
 * @notice Contract to get asset prices, manage price sources and update the fallback oracle
 * - Use of Chainlink Aggregators as first source of price
 * - If the returned price by a Chainlink aggregator is <= 0, the call is forwarded to a fallback oracle
 * - Owned by the Aave governance
 */
contract AaveOracle is IAaveOracle {
  IPoolAddressesProvider public immutable ADDRESSES_PROVIDER;

  // Map of asset price sources (asset => priceSource)
  mapping(address => AggregatorInterface) private assetsSources;

  IPriceOracleGetter private _fallbackOracle;
  address public immutable override BASE_CURRENCY;
  uint256 public immutable override BASE_CURRENCY_UNIT;

  /**
   * @dev Only asset listing or pool admin can call functions marked by this modifier.
   */
  modifier onlyAssetListingOrPoolAdmins() {
    _onlyAssetListingOrPoolAdmins();
    _;
  }

  /**
   * @notice Constructor
   * @param provider The address of the new PoolAddressesProvider
   * @param assets The addresses of the assets
   * @param sources The address of the source of each asset
   * @param fallbackOracle The address of the fallback oracle to use if the data of an
   *        aggregator is not consistent
   * @param baseCurrency The base currency used for the price quotes. If USD is used, base currency is 0x0
   * @param baseCurrencyUnit The unit of the base currency
   */
  constructor(
    IPoolAddressesProvider provider,
    address[] memory assets,
    address[] memory sources,
    address fallbackOracle,
    address baseCurrency,
    uint256 baseCurrencyUnit
  ) {
    ADDRESSES_PROVIDER = provider;
    _setFallbackOracle(fallbackOracle);
    _setAssetsSources(assets, sources);
    BASE_CURRENCY = baseCurrency;
    BASE_CURRENCY_UNIT = baseCurrencyUnit;
    emit BaseCurrencySet(baseCurrency, baseCurrencyUnit);
  }

  /// @inheritdoc IAaveOracle
  function setAssetSources(
    address[] calldata assets,
    address[] calldata sources
  ) external override onlyAssetListingOrPoolAdmins {
    _setAssetsSources(assets, sources);
  }

  /// @inheritdoc IAaveOracle
  function setFallbackOracle(
    address fallbackOracle
  ) external override onlyAssetListingOrPoolAdmins {
    _setFallbackOracle(fallbackOracle);
  }

  /**
   * @notice Internal function to set the sources for each asset
   * @param assets The addresses of the assets
   * @param sources The address of the source of each asset
   */
  function _setAssetsSources(address[] memory assets, address[] memory sources) internal {
    require(assets.length == sources.length, Errors.INCONSISTENT_PARAMS_LENGTH);
    for (uint256 i = 0; i < assets.length; i++) {
      assetsSources[assets[i]] = AggregatorInterface(sources[i]);
      emit AssetSourceUpdated(assets[i], sources[i]);
    }
  }

  /**
   * @notice Internal function to set the fallback oracle
   * @param fallbackOracle The address of the fallback oracle
   */
  function _setFallbackOracle(address fallbackOracle) internal {
    _fallbackOracle = IPriceOracleGetter(fallbackOracle);
    emit FallbackOracleUpdated(fallbackOracle);
  }

  /// @inheritdoc IPriceOracleGetter
  function getAssetPrice(address asset) public view override returns (uint256) {
    AggregatorInterface source = assetsSources[asset];

    if (asset == BASE_CURRENCY) {
      return BASE_CURRENCY_UNIT;
    } else if (address(source) == address(0)) {
      return _fallbackOracle.getAssetPrice(asset);
    } else {
      int256 price = source.latestAnswer();
      if (price > 0) {
        return uint256(price);
      } else {
        return _fallbackOracle.getAssetPrice(asset);
      }
    }
  }

  /// @inheritdoc IAaveOracle
  function getAssetsPrices(
    address[] calldata assets
  ) external view override returns (uint256[] memory) {
    uint256[] memory prices = new uint256[](assets.length);
    for (uint256 i = 0; i < assets.length; i++) {
      prices[i] = getAssetPrice(assets[i]);
    }
    return prices;
  }

  /// @inheritdoc IAaveOracle
  function getSourceOfAsset(address asset) external view override returns (address) {
    return address(assetsSources[asset]);
  }

  /// @inheritdoc IAaveOracle
  function getFallbackOracle() external view returns (address) {
    return address(_fallbackOracle);
  }

  function _onlyAssetListingOrPoolAdmins() internal view {
    IACLManager aclManager = IACLManager(ADDRESSES_PROVIDER.getACLManager());
    require(
      aclManager.isAssetListingAdmin(msg.sender) || aclManager.isPoolAdmin(msg.sender),
      Errors.CALLER_NOT_ASSET_LISTING_OR_POOL_ADMIN
    );
  }
}