diff --git a/.github/workflows/slither.yaml b/.github/workflows/slither.yaml index 200e2b972..0f4a3bb7e 100644 --- a/.github/workflows/slither.yaml +++ b/.github/workflows/slither.yaml @@ -10,7 +10,7 @@ on: - ".github/workflows/slither.yaml" jobs: analyze: - if: ${{ false }} # Slither has an issue with prb math, and is super slow... + # if: ${{ false }} # Slither has an issue with prb math, and is super slow... runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 diff --git a/protocol/contracts/v2/strategies/RamosStrategy.sol b/protocol/contracts/v2/strategies/RamosStrategy.sol index c2c61b35c..d863e7dbb 100644 --- a/protocol/contracts/v2/strategies/RamosStrategy.sol +++ b/protocol/contracts/v2/strategies/RamosStrategy.sol @@ -23,7 +23,7 @@ contract RamosStrategy is AbstractStrategy, IRamosTokenVault { using SafeERC20 for IERC20; using SafeERC20 for ITempleERC20Token; - string private constant VERSION = "1.0.0"; + string private constant VERSION = "1.0.1"; /** * @notice The RAMOS contract used to manage the TPI @@ -145,13 +145,17 @@ contract RamosStrategy is AbstractStrategy, IRamosTokenVault { AssetBalance[] memory assetBalances ) { // get RAMOS's quote token balance - (,, uint256 quoteTokenBalance) = ramos.positions(); + (, uint256 templeTokenBalance, uint256 quoteTokenBalance) = ramos.positions(); - assetBalances = new AssetBalance[](1); + assetBalances = new AssetBalance[](2); assetBalances[0] = AssetBalance({ asset: address(quoteToken), balance: quoteTokenBalance }); + assetBalances[1] = AssetBalance({ + asset: address(templeToken), + balance: templeTokenBalance + }); } /** diff --git a/protocol/foundry.toml b/protocol/foundry.toml index b182ae959..d67e97898 100644 --- a/protocol/foundry.toml +++ b/protocol/foundry.toml @@ -8,6 +8,7 @@ test = 'test/forge' cache_path = 'cache-foundry' gas_reports = ["*"] + evm_version = "paris" # See https://www.evmdiff.com/features?name=PUSH0&kind=opcode [profile.ci] fuzz = { runs = 5000 } diff --git a/protocol/slither.db.json b/protocol/slither.db.json index eaeda4040..71dffe7fd 100644 --- a/protocol/slither.db.json +++ b/protocol/slither.db.json @@ -1,4 +1,10177 @@ [ + { + "elements": [], + "description": "solc-0.8.21 is not recommended for deployment\n", + "markdown": "solc-0.8.21 is not recommended for deployment\n", + "first_markdown_element": "", + "id": "d89306001b1fa2ce11230334eb8b32e1ae6da7490b6d2bb2daf2e369120bbacf", + "check": "solc-version", + "impact": "Informational", + "confidence": "High" + }, + { + "elements": [ + { + "type": "function", + "name": "_mintDToken", + "source_mapping": { + "start": 28533, + "length": 1205, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [ + 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, + 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, + 664, 665, 666, 667, 668, 669, 670 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TreasuryReservesVault", + "source_mapping": { + "start": 2150, + "length": 32023, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [ + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, + 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, + 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, + 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, + 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, + 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, + 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, + 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, + 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, + 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, + 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, + 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, + 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, + 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, + 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, + 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, + 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, + 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, + 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, + 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, + 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, + 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, + 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, + 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, + 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, + 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, + 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, + 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, + 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, + 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, + 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, + 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, + 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, + 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, + 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, + 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, + 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, + 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, + 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, + 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, + 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, + 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, + 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, + 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, + 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, + 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, + 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, + 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, + 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, + 771, 772, 773, 774, 775, 776, 777, 778, 779 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "_mintDToken(address,IERC20,ITreasuryReservesVault.BorrowTokenConfig,uint256,uint256)" + } + }, + { + "type": "node", + "name": "tokenConfig.dToken.mint(strategy,_newDebt)", + "source_mapping": { + "start": 29294, + "length": 43, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [657], + "starting_column": 13, + "ending_column": 56 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "_mintDToken", + "source_mapping": { + "start": 28533, + "length": 1205, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [ + 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, + 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, + 664, 665, 666, 667, 668, 669, 670 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TreasuryReservesVault", + "source_mapping": { + "start": 2150, + "length": 32023, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [ + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, + 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, + 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, + 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, + 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, + 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, + 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, + 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, + 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, + 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, + 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, + 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, + 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, + 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, + 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, + 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, + 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, + 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, + 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, + 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, + 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, + 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, + 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, + 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, + 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, + 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, + 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, + 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, + 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, + 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, + 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, + 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, + 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, + 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, + 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, + 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, + 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, + 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, + 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, + 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, + 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, + 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, + 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, + 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, + 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, + 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, + 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, + 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, + 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, + 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, + 777, 778, 779 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "_mintDToken(address,IERC20,ITreasuryReservesVault.BorrowTokenConfig,uint256,uint256)" + } + } + }, + "additional_fields": { "underlying_type": "external_calls" } + }, + { + "type": "node", + "name": "_tokenCredits[token] = _creditBalance = 0", + "source_mapping": { + "start": 29387, + "length": 41, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [660], + "starting_column": 13, + "ending_column": 54 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "_mintDToken", + "source_mapping": { + "start": 28533, + "length": 1205, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [ + 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, + 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, + 664, 665, 666, 667, 668, 669, 670 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TreasuryReservesVault", + "source_mapping": { + "start": 2150, + "length": 32023, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [ + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, + 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, + 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, + 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, + 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, + 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, + 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, + 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, + 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, + 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, + 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, + 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, + 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, + 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, + 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, + 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, + 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, + 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, + 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, + 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, + 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, + 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, + 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, + 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, + 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, + 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, + 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, + 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, + 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, + 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, + 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, + 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, + 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, + 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, + 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, + 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, + 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, + 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, + 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, + 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, + 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, + 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, + 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, + 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, + 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, + 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, + 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, + 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, + 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, + 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, + 777, 778, 779 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "_mintDToken(address,IERC20,ITreasuryReservesVault.BorrowTokenConfig,uint256,uint256)" + } + } + }, + "additional_fields": { + "underlying_type": "variables_written", + "variable_name": "strategyTokenCredits" + } + } + ], + "description": "Reentrancy in TreasuryReservesVault._mintDToken(address,IERC20,ITreasuryReservesVault.BorrowTokenConfig,uint256,uint256) (contracts/v2/TreasuryReservesVault.sol#638-670):\n\tExternal calls:\n\t- tokenConfig.dToken.mint(strategy,_newDebt) (contracts/v2/TreasuryReservesVault.sol#657)\n\tState variables written after the call(s):\n\t- _tokenCredits[token] = _creditBalance = 0 (contracts/v2/TreasuryReservesVault.sol#660)\n\tTreasuryReservesVault.strategyTokenCredits (contracts/v2/TreasuryReservesVault.sol#78) can be used in cross function reentrancies:\n\t- TreasuryReservesVault._availableForStrategyToBorrow(address,ITreasuryReservesVault.StrategyConfig,IERC20,uint256) (contracts/v2/TreasuryReservesVault.sol#533-551)\n\t- TreasuryReservesVault._burnDToken(address,ITreasuryReservesVault.StrategyConfig,IERC20,ITreasuryReservesVault.BorrowTokenConfig,uint256,uint256) (contracts/v2/TreasuryReservesVault.sol#677-709)\n\t- TreasuryReservesVault._mintDToken(address,IERC20,ITreasuryReservesVault.BorrowTokenConfig,uint256,uint256) (contracts/v2/TreasuryReservesVault.sol#638-670)\n\t- TreasuryReservesVault.setStrategyDebtCeiling(address,IERC20,uint256) (contracts/v2/TreasuryReservesVault.sol#242-255)\n\t- TreasuryReservesVault.shutdown(address) (contracts/v2/TreasuryReservesVault.sol#283-319)\n\t- TreasuryReservesVault.strategyBalanceSheet(address) (contracts/v2/TreasuryReservesVault.sol#447-467)\n\t- TreasuryReservesVault.strategyTokenCredits (contracts/v2/TreasuryReservesVault.sol#78)\n", + "markdown": "Reentrancy in [TreasuryReservesVault._mintDToken(address,IERC20,ITreasuryReservesVault.BorrowTokenConfig,uint256,uint256)](contracts/v2/TreasuryReservesVault.sol#L638-L670):\n\tExternal calls:\n\t- [tokenConfig.dToken.mint(strategy,_newDebt)](contracts/v2/TreasuryReservesVault.sol#L657)\n\tState variables written after the call(s):\n\t- [_tokenCredits[token] = _creditBalance = 0](contracts/v2/TreasuryReservesVault.sol#L660)\n\t[TreasuryReservesVault.strategyTokenCredits](contracts/v2/TreasuryReservesVault.sol#L78) can be used in cross function reentrancies:\n\t- [TreasuryReservesVault._availableForStrategyToBorrow(address,ITreasuryReservesVault.StrategyConfig,IERC20,uint256)](contracts/v2/TreasuryReservesVault.sol#L533-L551)\n\t- [TreasuryReservesVault._burnDToken(address,ITreasuryReservesVault.StrategyConfig,IERC20,ITreasuryReservesVault.BorrowTokenConfig,uint256,uint256)](contracts/v2/TreasuryReservesVault.sol#L677-L709)\n\t- [TreasuryReservesVault._mintDToken(address,IERC20,ITreasuryReservesVault.BorrowTokenConfig,uint256,uint256)](contracts/v2/TreasuryReservesVault.sol#L638-L670)\n\t- [TreasuryReservesVault.setStrategyDebtCeiling(address,IERC20,uint256)](contracts/v2/TreasuryReservesVault.sol#L242-L255)\n\t- [TreasuryReservesVault.shutdown(address)](contracts/v2/TreasuryReservesVault.sol#L283-L319)\n\t- [TreasuryReservesVault.strategyBalanceSheet(address)](contracts/v2/TreasuryReservesVault.sol#L447-L467)\n\t- [TreasuryReservesVault.strategyTokenCredits](contracts/v2/TreasuryReservesVault.sol#L78)\n", + "first_markdown_element": "contracts/v2/TreasuryReservesVault.sol#L638-L670", + "id": "0ce7ad9bcbc81412efd61c0340786d494f3510ea2cdeb81edb9c0103d00c0d0c", + "check": "reentrancy-no-eth", + "impact": "Medium", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "shutdown", + "source_mapping": { + "start": 11822, + "length": 1632, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [ + 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, + 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, + 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TreasuryReservesVault", + "source_mapping": { + "start": 2150, + "length": 32023, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [ + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, + 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, + 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, + 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, + 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, + 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, + 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, + 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, + 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, + 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, + 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, + 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, + 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, + 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, + 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, + 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, + 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, + 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, + 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, + 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, + 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, + 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, + 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, + 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, + 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, + 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, + 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, + 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, + 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, + 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, + 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, + 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, + 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, + 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, + 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, + 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, + 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, + 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, + 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, + 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, + 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, + 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, + 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, + 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, + 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, + 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, + 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, + 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, + 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, + 771, 772, 773, 774, 775, 776, 777, 778, 779 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "shutdown(address)" + } + }, + { + "type": "node", + "name": "_outstandingDebt = borrowTokens[_token].dToken.burnAll(strategy)", + "source_mapping": { + "start": 12499, + "length": 64, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [296], + "starting_column": 13, + "ending_column": 77 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "shutdown", + "source_mapping": { + "start": 11822, + "length": 1632, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [ + 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, + 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, + 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TreasuryReservesVault", + "source_mapping": { + "start": 2150, + "length": 32023, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [ + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, + 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, + 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, + 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, + 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, + 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, + 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, + 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, + 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, + 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, + 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, + 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, + 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, + 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, + 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, + 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, + 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, + 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, + 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, + 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, + 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, + 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, + 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, + 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, + 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, + 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, + 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, + 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, + 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, + 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, + 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, + 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, + 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, + 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, + 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, + 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, + 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, + 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, + 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, + 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, + 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, + 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, + 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, + 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, + 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, + 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, + 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, + 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, + 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, + 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, + 777, 778, 779 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "shutdown(address)" + } + } + }, + "additional_fields": { "underlying_type": "external_calls" } + }, + { + "type": "node", + "name": "delete strategies[strategy]", + "source_mapping": { + "start": 13381, + "length": 27, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [317], + "starting_column": 9, + "ending_column": 36 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "shutdown", + "source_mapping": { + "start": 11822, + "length": 1632, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [ + 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, + 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, + 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TreasuryReservesVault", + "source_mapping": { + "start": 2150, + "length": 32023, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [ + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, + 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, + 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, + 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, + 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, + 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, + 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, + 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, + 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, + 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, + 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, + 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, + 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, + 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, + 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, + 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, + 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, + 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, + 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, + 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, + 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, + 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, + 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, + 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, + 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, + 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, + 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, + 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, + 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, + 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, + 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, + 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, + 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, + 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, + 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, + 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, + 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, + 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, + 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, + 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, + 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, + 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, + 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, + 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, + 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, + 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, + 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, + 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, + 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, + 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, + 777, 778, 779 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "shutdown(address)" + } + } + }, + "additional_fields": { + "underlying_type": "variables_written", + "variable_name": "strategies" + } + } + ], + "description": "Reentrancy in TreasuryReservesVault.shutdown(address) (contracts/v2/TreasuryReservesVault.sol#283-319):\n\tExternal calls:\n\t- _outstandingDebt = borrowTokens[_token].dToken.burnAll(strategy) (contracts/v2/TreasuryReservesVault.sol#296)\n\tState variables written after the call(s):\n\t- delete strategies[strategy] (contracts/v2/TreasuryReservesVault.sol#317)\n\tTreasuryReservesVault.strategies (contracts/v2/TreasuryReservesVault.sol#55) can be used in cross function reentrancies:\n\t- TreasuryReservesVault._getStrategyConfig(address) (contracts/v2/TreasuryReservesVault.sol#711-714)\n\t- TreasuryReservesVault._withdrawFromBaseStrategy(address,IERC20,ITreasuryReservesVault.BorrowTokenConfig,address,uint256) (contracts/v2/TreasuryReservesVault.sol#582-632)\n\t- TreasuryReservesVault.addStrategy(address,int256,ITempleStrategy.AssetBalance[]) (contracts/v2/TreasuryReservesVault.sol#173-201)\n\t- TreasuryReservesVault.shutdown(address) (contracts/v2/TreasuryReservesVault.sol#283-319)\n\t- TreasuryReservesVault.strategies (contracts/v2/TreasuryReservesVault.sol#55)\n", + "markdown": "Reentrancy in [TreasuryReservesVault.shutdown(address)](contracts/v2/TreasuryReservesVault.sol#L283-L319):\n\tExternal calls:\n\t- [_outstandingDebt = borrowTokens[_token].dToken.burnAll(strategy)](contracts/v2/TreasuryReservesVault.sol#L296)\n\tState variables written after the call(s):\n\t- [delete strategies[strategy]](contracts/v2/TreasuryReservesVault.sol#L317)\n\t[TreasuryReservesVault.strategies](contracts/v2/TreasuryReservesVault.sol#L55) can be used in cross function reentrancies:\n\t- [TreasuryReservesVault._getStrategyConfig(address)](contracts/v2/TreasuryReservesVault.sol#L711-L714)\n\t- [TreasuryReservesVault._withdrawFromBaseStrategy(address,IERC20,ITreasuryReservesVault.BorrowTokenConfig,address,uint256)](contracts/v2/TreasuryReservesVault.sol#L582-L632)\n\t- [TreasuryReservesVault.addStrategy(address,int256,ITempleStrategy.AssetBalance[])](contracts/v2/TreasuryReservesVault.sol#L173-L201)\n\t- [TreasuryReservesVault.shutdown(address)](contracts/v2/TreasuryReservesVault.sol#L283-L319)\n\t- [TreasuryReservesVault.strategies](contracts/v2/TreasuryReservesVault.sol#L55)\n", + "first_markdown_element": "contracts/v2/TreasuryReservesVault.sol#L283-L319", + "id": "29da7db88824f300cbfeae877c2e6c080f8344d5012c1ba25820228cb3feb89a", + "check": "reentrancy-no-eth", + "impact": "Medium", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "swap", + "source_mapping": { + "start": 5765, + "length": 517, + "filename_relative": "contracts/core/OtcOffer.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/core/OtcOffer.sol", + "filename_short": "contracts/core/OtcOffer.sol", + "is_dependency": false, + "lines": [131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "OtcOffer", + "source_mapping": { + "start": 847, + "length": 6468, + "filename_relative": "contracts/core/OtcOffer.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/core/OtcOffer.sol", + "filename_short": "contracts/core/OtcOffer.sol", + "is_dependency": false, + "lines": [ + 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, + 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, + 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, + 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, + 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, + 164 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "swap(uint256)" + } + }, + { + "type": "node", + "name": "userBuyToken.safeTransferFrom(_fundsOwner,msg.sender,buyTokenAmount)", + "source_mapping": { + "start": 6205, + "length": 70, + "filename_relative": "contracts/core/OtcOffer.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/core/OtcOffer.sol", + "filename_short": "contracts/core/OtcOffer.sol", + "is_dependency": false, + "lines": [140], + "starting_column": 9, + "ending_column": 79 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "swap", + "source_mapping": { + "start": 5765, + "length": 517, + "filename_relative": "contracts/core/OtcOffer.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/core/OtcOffer.sol", + "filename_short": "contracts/core/OtcOffer.sol", + "is_dependency": false, + "lines": [131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "OtcOffer", + "source_mapping": { + "start": 847, + "length": 6468, + "filename_relative": "contracts/core/OtcOffer.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/core/OtcOffer.sol", + "filename_short": "contracts/core/OtcOffer.sol", + "is_dependency": false, + "lines": [ + 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, + 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, + 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, + 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, + 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, + 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, + 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, + 155, 156, 157, 158, 159, 160, 161, 162, 163, 164 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "swap(uint256)" + } + } + } + } + ], + "description": "OtcOffer.swap(uint256) (contracts/core/OtcOffer.sol#131-141) uses arbitrary from in transferFrom: userBuyToken.safeTransferFrom(_fundsOwner,msg.sender,buyTokenAmount) (contracts/core/OtcOffer.sol#140)\n", + "markdown": "[OtcOffer.swap(uint256)](contracts/core/OtcOffer.sol#L131-L141) uses arbitrary from in transferFrom: [userBuyToken.safeTransferFrom(_fundsOwner,msg.sender,buyTokenAmount)](contracts/core/OtcOffer.sol#L140)\n", + "first_markdown_element": "contracts/core/OtcOffer.sol#L131-L141", + "id": "05d3d20016db7bcfcaa4746897ba0c55c97e64e9bbf77842db5d2e2d9ceae5fd", + "check": "arbitrary-send-erc20", + "impact": "High", + "confidence": "High" + }, + { + "elements": [ + { + "type": "function", + "name": "_burnDToken", + "source_mapping": { + "start": 29999, + "length": 1179, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [ + 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, + 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, + 703, 704, 705, 706, 707, 708, 709 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TreasuryReservesVault", + "source_mapping": { + "start": 2150, + "length": 32023, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [ + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, + 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, + 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, + 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, + 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, + 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, + 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, + 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, + 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, + 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, + 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, + 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, + 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, + 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, + 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, + 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, + 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, + 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, + 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, + 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, + 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, + 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, + 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, + 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, + 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, + 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, + 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, + 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, + 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, + 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, + 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, + 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, + 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, + 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, + 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, + 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, + 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, + 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, + 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, + 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, + 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, + 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, + 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, + 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, + 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, + 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, + 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, + 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, + 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, + 771, 772, 773, 774, 775, 776, 777, 778, 779 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "_burnDToken(address,ITreasuryReservesVault.StrategyConfig,IERC20,ITreasuryReservesVault.BorrowTokenConfig,uint256,uint256)" + } + }, + { + "type": "node", + "name": "_burnedAmount = tokenConfig.dToken.burn(strategy,toBurnAmount)", + "source_mapping": { + "start": 30398, + "length": 71, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [688], + "starting_column": 9, + "ending_column": 80 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "_burnDToken", + "source_mapping": { + "start": 29999, + "length": 1179, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [ + 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, + 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, + 703, 704, 705, 706, 707, 708, 709 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TreasuryReservesVault", + "source_mapping": { + "start": 2150, + "length": 32023, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [ + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, + 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, + 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, + 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, + 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, + 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, + 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, + 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, + 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, + 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, + 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, + 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, + 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, + 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, + 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, + 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, + 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, + 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, + 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, + 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, + 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, + 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, + 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, + 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, + 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, + 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, + 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, + 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, + 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, + 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, + 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, + 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, + 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, + 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, + 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, + 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, + 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, + 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, + 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, + 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, + 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, + 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, + 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, + 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, + 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, + 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, + 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, + 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, + 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, + 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, + 777, 778, 779 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "_burnDToken(address,ITreasuryReservesVault.StrategyConfig,IERC20,ITreasuryReservesVault.BorrowTokenConfig,uint256,uint256)" + } + } + }, + "additional_fields": { "underlying_type": "external_calls" } + }, + { + "type": "node", + "name": "_tokenCredits[token] = _creditBalance", + "source_mapping": { + "start": 31023, + "length": 37, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [705], + "starting_column": 13, + "ending_column": 50 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "_burnDToken", + "source_mapping": { + "start": 29999, + "length": 1179, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [ + 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, + 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, + 703, 704, 705, 706, 707, 708, 709 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TreasuryReservesVault", + "source_mapping": { + "start": 2150, + "length": 32023, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [ + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, + 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, + 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, + 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, + 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, + 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, + 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, + 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, + 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, + 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, + 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, + 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, + 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, + 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, + 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, + 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, + 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, + 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, + 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, + 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, + 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, + 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, + 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, + 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, + 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, + 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, + 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, + 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, + 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, + 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, + 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, + 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, + 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, + 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, + 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, + 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, + 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, + 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, + 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, + 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, + 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, + 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, + 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, + 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, + 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, + 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, + 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, + 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, + 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, + 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, + 777, 778, 779 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "_burnDToken(address,ITreasuryReservesVault.StrategyConfig,IERC20,ITreasuryReservesVault.BorrowTokenConfig,uint256,uint256)" + } + } + }, + "additional_fields": { + "underlying_type": "variables_written", + "variable_name": "strategyTokenCredits" + } + } + ], + "description": "Reentrancy in TreasuryReservesVault._burnDToken(address,ITreasuryReservesVault.StrategyConfig,IERC20,ITreasuryReservesVault.BorrowTokenConfig,uint256,uint256) (contracts/v2/TreasuryReservesVault.sol#677-709):\n\tExternal calls:\n\t- _burnedAmount = tokenConfig.dToken.burn(strategy,toBurnAmount) (contracts/v2/TreasuryReservesVault.sol#688)\n\tState variables written after the call(s):\n\t- _tokenCredits[token] = _creditBalance (contracts/v2/TreasuryReservesVault.sol#705)\n\tTreasuryReservesVault.strategyTokenCredits (contracts/v2/TreasuryReservesVault.sol#78) can be used in cross function reentrancies:\n\t- TreasuryReservesVault._availableForStrategyToBorrow(address,ITreasuryReservesVault.StrategyConfig,IERC20,uint256) (contracts/v2/TreasuryReservesVault.sol#533-551)\n\t- TreasuryReservesVault._burnDToken(address,ITreasuryReservesVault.StrategyConfig,IERC20,ITreasuryReservesVault.BorrowTokenConfig,uint256,uint256) (contracts/v2/TreasuryReservesVault.sol#677-709)\n\t- TreasuryReservesVault._mintDToken(address,IERC20,ITreasuryReservesVault.BorrowTokenConfig,uint256,uint256) (contracts/v2/TreasuryReservesVault.sol#638-670)\n\t- TreasuryReservesVault.setStrategyDebtCeiling(address,IERC20,uint256) (contracts/v2/TreasuryReservesVault.sol#242-255)\n\t- TreasuryReservesVault.shutdown(address) (contracts/v2/TreasuryReservesVault.sol#283-319)\n\t- TreasuryReservesVault.strategyBalanceSheet(address) (contracts/v2/TreasuryReservesVault.sol#447-467)\n\t- TreasuryReservesVault.strategyTokenCredits (contracts/v2/TreasuryReservesVault.sol#78)\n", + "markdown": "Reentrancy in [TreasuryReservesVault._burnDToken(address,ITreasuryReservesVault.StrategyConfig,IERC20,ITreasuryReservesVault.BorrowTokenConfig,uint256,uint256)](contracts/v2/TreasuryReservesVault.sol#L677-L709):\n\tExternal calls:\n\t- [_burnedAmount = tokenConfig.dToken.burn(strategy,toBurnAmount)](contracts/v2/TreasuryReservesVault.sol#L688)\n\tState variables written after the call(s):\n\t- [_tokenCredits[token] = _creditBalance](contracts/v2/TreasuryReservesVault.sol#L705)\n\t[TreasuryReservesVault.strategyTokenCredits](contracts/v2/TreasuryReservesVault.sol#L78) can be used in cross function reentrancies:\n\t- [TreasuryReservesVault._availableForStrategyToBorrow(address,ITreasuryReservesVault.StrategyConfig,IERC20,uint256)](contracts/v2/TreasuryReservesVault.sol#L533-L551)\n\t- [TreasuryReservesVault._burnDToken(address,ITreasuryReservesVault.StrategyConfig,IERC20,ITreasuryReservesVault.BorrowTokenConfig,uint256,uint256)](contracts/v2/TreasuryReservesVault.sol#L677-L709)\n\t- [TreasuryReservesVault._mintDToken(address,IERC20,ITreasuryReservesVault.BorrowTokenConfig,uint256,uint256)](contracts/v2/TreasuryReservesVault.sol#L638-L670)\n\t- [TreasuryReservesVault.setStrategyDebtCeiling(address,IERC20,uint256)](contracts/v2/TreasuryReservesVault.sol#L242-L255)\n\t- [TreasuryReservesVault.shutdown(address)](contracts/v2/TreasuryReservesVault.sol#L283-L319)\n\t- [TreasuryReservesVault.strategyBalanceSheet(address)](contracts/v2/TreasuryReservesVault.sol#L447-L467)\n\t- [TreasuryReservesVault.strategyTokenCredits](contracts/v2/TreasuryReservesVault.sol#L78)\n", + "first_markdown_element": "contracts/v2/TreasuryReservesVault.sol#L677-L709", + "id": "c8932bc3a4a8bcb7213dd16df3325de16b2cfe251691839c0d5db322cdde8cc6", + "check": "reentrancy-no-eth", + "impact": "Medium", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "deployPayouts", + "source_mapping": { + "start": 2818, + "length": 1078, + "filename_relative": "contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_short": "contracts/admin/TempleTeamPaymentsFactory.sol", + "is_dependency": false, + "lines": [ + 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, + 110, 111, 112 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TempleTeamPaymentsFactory", + "source_mapping": { + "start": 279, + "length": 4653, + "filename_relative": "contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_short": "contracts/admin/TempleTeamPaymentsFactory.sol", + "is_dependency": false, + "lines": [ + 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, + 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, + 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, + 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, + 143, 144 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "deployPayouts(IERC20,address[],uint256[],uint256)" + } + }, + { + "type": "node", + "name": "paymentContract.initialize(_token)", + "source_mapping": { + "start": 3274, + "length": 34, + "filename_relative": "contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_short": "contracts/admin/TempleTeamPaymentsFactory.sol", + "is_dependency": false, + "lines": [89], + "starting_column": 9, + "ending_column": 43 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "deployPayouts", + "source_mapping": { + "start": 2818, + "length": 1078, + "filename_relative": "contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_short": "contracts/admin/TempleTeamPaymentsFactory.sol", + "is_dependency": false, + "lines": [ + 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, + 109, 110, 111, 112 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TempleTeamPaymentsFactory", + "source_mapping": { + "start": 279, + "length": 4653, + "filename_relative": "contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_short": "contracts/admin/TempleTeamPaymentsFactory.sol", + "is_dependency": false, + "lines": [ + 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, + 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, + 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, + 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "deployPayouts(IERC20,address[],uint256[],uint256)" + } + } + }, + "additional_fields": { "underlying_type": "external_calls" } + }, + { + "type": "node", + "name": "paymentContract.setAllocations(_dests,_allocations)", + "source_mapping": { + "start": 3318, + "length": 52, + "filename_relative": "contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_short": "contracts/admin/TempleTeamPaymentsFactory.sol", + "is_dependency": false, + "lines": [90], + "starting_column": 9, + "ending_column": 61 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "deployPayouts", + "source_mapping": { + "start": 2818, + "length": 1078, + "filename_relative": "contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_short": "contracts/admin/TempleTeamPaymentsFactory.sol", + "is_dependency": false, + "lines": [ + 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, + 109, 110, 111, 112 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TempleTeamPaymentsFactory", + "source_mapping": { + "start": 279, + "length": 4653, + "filename_relative": "contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_short": "contracts/admin/TempleTeamPaymentsFactory.sol", + "is_dependency": false, + "lines": [ + 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, + 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, + 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, + 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "deployPayouts(IERC20,address[],uint256[],uint256)" + } + } + }, + "additional_fields": { "underlying_type": "external_calls" } + }, + { + "type": "node", + "name": "paymentContract.transferOwnership(msg.sender)", + "source_mapping": { + "start": 3381, + "length": 45, + "filename_relative": "contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_short": "contracts/admin/TempleTeamPaymentsFactory.sol", + "is_dependency": false, + "lines": [92], + "starting_column": 9, + "ending_column": 54 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "deployPayouts", + "source_mapping": { + "start": 2818, + "length": 1078, + "filename_relative": "contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_short": "contracts/admin/TempleTeamPaymentsFactory.sol", + "is_dependency": false, + "lines": [ + 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, + 109, 110, 111, 112 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TempleTeamPaymentsFactory", + "source_mapping": { + "start": 279, + "length": 4653, + "filename_relative": "contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_short": "contracts/admin/TempleTeamPaymentsFactory.sol", + "is_dependency": false, + "lines": [ + 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, + 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, + 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, + 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "deployPayouts(IERC20,address[],uint256[],uint256)" + } + } + }, + "additional_fields": { "underlying_type": "external_calls" } + }, + { + "type": "node", + "name": "SafeERC20.safeTransferFrom(_token,msg.sender,address(paymentContract),_totalFunding)", + "source_mapping": { + "start": 3473, + "length": 165, + "filename_relative": "contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_short": "contracts/admin/TempleTeamPaymentsFactory.sol", + "is_dependency": false, + "lines": [95, 96, 97, 98, 99, 100], + "starting_column": 13, + "ending_column": 14 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "deployPayouts", + "source_mapping": { + "start": 2818, + "length": 1078, + "filename_relative": "contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_short": "contracts/admin/TempleTeamPaymentsFactory.sol", + "is_dependency": false, + "lines": [ + 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, + 109, 110, 111, 112 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TempleTeamPaymentsFactory", + "source_mapping": { + "start": 279, + "length": 4653, + "filename_relative": "contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_short": "contracts/admin/TempleTeamPaymentsFactory.sol", + "is_dependency": false, + "lines": [ + 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, + 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, + 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, + 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "deployPayouts(IERC20,address[],uint256[],uint256)" + } + } + }, + "additional_fields": { "underlying_type": "external_calls" } + }, + { + "type": "node", + "name": "incrementEpoch(address(paymentContract),_totalFunding)", + "source_mapping": { + "start": 3649, + "length": 55, + "filename_relative": "contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_short": "contracts/admin/TempleTeamPaymentsFactory.sol", + "is_dependency": false, + "lines": [102], + "starting_column": 9, + "ending_column": 64 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "deployPayouts", + "source_mapping": { + "start": 2818, + "length": 1078, + "filename_relative": "contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_short": "contracts/admin/TempleTeamPaymentsFactory.sol", + "is_dependency": false, + "lines": [ + 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, + 109, 110, 111, 112 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TempleTeamPaymentsFactory", + "source_mapping": { + "start": 279, + "length": 4653, + "filename_relative": "contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_short": "contracts/admin/TempleTeamPaymentsFactory.sol", + "is_dependency": false, + "lines": [ + 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, + 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, + 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, + 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "deployPayouts(IERC20,address[],uint256[],uint256)" + } + } + }, + "additional_fields": { + "underlying_type": "variables_written", + "variable_name": "lastPaidEpoch" + } + }, + { + "type": "node", + "name": "data = FundingData({paymentContract:address(_paymentContract),totalFunding:_totalFunding,epoch:lastPaidEpoch ++})", + "source_mapping": { + "start": 1542, + "length": 182, + "filename_relative": "contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_short": "contracts/admin/TempleTeamPaymentsFactory.sol", + "is_dependency": false, + "lines": [50, 51, 52, 53, 54], + "starting_column": 9, + "ending_column": 11 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "incrementEpoch", + "source_mapping": { + "start": 1428, + "length": 347, + "filename_relative": "contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_short": "contracts/admin/TempleTeamPaymentsFactory.sol", + "is_dependency": false, + "lines": [46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TempleTeamPaymentsFactory", + "source_mapping": { + "start": 279, + "length": 4653, + "filename_relative": "contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_short": "contracts/admin/TempleTeamPaymentsFactory.sol", + "is_dependency": false, + "lines": [ + 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, + 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, + 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, + 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "incrementEpoch(address,uint256)" + } + } + }, + "additional_fields": { + "underlying_type": "variables_written", + "variable_name": "lastPaidEpoch" + } + } + ], + "description": "Reentrancy in TempleTeamPaymentsFactory.deployPayouts(IERC20,address[],uint256[],uint256) (contracts/admin/TempleTeamPaymentsFactory.sol#79-112):\n\tExternal calls:\n\t- paymentContract.initialize(_token) (contracts/admin/TempleTeamPaymentsFactory.sol#89)\n\t- paymentContract.setAllocations(_dests,_allocations) (contracts/admin/TempleTeamPaymentsFactory.sol#90)\n\t- paymentContract.transferOwnership(msg.sender) (contracts/admin/TempleTeamPaymentsFactory.sol#92)\n\t- SafeERC20.safeTransferFrom(_token,msg.sender,address(paymentContract),_totalFunding) (contracts/admin/TempleTeamPaymentsFactory.sol#95-100)\n\tState variables written after the call(s):\n\t- incrementEpoch(address(paymentContract),_totalFunding) (contracts/admin/TempleTeamPaymentsFactory.sol#102)\n\t\t- data = FundingData({paymentContract:address(_paymentContract),totalFunding:_totalFunding,epoch:lastPaidEpoch ++}) (contracts/admin/TempleTeamPaymentsFactory.sol#50-54)\n\tTempleTeamPaymentsFactory.lastPaidEpoch (contracts/admin/TempleTeamPaymentsFactory.sol#23) can be used in cross function reentrancies:\n\t- TempleTeamPaymentsFactory.constructor(address,uint16) (contracts/admin/TempleTeamPaymentsFactory.sol#40-44)\n\t- TempleTeamPaymentsFactory.deployPayouts(IERC20,address[],uint256[],uint256) (contracts/admin/TempleTeamPaymentsFactory.sol#79-112)\n\t- TempleTeamPaymentsFactory.directPayouts(IERC20,address[],uint256[]) (contracts/admin/TempleTeamPaymentsFactory.sol#119-143)\n\t- TempleTeamPaymentsFactory.incrementEpoch(address,uint256) (contracts/admin/TempleTeamPaymentsFactory.sol#46-56)\n\t- TempleTeamPaymentsFactory.lastPaidEpoch (contracts/admin/TempleTeamPaymentsFactory.sol#23)\n", + "markdown": "Reentrancy in [TempleTeamPaymentsFactory.deployPayouts(IERC20,address[],uint256[],uint256)](contracts/admin/TempleTeamPaymentsFactory.sol#L79-L112):\n\tExternal calls:\n\t- [paymentContract.initialize(_token)](contracts/admin/TempleTeamPaymentsFactory.sol#L89)\n\t- [paymentContract.setAllocations(_dests,_allocations)](contracts/admin/TempleTeamPaymentsFactory.sol#L90)\n\t- [paymentContract.transferOwnership(msg.sender)](contracts/admin/TempleTeamPaymentsFactory.sol#L92)\n\t- [SafeERC20.safeTransferFrom(_token,msg.sender,address(paymentContract),_totalFunding)](contracts/admin/TempleTeamPaymentsFactory.sol#L95-L100)\n\tState variables written after the call(s):\n\t- [incrementEpoch(address(paymentContract),_totalFunding)](contracts/admin/TempleTeamPaymentsFactory.sol#L102)\n\t\t- [data = FundingData({paymentContract:address(_paymentContract),totalFunding:_totalFunding,epoch:lastPaidEpoch ++})](contracts/admin/TempleTeamPaymentsFactory.sol#L50-L54)\n\t[TempleTeamPaymentsFactory.lastPaidEpoch](contracts/admin/TempleTeamPaymentsFactory.sol#L23) can be used in cross function reentrancies:\n\t- [TempleTeamPaymentsFactory.constructor(address,uint16)](contracts/admin/TempleTeamPaymentsFactory.sol#L40-L44)\n\t- [TempleTeamPaymentsFactory.deployPayouts(IERC20,address[],uint256[],uint256)](contracts/admin/TempleTeamPaymentsFactory.sol#L79-L112)\n\t- [TempleTeamPaymentsFactory.directPayouts(IERC20,address[],uint256[])](contracts/admin/TempleTeamPaymentsFactory.sol#L119-L143)\n\t- [TempleTeamPaymentsFactory.incrementEpoch(address,uint256)](contracts/admin/TempleTeamPaymentsFactory.sol#L46-L56)\n\t- [TempleTeamPaymentsFactory.lastPaidEpoch](contracts/admin/TempleTeamPaymentsFactory.sol#L23)\n", + "first_markdown_element": "contracts/admin/TempleTeamPaymentsFactory.sol#L79-L112", + "id": "1239a22bea2c9a42dbde3ae4ac80f8aa9a378a084fd732a81c3169ae01c87319", + "check": "reentrancy-no-eth", + "impact": "Medium", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "shutdown", + "source_mapping": { + "start": 11822, + "length": 1632, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [ + 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, + 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, + 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TreasuryReservesVault", + "source_mapping": { + "start": 2150, + "length": 32023, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [ + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, + 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, + 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, + 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, + 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, + 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, + 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, + 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, + 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, + 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, + 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, + 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, + 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, + 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, + 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, + 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, + 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, + 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, + 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, + 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, + 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, + 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, + 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, + 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, + 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, + 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, + 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, + 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, + 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, + 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, + 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, + 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, + 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, + 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, + 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, + 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, + 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, + 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, + 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, + 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, + 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, + 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, + 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, + 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, + 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, + 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, + 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, + 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, + 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, + 771, 772, 773, 774, 775, 776, 777, 778, 779 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "shutdown(address)" + } + }, + { + "type": "node", + "name": "_strategySet.remove(strategy)", + "source_mapping": { + "start": 13418, + "length": 29, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [318], + "starting_column": 9, + "ending_column": 38 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "shutdown", + "source_mapping": { + "start": 11822, + "length": 1632, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [ + 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, + 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, + 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TreasuryReservesVault", + "source_mapping": { + "start": 2150, + "length": 32023, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [ + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, + 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, + 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, + 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, + 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, + 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, + 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, + 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, + 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, + 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, + 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, + 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, + 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, + 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, + 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, + 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, + 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, + 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, + 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, + 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, + 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, + 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, + 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, + 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, + 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, + 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, + 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, + 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, + 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, + 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, + 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, + 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, + 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, + 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, + 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, + 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, + 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, + 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, + 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, + 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, + 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, + 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, + 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, + 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, + 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, + 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, + 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, + 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, + 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, + 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, + 777, 778, 779 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "shutdown(address)" + } + } + } + } + ], + "description": "TreasuryReservesVault.shutdown(address) (contracts/v2/TreasuryReservesVault.sol#283-319) ignores return value by _strategySet.remove(strategy) (contracts/v2/TreasuryReservesVault.sol#318)\n", + "markdown": "[TreasuryReservesVault.shutdown(address)](contracts/v2/TreasuryReservesVault.sol#L283-L319) ignores return value by [_strategySet.remove(strategy)](contracts/v2/TreasuryReservesVault.sol#L318)\n", + "first_markdown_element": "contracts/v2/TreasuryReservesVault.sol#L283-L319", + "id": "14b0ae4775bb656e93254a9232479092aea49d94c14762546af7a2b568164211", + "check": "unused-return", + "impact": "Medium", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "latestAssetBalances", + "source_mapping": { + "start": 5827, + "length": 565, + "filename_relative": "contracts/v2/strategies/RamosStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/RamosStrategy.sol", + "filename_short": "contracts/v2/strategies/RamosStrategy.sol", + "is_dependency": false, + "lines": [ + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, + 157, 158, 159 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "RamosStrategy", + "source_mapping": { + "start": 1131, + "length": 9320, + "filename_relative": "contracts/v2/strategies/RamosStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/RamosStrategy.sol", + "filename_short": "contracts/v2/strategies/RamosStrategy.sol", + "is_dependency": false, + "lines": [ + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, + 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, + 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, + 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, + 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, + 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, + 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, + 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, + 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, + 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, + 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, + 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, + 257, 258, 259, 260, 261, 262, 263, 264, 265 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "latestAssetBalances()" + } + }, + { + "type": "node", + "name": "(templeTokenBalance,quoteTokenBalance) = ramos.positions()", + "source_mapping": { + "start": 5992, + "length": 77, + "filename_relative": "contracts/v2/strategies/RamosStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/RamosStrategy.sol", + "filename_short": "contracts/v2/strategies/RamosStrategy.sol", + "is_dependency": false, + "lines": [148], + "starting_column": 9, + "ending_column": 86 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "latestAssetBalances", + "source_mapping": { + "start": 5827, + "length": 565, + "filename_relative": "contracts/v2/strategies/RamosStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/RamosStrategy.sol", + "filename_short": "contracts/v2/strategies/RamosStrategy.sol", + "is_dependency": false, + "lines": [ + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, + 157, 158, 159 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "RamosStrategy", + "source_mapping": { + "start": 1131, + "length": 9320, + "filename_relative": "contracts/v2/strategies/RamosStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/RamosStrategy.sol", + "filename_short": "contracts/v2/strategies/RamosStrategy.sol", + "is_dependency": false, + "lines": [ + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, + 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, + 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, + 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, + 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, + 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, + 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, + 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, + 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, + 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, + 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, + 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "latestAssetBalances()" + } + } + } + } + ], + "description": "RamosStrategy.latestAssetBalances() (contracts/v2/strategies/RamosStrategy.sol#144-159) ignores return value by (templeTokenBalance,quoteTokenBalance) = ramos.positions() (contracts/v2/strategies/RamosStrategy.sol#148)\n", + "markdown": "[RamosStrategy.latestAssetBalances()](contracts/v2/strategies/RamosStrategy.sol#L144-L159) ignores return value by [(templeTokenBalance,quoteTokenBalance) = ramos.positions()](contracts/v2/strategies/RamosStrategy.sol#L148)\n", + "first_markdown_element": "contracts/v2/strategies/RamosStrategy.sol#L144-L159", + "id": "420dcd2cbb24da1b9ab2dafe842594bf844fae670bc85fc21d1d3835c68dd336", + "check": "unused-return", + "impact": "Medium", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "proportionalAddLiquidityQuote", + "source_mapping": { + "start": 6569, + "length": 393, + "filename_relative": "contracts/v2/strategies/RamosStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/RamosStrategy.sol", + "filename_short": "contracts/v2/strategies/RamosStrategy.sol", + "is_dependency": false, + "lines": [165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "RamosStrategy", + "source_mapping": { + "start": 1131, + "length": 9320, + "filename_relative": "contracts/v2/strategies/RamosStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/RamosStrategy.sol", + "filename_short": "contracts/v2/strategies/RamosStrategy.sol", + "is_dependency": false, + "lines": [ + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, + 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, + 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, + 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, + 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, + 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, + 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, + 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, + 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, + 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, + 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, + 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, + 257, 258, 259, 260, 261, 262, 263, 264, 265 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "proportionalAddLiquidityQuote(uint256,uint256)" + } + }, + { + "type": "node", + "name": "ramos.poolHelper().proportionalAddLiquidityQuote(_quoteTokenAmount,_slippageBps)", + "source_mapping": { + "start": 6867, + "length": 88, + "filename_relative": "contracts/v2/strategies/RamosStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/RamosStrategy.sol", + "filename_short": "contracts/v2/strategies/RamosStrategy.sol", + "is_dependency": false, + "lines": [174], + "starting_column": 9, + "ending_column": 97 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "proportionalAddLiquidityQuote", + "source_mapping": { + "start": 6569, + "length": 393, + "filename_relative": "contracts/v2/strategies/RamosStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/RamosStrategy.sol", + "filename_short": "contracts/v2/strategies/RamosStrategy.sol", + "is_dependency": false, + "lines": [165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "RamosStrategy", + "source_mapping": { + "start": 1131, + "length": 9320, + "filename_relative": "contracts/v2/strategies/RamosStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/RamosStrategy.sol", + "filename_short": "contracts/v2/strategies/RamosStrategy.sol", + "is_dependency": false, + "lines": [ + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, + 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, + 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, + 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, + 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, + 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, + 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, + 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, + 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, + 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, + 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, + 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "proportionalAddLiquidityQuote(uint256,uint256)" + } + } + } + } + ], + "description": "RamosStrategy.proportionalAddLiquidityQuote(uint256,uint256) (contracts/v2/strategies/RamosStrategy.sol#165-175) ignores return value by ramos.poolHelper().proportionalAddLiquidityQuote(_quoteTokenAmount,_slippageBps) (contracts/v2/strategies/RamosStrategy.sol#174)\n", + "markdown": "[RamosStrategy.proportionalAddLiquidityQuote(uint256,uint256)](contracts/v2/strategies/RamosStrategy.sol#L165-L175) ignores return value by [ramos.poolHelper().proportionalAddLiquidityQuote(_quoteTokenAmount,_slippageBps)](contracts/v2/strategies/RamosStrategy.sol#L174)\n", + "first_markdown_element": "contracts/v2/strategies/RamosStrategy.sol#L165-L175", + "id": "b56d2f4548e025710d998bc242ac7f3032f0e8ea504c62f800fead5160f65786", + "check": "unused-return", + "impact": "Medium", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "proportionalRemoveLiquidityQuote", + "source_mapping": { + "start": 7587, + "length": 438, + "filename_relative": "contracts/v2/strategies/RamosStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/RamosStrategy.sol", + "filename_short": "contracts/v2/strategies/RamosStrategy.sol", + "is_dependency": false, + "lines": [192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "RamosStrategy", + "source_mapping": { + "start": 1131, + "length": 9320, + "filename_relative": "contracts/v2/strategies/RamosStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/RamosStrategy.sol", + "filename_short": "contracts/v2/strategies/RamosStrategy.sol", + "is_dependency": false, + "lines": [ + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, + 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, + 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, + 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, + 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, + 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, + 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, + 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, + 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, + 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, + 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, + 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, + 257, 258, 259, 260, 261, 262, 263, 264, 265 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "proportionalRemoveLiquidityQuote(uint256,uint256)" + } + }, + { + "type": "node", + "name": "ramos.poolHelper().proportionalRemoveLiquidityQuote(_bptAmount,_slippageBps)", + "source_mapping": { + "start": 7934, + "length": 84, + "filename_relative": "contracts/v2/strategies/RamosStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/RamosStrategy.sol", + "filename_short": "contracts/v2/strategies/RamosStrategy.sol", + "is_dependency": false, + "lines": [202], + "starting_column": 9, + "ending_column": 93 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "proportionalRemoveLiquidityQuote", + "source_mapping": { + "start": 7587, + "length": 438, + "filename_relative": "contracts/v2/strategies/RamosStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/RamosStrategy.sol", + "filename_short": "contracts/v2/strategies/RamosStrategy.sol", + "is_dependency": false, + "lines": [ + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "RamosStrategy", + "source_mapping": { + "start": 1131, + "length": 9320, + "filename_relative": "contracts/v2/strategies/RamosStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/RamosStrategy.sol", + "filename_short": "contracts/v2/strategies/RamosStrategy.sol", + "is_dependency": false, + "lines": [ + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, + 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, + 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, + 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, + 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, + 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, + 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, + 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, + 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, + 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, + 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, + 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "proportionalRemoveLiquidityQuote(uint256,uint256)" + } + } + } + } + ], + "description": "RamosStrategy.proportionalRemoveLiquidityQuote(uint256,uint256) (contracts/v2/strategies/RamosStrategy.sol#192-203) ignores return value by ramos.poolHelper().proportionalRemoveLiquidityQuote(_bptAmount,_slippageBps) (contracts/v2/strategies/RamosStrategy.sol#202)\n", + "markdown": "[RamosStrategy.proportionalRemoveLiquidityQuote(uint256,uint256)](contracts/v2/strategies/RamosStrategy.sol#L192-L203) ignores return value by [ramos.poolHelper().proportionalRemoveLiquidityQuote(_bptAmount,_slippageBps)](contracts/v2/strategies/RamosStrategy.sol#L202)\n", + "first_markdown_element": "contracts/v2/strategies/RamosStrategy.sol#L192-L203", + "id": "ed71e6585e1914cd70e3ed747dea0a932bd4ba9629191c626628ce16c695c11d", + "check": "unused-return", + "impact": "Medium", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "populateShutdownData", + "source_mapping": { + "start": 9022, + "length": 564, + "filename_relative": "contracts/v2/strategies/RamosStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/RamosStrategy.sol", + "filename_short": "contracts/v2/strategies/RamosStrategy.sol", + "is_dependency": false, + "lines": [232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "RamosStrategy", + "source_mapping": { + "start": 1131, + "length": 9320, + "filename_relative": "contracts/v2/strategies/RamosStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/RamosStrategy.sol", + "filename_short": "contracts/v2/strategies/RamosStrategy.sol", + "is_dependency": false, + "lines": [ + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, + 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, + 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, + 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, + 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, + 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, + 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, + 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, + 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, + 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, + 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, + 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, + 257, 258, 259, 260, 261, 262, 263, 264, 265 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "populateShutdownData(bytes)" + } + }, + { + "type": "node", + "name": "(shutdownParams.bptAmount,None,None) = ramos.positions()", + "source_mapping": { + "start": 9349, + "length": 48, + "filename_relative": "contracts/v2/strategies/RamosStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/RamosStrategy.sol", + "filename_short": "contracts/v2/strategies/RamosStrategy.sol", + "is_dependency": false, + "lines": [240], + "starting_column": 9, + "ending_column": 57 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "populateShutdownData", + "source_mapping": { + "start": 9022, + "length": 564, + "filename_relative": "contracts/v2/strategies/RamosStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/RamosStrategy.sol", + "filename_short": "contracts/v2/strategies/RamosStrategy.sol", + "is_dependency": false, + "lines": [ + 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "RamosStrategy", + "source_mapping": { + "start": 1131, + "length": 9320, + "filename_relative": "contracts/v2/strategies/RamosStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/RamosStrategy.sol", + "filename_short": "contracts/v2/strategies/RamosStrategy.sol", + "is_dependency": false, + "lines": [ + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, + 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, + 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, + 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, + 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, + 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, + 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, + 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, + 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, + 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, + 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, + 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "populateShutdownData(bytes)" + } + } + } + } + ], + "description": "RamosStrategy.populateShutdownData(bytes) (contracts/v2/strategies/RamosStrategy.sol#232-243) ignores return value by (shutdownParams.bptAmount,None,None) = ramos.positions() (contracts/v2/strategies/RamosStrategy.sol#240)\n", + "markdown": "[RamosStrategy.populateShutdownData(bytes)](contracts/v2/strategies/RamosStrategy.sol#L232-L243) ignores return value by [(shutdownParams.bptAmount,None,None) = ramos.positions()](contracts/v2/strategies/RamosStrategy.sol#L240)\n", + "first_markdown_element": "contracts/v2/strategies/RamosStrategy.sol#L232-L243", + "id": "e68b668794a623b6a5a283b3672d9ddf56508b69062c77c9f4af7f0faf1aa51e", + "check": "unused-return", + "impact": "Medium", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "_doShutdown", + "source_mapping": { + "start": 9818, + "length": 631, + "filename_relative": "contracts/v2/strategies/RamosStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/RamosStrategy.sol", + "filename_short": "contracts/v2/strategies/RamosStrategy.sol", + "is_dependency": false, + "lines": [ + 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "RamosStrategy", + "source_mapping": { + "start": 1131, + "length": 9320, + "filename_relative": "contracts/v2/strategies/RamosStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/RamosStrategy.sol", + "filename_short": "contracts/v2/strategies/RamosStrategy.sol", + "is_dependency": false, + "lines": [ + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, + 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, + 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, + 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, + 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, + 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, + 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, + 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, + 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, + 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, + 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, + 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, + 257, 258, 259, 260, 261, 262, 263, 264, 265 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "_doShutdown(bytes)" + } + }, + { + "type": "node", + "name": "ramos.removeLiquidity(params.requestData,params.bptAmount)", + "source_mapping": { + "start": 9989, + "length": 59, + "filename_relative": "contracts/v2/strategies/RamosStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/RamosStrategy.sol", + "filename_short": "contracts/v2/strategies/RamosStrategy.sol", + "is_dependency": false, + "lines": [252], + "starting_column": 9, + "ending_column": 68 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "_doShutdown", + "source_mapping": { + "start": 9818, + "length": 631, + "filename_relative": "contracts/v2/strategies/RamosStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/RamosStrategy.sol", + "filename_short": "contracts/v2/strategies/RamosStrategy.sol", + "is_dependency": false, + "lines": [ + 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, + 263 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "RamosStrategy", + "source_mapping": { + "start": 1131, + "length": 9320, + "filename_relative": "contracts/v2/strategies/RamosStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/RamosStrategy.sol", + "filename_short": "contracts/v2/strategies/RamosStrategy.sol", + "is_dependency": false, + "lines": [ + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, + 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, + 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, + 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, + 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, + 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, + 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, + 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, + 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, + 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, + 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, + 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "_doShutdown(bytes)" + } + } + } + } + ], + "description": "RamosStrategy._doShutdown(bytes) (contracts/v2/strategies/RamosStrategy.sol#250-263) ignores return value by ramos.removeLiquidity(params.requestData,params.bptAmount) (contracts/v2/strategies/RamosStrategy.sol#252)\n", + "markdown": "[RamosStrategy._doShutdown(bytes)](contracts/v2/strategies/RamosStrategy.sol#L250-L263) ignores return value by [ramos.removeLiquidity(params.requestData,params.bptAmount)](contracts/v2/strategies/RamosStrategy.sol#L252)\n", + "first_markdown_element": "contracts/v2/strategies/RamosStrategy.sol#L250-L263", + "id": "cab4a6d607fc52a73a76b47684750061e88667af7fd3a9cc5e85e235479031b6", + "check": "unused-return", + "impact": "Medium", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "variable", + "name": "_fundsOwner", + "source_mapping": { + "start": 3149, + "length": 19, + "filename_relative": "contracts/core/OtcOffer.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/core/OtcOffer.sol", + "filename_short": "contracts/core/OtcOffer.sol", + "is_dependency": false, + "lines": [72], + "starting_column": 9, + "ending_column": 28 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "constructor", + "source_mapping": { + "start": 3065, + "length": 1117, + "filename_relative": "contracts/core/OtcOffer.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/core/OtcOffer.sol", + "filename_short": "contracts/core/OtcOffer.sol", + "is_dependency": false, + "lines": [ + 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "OtcOffer", + "source_mapping": { + "start": 847, + "length": 6468, + "filename_relative": "contracts/core/OtcOffer.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/core/OtcOffer.sol", + "filename_short": "contracts/core/OtcOffer.sol", + "is_dependency": false, + "lines": [ + 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, + 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, + 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, + 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, + 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, + 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, + 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, + 155, 156, 157, 158, 159, 160, 161, 162, 163, 164 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "constructor(address,address,address,uint256,OtcOffer.OfferPricingToken,uint128,uint128)" + } + } + } + }, + { + "type": "node", + "name": "fundsOwner = _fundsOwner", + "source_mapping": { + "start": 3444, + "length": 24, + "filename_relative": "contracts/core/OtcOffer.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/core/OtcOffer.sol", + "filename_short": "contracts/core/OtcOffer.sol", + "is_dependency": false, + "lines": [80], + "starting_column": 9, + "ending_column": 33 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "constructor", + "source_mapping": { + "start": 3065, + "length": 1117, + "filename_relative": "contracts/core/OtcOffer.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/core/OtcOffer.sol", + "filename_short": "contracts/core/OtcOffer.sol", + "is_dependency": false, + "lines": [ + 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "OtcOffer", + "source_mapping": { + "start": 847, + "length": 6468, + "filename_relative": "contracts/core/OtcOffer.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/core/OtcOffer.sol", + "filename_short": "contracts/core/OtcOffer.sol", + "is_dependency": false, + "lines": [ + 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, + 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, + 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, + 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, + 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, + 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, + 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, + 155, 156, 157, 158, 159, 160, 161, 162, 163, 164 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "constructor(address,address,address,uint256,OtcOffer.OfferPricingToken,uint128,uint128)" + } + } + } + } + ], + "description": "OtcOffer.constructor(address,address,address,uint256,OtcOffer.OfferPricingToken,uint128,uint128)._fundsOwner (contracts/core/OtcOffer.sol#72) lacks a zero-check on :\n\t\t- fundsOwner = _fundsOwner (contracts/core/OtcOffer.sol#80)\n", + "markdown": "[OtcOffer.constructor(address,address,address,uint256,OtcOffer.OfferPricingToken,uint128,uint128)._fundsOwner](contracts/core/OtcOffer.sol#L72) lacks a zero-check on :\n\t\t- [fundsOwner = _fundsOwner](contracts/core/OtcOffer.sol#L80)\n", + "first_markdown_element": "contracts/core/OtcOffer.sol#L72", + "id": "318c72045beea63d39db91e2c64959d93dbfe0e966ec4e74e6cbf32f20a24e68", + "check": "missing-zero-check", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "strategyBalanceSheet", + "source_mapping": { + "start": 19539, + "length": 1196, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [ + 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, + 460, 461, 462, 463, 464, 465, 466, 467 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TreasuryReservesVault", + "source_mapping": { + "start": 2150, + "length": 32023, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [ + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, + 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, + 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, + 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, + 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, + 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, + 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, + 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, + 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, + 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, + 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, + 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, + 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, + 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, + 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, + 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, + 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, + 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, + 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, + 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, + 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, + 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, + 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, + 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, + 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, + 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, + 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, + 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, + 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, + 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, + 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, + 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, + 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, + 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, + 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, + 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, + 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, + 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, + 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, + 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, + 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, + 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, + 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, + 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, + 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, + 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, + 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, + 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, + 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, + 771, 772, 773, 774, 775, 776, 777, 778, 779 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "strategyBalanceSheet(address)" + } + }, + { + "type": "node", + "name": "dTokenBalances[i] = ITempleStrategy.AssetBalance(_token,borrowTokens[IERC20(_token)].dToken.balanceOf(strategy))", + "source_mapping": { + "start": 20490, + "length": 113, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [464], + "starting_column": 13, + "ending_column": 126 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "strategyBalanceSheet", + "source_mapping": { + "start": 19539, + "length": 1196, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [ + 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, + 460, 461, 462, 463, 464, 465, 466, 467 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TreasuryReservesVault", + "source_mapping": { + "start": 2150, + "length": 32023, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [ + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, + 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, + 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, + 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, + 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, + 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, + 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, + 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, + 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, + 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, + 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, + 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, + 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, + 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, + 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, + 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, + 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, + 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, + 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, + 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, + 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, + 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, + 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, + 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, + 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, + 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, + 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, + 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, + 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, + 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, + 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, + 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, + 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, + 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, + 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, + 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, + 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, + 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, + 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, + 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, + 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, + 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, + 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, + 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, + 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, + 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, + 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, + 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, + 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, + 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, + 777, 778, 779 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "strategyBalanceSheet(address)" + } + } + } + } + ], + "description": "TreasuryReservesVault.strategyBalanceSheet(address) (contracts/v2/TreasuryReservesVault.sol#447-467) has external calls inside a loop: dTokenBalances[i] = ITempleStrategy.AssetBalance(_token,borrowTokens[IERC20(_token)].dToken.balanceOf(strategy)) (contracts/v2/TreasuryReservesVault.sol#464)\n", + "markdown": "[TreasuryReservesVault.strategyBalanceSheet(address)](contracts/v2/TreasuryReservesVault.sol#L447-L467) has external calls inside a loop: [dTokenBalances[i] = ITempleStrategy.AssetBalance(_token,borrowTokens[IERC20(_token)].dToken.balanceOf(strategy))](contracts/v2/TreasuryReservesVault.sol#L464)\n", + "first_markdown_element": "contracts/v2/TreasuryReservesVault.sol#L447-L467", + "id": "20bcad4f9996938c51c34e640ba88b7c6f2e553a9bfd34b0e170bf1b1904292b", + "check": "calls-loop", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "directPayouts", + "source_mapping": { + "start": 4101, + "length": 829, + "filename_relative": "contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_short": "contracts/admin/TempleTeamPaymentsFactory.sol", + "is_dependency": false, + "lines": [ + 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TempleTeamPaymentsFactory", + "source_mapping": { + "start": 279, + "length": 4653, + "filename_relative": "contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_short": "contracts/admin/TempleTeamPaymentsFactory.sol", + "is_dependency": false, + "lines": [ + 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, + 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, + 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, + 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, + 143, 144 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "directPayouts(IERC20,address[],uint256[])" + } + }, + { + "type": "node", + "name": "SafeERC20.safeTransferFrom(_token,msg.sender,dest,value)", + "source_mapping": { + "start": 4642, + "length": 59, + "filename_relative": "contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_short": "contracts/admin/TempleTeamPaymentsFactory.sol", + "is_dependency": false, + "lines": [133], + "starting_column": 13, + "ending_column": 72 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "directPayouts", + "source_mapping": { + "start": 4101, + "length": 829, + "filename_relative": "contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_short": "contracts/admin/TempleTeamPaymentsFactory.sol", + "is_dependency": false, + "lines": [ + 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TempleTeamPaymentsFactory", + "source_mapping": { + "start": 279, + "length": 4653, + "filename_relative": "contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_short": "contracts/admin/TempleTeamPaymentsFactory.sol", + "is_dependency": false, + "lines": [ + 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, + 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, + 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, + 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "directPayouts(IERC20,address[],uint256[])" + } + } + }, + "additional_fields": { "underlying_type": "external_calls" } + }, + { + "type": "node", + "name": "SafeERC20.safeTransferFrom(_token,msg.sender,dest,value)", + "source_mapping": { + "start": 4642, + "length": 59, + "filename_relative": "contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_short": "contracts/admin/TempleTeamPaymentsFactory.sol", + "is_dependency": false, + "lines": [133], + "starting_column": 13, + "ending_column": 72 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "directPayouts", + "source_mapping": { + "start": 4101, + "length": 829, + "filename_relative": "contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_short": "contracts/admin/TempleTeamPaymentsFactory.sol", + "is_dependency": false, + "lines": [ + 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TempleTeamPaymentsFactory", + "source_mapping": { + "start": 279, + "length": 4653, + "filename_relative": "contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_short": "contracts/admin/TempleTeamPaymentsFactory.sol", + "is_dependency": false, + "lines": [ + 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, + 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, + 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, + 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "directPayouts(IERC20,address[],uint256[])" + } + } + }, + "additional_fields": { "underlying_type": "external_calls_sending_eth" } + }, + { + "type": "node", + "name": "incrementEpoch(address(this),totalFunding)", + "source_mapping": { + "start": 4816, + "length": 43, + "filename_relative": "contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_short": "contracts/admin/TempleTeamPaymentsFactory.sol", + "is_dependency": false, + "lines": [140], + "starting_column": 9, + "ending_column": 52 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "directPayouts", + "source_mapping": { + "start": 4101, + "length": 829, + "filename_relative": "contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_short": "contracts/admin/TempleTeamPaymentsFactory.sol", + "is_dependency": false, + "lines": [ + 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TempleTeamPaymentsFactory", + "source_mapping": { + "start": 279, + "length": 4653, + "filename_relative": "contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_short": "contracts/admin/TempleTeamPaymentsFactory.sol", + "is_dependency": false, + "lines": [ + 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, + 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, + 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, + 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "directPayouts(IERC20,address[],uint256[])" + } + } + }, + "additional_fields": { + "underlying_type": "variables_written", + "variable_name": "epochsFunded" + } + }, + { + "type": "node", + "name": "epochsFunded[lastPaidEpoch] = data", + "source_mapping": { + "start": 1734, + "length": 34, + "filename_relative": "contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_short": "contracts/admin/TempleTeamPaymentsFactory.sol", + "is_dependency": false, + "lines": [55], + "starting_column": 9, + "ending_column": 43 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "incrementEpoch", + "source_mapping": { + "start": 1428, + "length": 347, + "filename_relative": "contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_short": "contracts/admin/TempleTeamPaymentsFactory.sol", + "is_dependency": false, + "lines": [46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TempleTeamPaymentsFactory", + "source_mapping": { + "start": 279, + "length": 4653, + "filename_relative": "contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_short": "contracts/admin/TempleTeamPaymentsFactory.sol", + "is_dependency": false, + "lines": [ + 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, + 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, + 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, + 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "incrementEpoch(address,uint256)" + } + } + }, + "additional_fields": { + "underlying_type": "variables_written", + "variable_name": "epochsFunded" + } + }, + { + "type": "node", + "name": "incrementEpoch(address(this),totalFunding)", + "source_mapping": { + "start": 4816, + "length": 43, + "filename_relative": "contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_short": "contracts/admin/TempleTeamPaymentsFactory.sol", + "is_dependency": false, + "lines": [140], + "starting_column": 9, + "ending_column": 52 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "directPayouts", + "source_mapping": { + "start": 4101, + "length": 829, + "filename_relative": "contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_short": "contracts/admin/TempleTeamPaymentsFactory.sol", + "is_dependency": false, + "lines": [ + 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TempleTeamPaymentsFactory", + "source_mapping": { + "start": 279, + "length": 4653, + "filename_relative": "contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_short": "contracts/admin/TempleTeamPaymentsFactory.sol", + "is_dependency": false, + "lines": [ + 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, + 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, + 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, + 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "directPayouts(IERC20,address[],uint256[])" + } + } + }, + "additional_fields": { + "underlying_type": "variables_written", + "variable_name": "lastPaidEpoch" + } + }, + { + "type": "node", + "name": "data = FundingData({paymentContract:address(_paymentContract),totalFunding:_totalFunding,epoch:lastPaidEpoch ++})", + "source_mapping": { + "start": 1542, + "length": 182, + "filename_relative": "contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_short": "contracts/admin/TempleTeamPaymentsFactory.sol", + "is_dependency": false, + "lines": [50, 51, 52, 53, 54], + "starting_column": 9, + "ending_column": 11 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "incrementEpoch", + "source_mapping": { + "start": 1428, + "length": 347, + "filename_relative": "contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_short": "contracts/admin/TempleTeamPaymentsFactory.sol", + "is_dependency": false, + "lines": [46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TempleTeamPaymentsFactory", + "source_mapping": { + "start": 279, + "length": 4653, + "filename_relative": "contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/admin/TempleTeamPaymentsFactory.sol", + "filename_short": "contracts/admin/TempleTeamPaymentsFactory.sol", + "is_dependency": false, + "lines": [ + 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, + 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, + 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, + 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "incrementEpoch(address,uint256)" + } + } + }, + "additional_fields": { + "underlying_type": "variables_written", + "variable_name": "lastPaidEpoch" + } + } + ], + "description": "Reentrancy in TempleTeamPaymentsFactory.directPayouts(IERC20,address[],uint256[]) (contracts/admin/TempleTeamPaymentsFactory.sol#119-143):\n\tExternal calls:\n\t- SafeERC20.safeTransferFrom(_token,msg.sender,dest,value) (contracts/admin/TempleTeamPaymentsFactory.sol#133)\n\tState variables written after the call(s):\n\t- incrementEpoch(address(this),totalFunding) (contracts/admin/TempleTeamPaymentsFactory.sol#140)\n\t\t- epochsFunded[lastPaidEpoch] = data (contracts/admin/TempleTeamPaymentsFactory.sol#55)\n\t- incrementEpoch(address(this),totalFunding) (contracts/admin/TempleTeamPaymentsFactory.sol#140)\n\t\t- data = FundingData({paymentContract:address(_paymentContract),totalFunding:_totalFunding,epoch:lastPaidEpoch ++}) (contracts/admin/TempleTeamPaymentsFactory.sol#50-54)\n", + "markdown": "Reentrancy in [TempleTeamPaymentsFactory.directPayouts(IERC20,address[],uint256[])](contracts/admin/TempleTeamPaymentsFactory.sol#L119-L143):\n\tExternal calls:\n\t- [SafeERC20.safeTransferFrom(_token,msg.sender,dest,value)](contracts/admin/TempleTeamPaymentsFactory.sol#L133)\n\tState variables written after the call(s):\n\t- [incrementEpoch(address(this),totalFunding)](contracts/admin/TempleTeamPaymentsFactory.sol#L140)\n\t\t- [epochsFunded[lastPaidEpoch] = data](contracts/admin/TempleTeamPaymentsFactory.sol#L55)\n\t- [incrementEpoch(address(this),totalFunding)](contracts/admin/TempleTeamPaymentsFactory.sol#L140)\n\t\t- [data = FundingData({paymentContract:address(_paymentContract),totalFunding:_totalFunding,epoch:lastPaidEpoch ++})](contracts/admin/TempleTeamPaymentsFactory.sol#L50-L54)\n", + "first_markdown_element": "contracts/admin/TempleTeamPaymentsFactory.sol#L119-L143", + "id": "e7d7cc7383e1682a576694bbc276f3a8cb1f5f6783434f8f5336ea3b0d9bf554", + "check": "reentrancy-benign", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "_burnDToken", + "source_mapping": { + "start": 29999, + "length": 1179, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [ + 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, + 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, + 703, 704, 705, 706, 707, 708, 709 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TreasuryReservesVault", + "source_mapping": { + "start": 2150, + "length": 32023, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [ + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, + 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, + 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, + 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, + 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, + 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, + 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, + 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, + 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, + 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, + 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, + 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, + 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, + 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, + 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, + 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, + 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, + 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, + 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, + 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, + 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, + 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, + 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, + 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, + 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, + 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, + 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, + 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, + 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, + 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, + 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, + 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, + 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, + 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, + 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, + 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, + 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, + 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, + 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, + 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, + 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, + 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, + 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, + 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, + 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, + 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, + 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, + 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, + 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, + 771, 772, 773, 774, 775, 776, 777, 778, 779 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "_burnDToken(address,ITreasuryReservesVault.StrategyConfig,IERC20,ITreasuryReservesVault.BorrowTokenConfig,uint256,uint256)" + } + }, + { + "type": "node", + "name": "_burnedAmount = tokenConfig.dToken.burn(strategy,toBurnAmount)", + "source_mapping": { + "start": 30398, + "length": 71, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [688], + "starting_column": 9, + "ending_column": 80 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "_burnDToken", + "source_mapping": { + "start": 29999, + "length": 1179, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [ + 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, + 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, + 703, 704, 705, 706, 707, 708, 709 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TreasuryReservesVault", + "source_mapping": { + "start": 2150, + "length": 32023, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [ + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, + 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, + 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, + 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, + 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, + 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, + 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, + 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, + 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, + 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, + 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, + 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, + 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, + 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, + 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, + 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, + 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, + 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, + 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, + 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, + 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, + 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, + 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, + 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, + 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, + 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, + 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, + 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, + 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, + 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, + 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, + 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, + 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, + 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, + 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, + 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, + 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, + 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, + 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, + 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, + 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, + 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, + 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, + 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, + 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, + 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, + 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, + 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, + 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, + 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, + 777, 778, 779 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "_burnDToken(address,ITreasuryReservesVault.StrategyConfig,IERC20,ITreasuryReservesVault.BorrowTokenConfig,uint256,uint256)" + } + } + }, + "additional_fields": { "underlying_type": "external_calls" } + }, + { + "type": "node", + "name": "StrategyCreditAndDebtBalance(strategy,address(token),_creditBalance,dTokenBalance)", + "source_mapping": { + "start": 31081, + "length": 90, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [708], + "starting_column": 9, + "ending_column": 99 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "_burnDToken", + "source_mapping": { + "start": 29999, + "length": 1179, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [ + 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, + 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, + 703, 704, 705, 706, 707, 708, 709 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TreasuryReservesVault", + "source_mapping": { + "start": 2150, + "length": 32023, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [ + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, + 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, + 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, + 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, + 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, + 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, + 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, + 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, + 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, + 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, + 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, + 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, + 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, + 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, + 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, + 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, + 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, + 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, + 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, + 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, + 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, + 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, + 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, + 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, + 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, + 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, + 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, + 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, + 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, + 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, + 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, + 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, + 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, + 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, + 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, + 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, + 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, + 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, + 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, + 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, + 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, + 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, + 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, + 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, + 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, + 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, + 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, + 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, + 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, + 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, + 777, 778, 779 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "_burnDToken(address,ITreasuryReservesVault.StrategyConfig,IERC20,ITreasuryReservesVault.BorrowTokenConfig,uint256,uint256)" + } + } + }, + "additional_fields": { "underlying_type": "event" } + } + ], + "description": "Reentrancy in TreasuryReservesVault._burnDToken(address,ITreasuryReservesVault.StrategyConfig,IERC20,ITreasuryReservesVault.BorrowTokenConfig,uint256,uint256) (contracts/v2/TreasuryReservesVault.sol#677-709):\n\tExternal calls:\n\t- _burnedAmount = tokenConfig.dToken.burn(strategy,toBurnAmount) (contracts/v2/TreasuryReservesVault.sol#688)\n\tEvent emitted after the call(s):\n\t- StrategyCreditAndDebtBalance(strategy,address(token),_creditBalance,dTokenBalance) (contracts/v2/TreasuryReservesVault.sol#708)\n", + "markdown": "Reentrancy in [TreasuryReservesVault._burnDToken(address,ITreasuryReservesVault.StrategyConfig,IERC20,ITreasuryReservesVault.BorrowTokenConfig,uint256,uint256)](contracts/v2/TreasuryReservesVault.sol#L677-L709):\n\tExternal calls:\n\t- [_burnedAmount = tokenConfig.dToken.burn(strategy,toBurnAmount)](contracts/v2/TreasuryReservesVault.sol#L688)\n\tEvent emitted after the call(s):\n\t- [StrategyCreditAndDebtBalance(strategy,address(token),_creditBalance,dTokenBalance)](contracts/v2/TreasuryReservesVault.sol#L708)\n", + "first_markdown_element": "contracts/v2/TreasuryReservesVault.sol#L677-L709", + "id": "39b30f51cb8e0f3bb137afd7388e494f2a117088a846eb999e1fe7c8a4337328", + "check": "reentrancy-events", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "_doShutdown", + "source_mapping": { + "start": 12280, + "length": 502, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "DsrBaseStrategy", + "source_mapping": { + "start": 1041, + "length": 11744, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [ + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, + 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, + 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, + 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, + 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, + 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, + 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, + 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, + 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, + 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, + 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, + 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "_doShutdown(bytes)" + } + }, + { + "type": "node", + "name": "(daiAvailable,sharesAvailable) = _checkpointDaiBalance()", + "source_mapping": { + "start": 12387, + "length": 74, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [295], + "starting_column": 9, + "ending_column": 83 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "_doShutdown", + "source_mapping": { + "start": 12280, + "length": 502, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "DsrBaseStrategy", + "source_mapping": { + "start": 1041, + "length": 11744, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [ + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, + 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, 305, 306 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "_doShutdown(bytes)" + } + } + }, + "additional_fields": { "underlying_type": "external_calls" } + }, + { + "type": "node", + "name": "chi = pot.drip()", + "source_mapping": { + "start": 5566, + "length": 60, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [142], + "starting_column": 9, + "ending_column": 69 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "_checkpointChi", + "source_mapping": { + "start": 5445, + "length": 188, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [140, 141, 142, 143], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "DsrBaseStrategy", + "source_mapping": { + "start": 1041, + "length": 11744, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [ + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, + 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, 305, 306 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "_checkpointChi()" + } + } + }, + "additional_fields": { "underlying_type": "external_calls_sending_eth" } + }, + { + "type": "node", + "name": "_dsrWithdrawal(sharesAvailable,daiAvailable)", + "source_mapping": { + "start": 12471, + "length": 45, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [296], + "starting_column": 9, + "ending_column": 54 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "_doShutdown", + "source_mapping": { + "start": 12280, + "length": 502, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "DsrBaseStrategy", + "source_mapping": { + "start": 1041, + "length": 11744, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [ + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, + 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, 305, 306 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "_doShutdown(bytes)" + } + } + }, + "additional_fields": { "underlying_type": "external_calls" } + }, + { + "type": "node", + "name": "pot.exit(sharesAmount)", + "source_mapping": { + "start": 11597, + "length": 22, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [279], + "starting_column": 9, + "ending_column": 31 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "_dsrWithdrawal", + "source_mapping": { + "start": 11513, + "length": 199, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [278, 279, 280, 281, 282], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "DsrBaseStrategy", + "source_mapping": { + "start": 1041, + "length": 11744, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [ + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, + 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, 305, 306 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "_dsrWithdrawal(uint256,uint256)" + } + } + }, + "additional_fields": { "underlying_type": "external_calls_sending_eth" } + }, + { + "type": "node", + "name": "daiJoin.exit(address(this),daiAmount)", + "source_mapping": { + "start": 11629, + "length": 38, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [280], + "starting_column": 9, + "ending_column": 47 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "_dsrWithdrawal", + "source_mapping": { + "start": 11513, + "length": 199, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [278, 279, 280, 281, 282], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "DsrBaseStrategy", + "source_mapping": { + "start": 1041, + "length": 11744, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [ + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, + 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, 305, 306 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "_dsrWithdrawal(uint256,uint256)" + } + } + }, + "additional_fields": { "underlying_type": "external_calls_sending_eth" } + }, + { + "type": "node", + "name": "DaiWithdrawn(daiAmount)", + "source_mapping": { + "start": 11677, + "length": 28, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [281], + "starting_column": 9, + "ending_column": 37 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "_dsrWithdrawal", + "source_mapping": { + "start": 11513, + "length": 199, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [278, 279, 280, 281, 282], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "DsrBaseStrategy", + "source_mapping": { + "start": 1041, + "length": 11744, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [ + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, + 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, 305, 306 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "_dsrWithdrawal(uint256,uint256)" + } + } + }, + "additional_fields": { "underlying_type": "event" } + }, + { + "type": "node", + "name": "_dsrWithdrawal(sharesAvailable,daiAvailable)", + "source_mapping": { + "start": 12471, + "length": 45, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [296], + "starting_column": 9, + "ending_column": 54 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "_doShutdown", + "source_mapping": { + "start": 12280, + "length": 502, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "DsrBaseStrategy", + "source_mapping": { + "start": 1041, + "length": 11744, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [ + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, + 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, 305, 306 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "_doShutdown(bytes)" + } + } + }, + "additional_fields": { "underlying_type": "event" } + } + ], + "description": "Reentrancy in DsrBaseStrategy._doShutdown(bytes) (contracts/v2/strategies/DsrBaseStrategy.sol#293-303):\n\tExternal calls:\n\t- (daiAvailable,sharesAvailable) = _checkpointDaiBalance() (contracts/v2/strategies/DsrBaseStrategy.sol#295)\n\t\t- chi = pot.drip() (contracts/v2/strategies/DsrBaseStrategy.sol#142)\n\t- _dsrWithdrawal(sharesAvailable,daiAvailable) (contracts/v2/strategies/DsrBaseStrategy.sol#296)\n\t\t- pot.exit(sharesAmount) (contracts/v2/strategies/DsrBaseStrategy.sol#279)\n\t\t- daiJoin.exit(address(this),daiAmount) (contracts/v2/strategies/DsrBaseStrategy.sol#280)\n\tEvent emitted after the call(s):\n\t- DaiWithdrawn(daiAmount) (contracts/v2/strategies/DsrBaseStrategy.sol#281)\n\t\t- _dsrWithdrawal(sharesAvailable,daiAvailable) (contracts/v2/strategies/DsrBaseStrategy.sol#296)\n", + "markdown": "Reentrancy in [DsrBaseStrategy._doShutdown(bytes)](contracts/v2/strategies/DsrBaseStrategy.sol#L293-L303):\n\tExternal calls:\n\t- [(daiAvailable,sharesAvailable) = _checkpointDaiBalance()](contracts/v2/strategies/DsrBaseStrategy.sol#L295)\n\t\t- [chi = pot.drip()](contracts/v2/strategies/DsrBaseStrategy.sol#L142)\n\t- [_dsrWithdrawal(sharesAvailable,daiAvailable)](contracts/v2/strategies/DsrBaseStrategy.sol#L296)\n\t\t- [pot.exit(sharesAmount)](contracts/v2/strategies/DsrBaseStrategy.sol#L279)\n\t\t- [daiJoin.exit(address(this),daiAmount)](contracts/v2/strategies/DsrBaseStrategy.sol#L280)\n\tEvent emitted after the call(s):\n\t- [DaiWithdrawn(daiAmount)](contracts/v2/strategies/DsrBaseStrategy.sol#L281)\n\t\t- [_dsrWithdrawal(sharesAvailable,daiAvailable)](contracts/v2/strategies/DsrBaseStrategy.sol#L296)\n", + "first_markdown_element": "contracts/v2/strategies/DsrBaseStrategy.sol#L293-L303", + "id": "2d01281faf7161866f00d8f2c914cd6f900f84c01032af46a90491363ac26414", + "check": "reentrancy-events", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "_dsrWithdrawal", + "source_mapping": { + "start": 11513, + "length": 199, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [278, 279, 280, 281, 282], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "DsrBaseStrategy", + "source_mapping": { + "start": 1041, + "length": 11744, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [ + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, + 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, + 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, + 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, + 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, + 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, + 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, + 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, + 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, + 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, + 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, + 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "_dsrWithdrawal(uint256,uint256)" + } + }, + { + "type": "node", + "name": "pot.exit(sharesAmount)", + "source_mapping": { + "start": 11597, + "length": 22, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [279], + "starting_column": 9, + "ending_column": 31 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "_dsrWithdrawal", + "source_mapping": { + "start": 11513, + "length": 199, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [278, 279, 280, 281, 282], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "DsrBaseStrategy", + "source_mapping": { + "start": 1041, + "length": 11744, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [ + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, + 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, 305, 306 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "_dsrWithdrawal(uint256,uint256)" + } + } + }, + "additional_fields": { "underlying_type": "external_calls" } + }, + { + "type": "node", + "name": "daiJoin.exit(address(this),daiAmount)", + "source_mapping": { + "start": 11629, + "length": 38, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [280], + "starting_column": 9, + "ending_column": 47 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "_dsrWithdrawal", + "source_mapping": { + "start": 11513, + "length": 199, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [278, 279, 280, 281, 282], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "DsrBaseStrategy", + "source_mapping": { + "start": 1041, + "length": 11744, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [ + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, + 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, 305, 306 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "_dsrWithdrawal(uint256,uint256)" + } + } + }, + "additional_fields": { "underlying_type": "external_calls" } + }, + { + "type": "node", + "name": "DaiWithdrawn(daiAmount)", + "source_mapping": { + "start": 11677, + "length": 28, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [281], + "starting_column": 9, + "ending_column": 37 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "_dsrWithdrawal", + "source_mapping": { + "start": 11513, + "length": 199, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [278, 279, 280, 281, 282], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "DsrBaseStrategy", + "source_mapping": { + "start": 1041, + "length": 11744, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [ + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, + 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, 305, 306 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "_dsrWithdrawal(uint256,uint256)" + } + } + }, + "additional_fields": { "underlying_type": "event" } + } + ], + "description": "Reentrancy in DsrBaseStrategy._dsrWithdrawal(uint256,uint256) (contracts/v2/strategies/DsrBaseStrategy.sol#278-282):\n\tExternal calls:\n\t- pot.exit(sharesAmount) (contracts/v2/strategies/DsrBaseStrategy.sol#279)\n\t- daiJoin.exit(address(this),daiAmount) (contracts/v2/strategies/DsrBaseStrategy.sol#280)\n\tEvent emitted after the call(s):\n\t- DaiWithdrawn(daiAmount) (contracts/v2/strategies/DsrBaseStrategy.sol#281)\n", + "markdown": "Reentrancy in [DsrBaseStrategy._dsrWithdrawal(uint256,uint256)](contracts/v2/strategies/DsrBaseStrategy.sol#L278-L282):\n\tExternal calls:\n\t- [pot.exit(sharesAmount)](contracts/v2/strategies/DsrBaseStrategy.sol#L279)\n\t- [daiJoin.exit(address(this),daiAmount)](contracts/v2/strategies/DsrBaseStrategy.sol#L280)\n\tEvent emitted after the call(s):\n\t- [DaiWithdrawn(daiAmount)](contracts/v2/strategies/DsrBaseStrategy.sol#L281)\n", + "first_markdown_element": "contracts/v2/strategies/DsrBaseStrategy.sol#L278-L282", + "id": "d35e410305415164f2083f99e160a70431f3fb38caf25144473d47103896e96b", + "check": "reentrancy-events", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "_mintDToken", + "source_mapping": { + "start": 28533, + "length": 1205, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [ + 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, + 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, + 664, 665, 666, 667, 668, 669, 670 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TreasuryReservesVault", + "source_mapping": { + "start": 2150, + "length": 32023, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [ + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, + 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, + 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, + 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, + 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, + 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, + 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, + 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, + 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, + 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, + 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, + 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, + 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, + 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, + 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, + 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, + 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, + 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, + 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, + 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, + 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, + 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, + 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, + 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, + 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, + 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, + 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, + 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, + 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, + 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, + 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, + 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, + 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, + 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, + 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, + 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, + 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, + 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, + 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, + 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, + 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, + 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, + 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, + 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, + 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, + 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, + 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, + 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, + 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, + 771, 772, 773, 774, 775, 776, 777, 778, 779 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "_mintDToken(address,IERC20,ITreasuryReservesVault.BorrowTokenConfig,uint256,uint256)" + } + }, + { + "type": "node", + "name": "tokenConfig.dToken.mint(strategy,_newDebt)", + "source_mapping": { + "start": 29294, + "length": 43, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [657], + "starting_column": 13, + "ending_column": 56 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "_mintDToken", + "source_mapping": { + "start": 28533, + "length": 1205, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [ + 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, + 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, + 664, 665, 666, 667, 668, 669, 670 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TreasuryReservesVault", + "source_mapping": { + "start": 2150, + "length": 32023, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [ + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, + 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, + 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, + 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, + 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, + 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, + 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, + 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, + 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, + 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, + 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, + 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, + 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, + 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, + 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, + 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, + 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, + 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, + 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, + 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, + 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, + 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, + 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, + 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, + 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, + 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, + 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, + 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, + 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, + 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, + 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, + 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, + 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, + 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, + 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, + 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, + 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, + 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, + 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, + 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, + 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, + 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, + 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, + 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, + 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, + 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, + 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, + 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, + 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, + 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, + 777, 778, 779 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "_mintDToken(address,IERC20,ITreasuryReservesVault.BorrowTokenConfig,uint256,uint256)" + } + } + }, + "additional_fields": { "underlying_type": "external_calls" } + }, + { + "type": "node", + "name": "StrategyCreditAndDebtBalance(strategy,address(token),_creditBalance,dTokenBalance)", + "source_mapping": { + "start": 29641, + "length": 90, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [669], + "starting_column": 9, + "ending_column": 99 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "_mintDToken", + "source_mapping": { + "start": 28533, + "length": 1205, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [ + 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, + 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, + 664, 665, 666, 667, 668, 669, 670 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TreasuryReservesVault", + "source_mapping": { + "start": 2150, + "length": 32023, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [ + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, + 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, + 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, + 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, + 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, + 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, + 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, + 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, + 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, + 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, + 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, + 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, + 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, + 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, + 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, + 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, + 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, + 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, + 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, + 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, + 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, + 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, + 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, + 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, + 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, + 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, + 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, + 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, + 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, + 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, + 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, + 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, + 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, + 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, + 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, + 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, + 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, + 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, + 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, + 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, + 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, + 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, + 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, + 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, + 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, + 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, + 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, + 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, + 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, + 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, + 777, 778, 779 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "_mintDToken(address,IERC20,ITreasuryReservesVault.BorrowTokenConfig,uint256,uint256)" + } + } + }, + "additional_fields": { "underlying_type": "event" } + } + ], + "description": "Reentrancy in TreasuryReservesVault._mintDToken(address,IERC20,ITreasuryReservesVault.BorrowTokenConfig,uint256,uint256) (contracts/v2/TreasuryReservesVault.sol#638-670):\n\tExternal calls:\n\t- tokenConfig.dToken.mint(strategy,_newDebt) (contracts/v2/TreasuryReservesVault.sol#657)\n\tEvent emitted after the call(s):\n\t- StrategyCreditAndDebtBalance(strategy,address(token),_creditBalance,dTokenBalance) (contracts/v2/TreasuryReservesVault.sol#669)\n", + "markdown": "Reentrancy in [TreasuryReservesVault._mintDToken(address,IERC20,ITreasuryReservesVault.BorrowTokenConfig,uint256,uint256)](contracts/v2/TreasuryReservesVault.sol#L638-L670):\n\tExternal calls:\n\t- [tokenConfig.dToken.mint(strategy,_newDebt)](contracts/v2/TreasuryReservesVault.sol#L657)\n\tEvent emitted after the call(s):\n\t- [StrategyCreditAndDebtBalance(strategy,address(token),_creditBalance,dTokenBalance)](contracts/v2/TreasuryReservesVault.sol#L669)\n", + "first_markdown_element": "contracts/v2/TreasuryReservesVault.sol#L638-L670", + "id": "d06d6a53d0451e137729438d3e1093db6d5e7f0f78494fe8b2a70bd44b393675", + "check": "reentrancy-events", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "_withdrawFromBaseStrategy", + "source_mapping": { + "start": 25804, + "length": 2552, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [ + 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, + 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, + 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, + 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TreasuryReservesVault", + "source_mapping": { + "start": 2150, + "length": 32023, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [ + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, + 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, + 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, + 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, + 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, + 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, + 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, + 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, + 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, + 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, + 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, + 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, + 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, + 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, + 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, + 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, + 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, + 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, + 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, + 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, + 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, + 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, + 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, + 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, + 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, + 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, + 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, + 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, + 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, + 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, + 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, + 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, + 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, + 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, + 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, + 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, + 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, + 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, + 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, + 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, + 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, + 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, + 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, + 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, + 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, + 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, + 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, + 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, + 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, + 771, 772, 773, 774, 775, 776, 777, 778, 779 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "_withdrawFromBaseStrategy(address,IERC20,ITreasuryReservesVault.BorrowTokenConfig,address,uint256)" + } + }, + { + "type": "node", + "name": "_withdrawnAmount = _baseStrategy.trvWithdraw(_withdrawFromBaseStrategyAmount)", + "source_mapping": { + "start": 27290, + "length": 85, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [608], + "starting_column": 17, + "ending_column": 102 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "_withdrawFromBaseStrategy", + "source_mapping": { + "start": 25804, + "length": 2552, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [ + 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, + 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, + 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, + 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TreasuryReservesVault", + "source_mapping": { + "start": 2150, + "length": 32023, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [ + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, + 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, + 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, + 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, + 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, + 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, + 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, + 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, + 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, + 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, + 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, + 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, + 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, + 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, + 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, + 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, + 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, + 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, + 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, + 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, + 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, + 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, + 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, + 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, + 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, + 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, + 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, + 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, + 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, + 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, + 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, + 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, + 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, + 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, + 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, + 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, + 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, + 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, + 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, + 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, + 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, + 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, + 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, + 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, + 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, + 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, + 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, + 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, + 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, + 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, + 777, 778, 779 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "_withdrawFromBaseStrategy(address,IERC20,ITreasuryReservesVault.BorrowTokenConfig,address,uint256)" + } + } + }, + "additional_fields": { "underlying_type": "external_calls" } + }, + { + "type": "node", + "name": "_burnDToken(_baseStrategyAddr,strategies[_baseStrategyAddr],token,tokenConfig,_withdrawnAmount,tokenConfig.dToken.balanceOf(_baseStrategyAddr))", + "source_mapping": { + "start": 27553, + "length": 319, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [614, 615, 616, 617, 618, 619, 620, 621], + "starting_column": 21, + "ending_column": 22 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "_withdrawFromBaseStrategy", + "source_mapping": { + "start": 25804, + "length": 2552, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [ + 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, + 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, + 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, + 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TreasuryReservesVault", + "source_mapping": { + "start": 2150, + "length": 32023, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [ + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, + 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, + 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, + 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, + 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, + 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, + 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, + 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, + 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, + 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, + 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, + 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, + 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, + 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, + 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, + 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, + 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, + 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, + 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, + 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, + 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, + 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, + 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, + 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, + 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, + 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, + 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, + 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, + 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, + 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, + 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, + 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, + 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, + 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, + 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, + 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, + 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, + 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, + 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, + 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, + 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, + 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, + 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, + 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, + 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, + 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, + 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, + 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, + 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, + 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, + 777, 778, 779 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "_withdrawFromBaseStrategy(address,IERC20,ITreasuryReservesVault.BorrowTokenConfig,address,uint256)" + } + } + }, + "additional_fields": { "underlying_type": "external_calls" } + }, + { + "type": "node", + "name": "_burnedAmount = tokenConfig.dToken.burn(strategy,toBurnAmount)", + "source_mapping": { + "start": 30398, + "length": 71, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [688], + "starting_column": 9, + "ending_column": 80 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "_burnDToken", + "source_mapping": { + "start": 29999, + "length": 1179, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [ + 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, + 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, + 703, 704, 705, 706, 707, 708, 709 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TreasuryReservesVault", + "source_mapping": { + "start": 2150, + "length": 32023, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [ + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, + 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, + 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, + 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, + 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, + 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, + 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, + 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, + 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, + 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, + 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, + 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, + 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, + 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, + 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, + 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, + 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, + 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, + 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, + 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, + 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, + 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, + 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, + 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, + 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, + 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, + 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, + 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, + 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, + 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, + 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, + 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, + 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, + 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, + 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, + 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, + 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, + 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, + 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, + 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, + 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, + 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, + 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, + 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, + 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, + 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, + 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, + 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, + 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, + 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, + 777, 778, 779 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "_burnDToken(address,ITreasuryReservesVault.StrategyConfig,IERC20,ITreasuryReservesVault.BorrowTokenConfig,uint256,uint256)" + } + } + }, + "additional_fields": { "underlying_type": "external_calls_sending_eth" } + }, + { + "type": "node", + "name": "StrategyCreditAndDebtBalance(strategy,address(token),_creditBalance,dTokenBalance)", + "source_mapping": { + "start": 31081, + "length": 90, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [708], + "starting_column": 9, + "ending_column": 99 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "_burnDToken", + "source_mapping": { + "start": 29999, + "length": 1179, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [ + 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, + 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, + 703, 704, 705, 706, 707, 708, 709 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TreasuryReservesVault", + "source_mapping": { + "start": 2150, + "length": 32023, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [ + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, + 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, + 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, + 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, + 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, + 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, + 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, + 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, + 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, + 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, + 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, + 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, + 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, + 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, + 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, + 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, + 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, + 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, + 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, + 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, + 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, + 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, + 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, + 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, + 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, + 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, + 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, + 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, + 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, + 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, + 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, + 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, + 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, + 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, + 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, + 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, + 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, + 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, + 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, + 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, + 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, + 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, + 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, + 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, + 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, + 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, + 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, + 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, + 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, + 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, + 777, 778, 779 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "_burnDToken(address,ITreasuryReservesVault.StrategyConfig,IERC20,ITreasuryReservesVault.BorrowTokenConfig,uint256,uint256)" + } + } + }, + "additional_fields": { "underlying_type": "event" } + }, + { + "type": "node", + "name": "_burnDToken(_baseStrategyAddr,strategies[_baseStrategyAddr],token,tokenConfig,_withdrawnAmount,tokenConfig.dToken.balanceOf(_baseStrategyAddr))", + "source_mapping": { + "start": 27553, + "length": 319, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [614, 615, 616, 617, 618, 619, 620, 621], + "starting_column": 21, + "ending_column": 22 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "_withdrawFromBaseStrategy", + "source_mapping": { + "start": 25804, + "length": 2552, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [ + 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, + 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, + 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, + 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TreasuryReservesVault", + "source_mapping": { + "start": 2150, + "length": 32023, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [ + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, + 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, + 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, + 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, + 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, + 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, + 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, + 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, + 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, + 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, + 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, + 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, + 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, + 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, + 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, + 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, + 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, + 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, + 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, + 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, + 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, + 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, + 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, + 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, + 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, + 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, + 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, + 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, + 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, + 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, + 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, + 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, + 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, + 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, + 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, + 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, + 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, + 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, + 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, + 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, + 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, + 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, + 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, + 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, + 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, + 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, + 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, + 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, + 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, + 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, + 777, 778, 779 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "_withdrawFromBaseStrategy(address,IERC20,ITreasuryReservesVault.BorrowTokenConfig,address,uint256)" + } + } + }, + "additional_fields": { "underlying_type": "event" } + } + ], + "description": "Reentrancy in TreasuryReservesVault._withdrawFromBaseStrategy(address,IERC20,ITreasuryReservesVault.BorrowTokenConfig,address,uint256) (contracts/v2/TreasuryReservesVault.sol#582-632):\n\tExternal calls:\n\t- _withdrawnAmount = _baseStrategy.trvWithdraw(_withdrawFromBaseStrategyAmount) (contracts/v2/TreasuryReservesVault.sol#608)\n\t- _burnDToken(_baseStrategyAddr,strategies[_baseStrategyAddr],token,tokenConfig,_withdrawnAmount,tokenConfig.dToken.balanceOf(_baseStrategyAddr)) (contracts/v2/TreasuryReservesVault.sol#614-621)\n\t\t- _burnedAmount = tokenConfig.dToken.burn(strategy,toBurnAmount) (contracts/v2/TreasuryReservesVault.sol#688)\n\tEvent emitted after the call(s):\n\t- StrategyCreditAndDebtBalance(strategy,address(token),_creditBalance,dTokenBalance) (contracts/v2/TreasuryReservesVault.sol#708)\n\t\t- _burnDToken(_baseStrategyAddr,strategies[_baseStrategyAddr],token,tokenConfig,_withdrawnAmount,tokenConfig.dToken.balanceOf(_baseStrategyAddr)) (contracts/v2/TreasuryReservesVault.sol#614-621)\n", + "markdown": "Reentrancy in [TreasuryReservesVault._withdrawFromBaseStrategy(address,IERC20,ITreasuryReservesVault.BorrowTokenConfig,address,uint256)](contracts/v2/TreasuryReservesVault.sol#L582-L632):\n\tExternal calls:\n\t- [_withdrawnAmount = _baseStrategy.trvWithdraw(_withdrawFromBaseStrategyAmount)](contracts/v2/TreasuryReservesVault.sol#L608)\n\t- [_burnDToken(_baseStrategyAddr,strategies[_baseStrategyAddr],token,tokenConfig,_withdrawnAmount,tokenConfig.dToken.balanceOf(_baseStrategyAddr))](contracts/v2/TreasuryReservesVault.sol#L614-L621)\n\t\t- [_burnedAmount = tokenConfig.dToken.burn(strategy,toBurnAmount)](contracts/v2/TreasuryReservesVault.sol#L688)\n\tEvent emitted after the call(s):\n\t- [StrategyCreditAndDebtBalance(strategy,address(token),_creditBalance,dTokenBalance)](contracts/v2/TreasuryReservesVault.sol#L708)\n\t\t- [_burnDToken(_baseStrategyAddr,strategies[_baseStrategyAddr],token,tokenConfig,_withdrawnAmount,tokenConfig.dToken.balanceOf(_baseStrategyAddr))](contracts/v2/TreasuryReservesVault.sol#L614-L621)\n", + "first_markdown_element": "contracts/v2/TreasuryReservesVault.sol#L582-L632", + "id": "89618dfba3ac7d15e5970daa2e83a543e99a75c999d6a13fbdd7a2d009309297", + "check": "reentrancy-events", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "addLiquidity", + "source_mapping": { + "start": 7071, + "length": 365, + "filename_relative": "contracts/v2/strategies/RamosStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/RamosStrategy.sol", + "filename_short": "contracts/v2/strategies/RamosStrategy.sol", + "is_dependency": false, + "lines": [181, 182, 183, 184, 185, 186, 187, 188], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "RamosStrategy", + "source_mapping": { + "start": 1131, + "length": 9320, + "filename_relative": "contracts/v2/strategies/RamosStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/RamosStrategy.sol", + "filename_short": "contracts/v2/strategies/RamosStrategy.sol", + "is_dependency": false, + "lines": [ + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, + 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, + 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, + 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, + 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, + 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, + 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, + 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, + 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, + 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, + 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, + 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, + 257, 258, 259, 260, 261, 262, 263, 264, 265 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "addLiquidity(IBalancerVault.JoinPoolRequest)" + } + }, + { + "type": "node", + "name": "(quoteTokenAmount,protocolTokenAmount,bptTokensStaked) = ramos.addLiquidity(_requestData)", + "source_mapping": { + "start": 7185, + "length": 161, + "filename_relative": "contracts/v2/strategies/RamosStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/RamosStrategy.sol", + "filename_short": "contracts/v2/strategies/RamosStrategy.sol", + "is_dependency": false, + "lines": [182, 183, 184, 185, 186], + "starting_column": 9, + "ending_column": 45 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "addLiquidity", + "source_mapping": { + "start": 7071, + "length": 365, + "filename_relative": "contracts/v2/strategies/RamosStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/RamosStrategy.sol", + "filename_short": "contracts/v2/strategies/RamosStrategy.sol", + "is_dependency": false, + "lines": [181, 182, 183, 184, 185, 186, 187, 188], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "RamosStrategy", + "source_mapping": { + "start": 1131, + "length": 9320, + "filename_relative": "contracts/v2/strategies/RamosStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/RamosStrategy.sol", + "filename_short": "contracts/v2/strategies/RamosStrategy.sol", + "is_dependency": false, + "lines": [ + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, + 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, + 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, + 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, + 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, + 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, + 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, + 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, + 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, + 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, + 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, + 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "addLiquidity(IBalancerVault.JoinPoolRequest)" + } + } + }, + "additional_fields": { "underlying_type": "external_calls" } + }, + { + "type": "node", + "name": "AddLiquidity(quoteTokenAmount,protocolTokenAmount,bptTokensStaked)", + "source_mapping": { + "start": 7356, + "length": 73, + "filename_relative": "contracts/v2/strategies/RamosStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/RamosStrategy.sol", + "filename_short": "contracts/v2/strategies/RamosStrategy.sol", + "is_dependency": false, + "lines": [187], + "starting_column": 9, + "ending_column": 82 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "addLiquidity", + "source_mapping": { + "start": 7071, + "length": 365, + "filename_relative": "contracts/v2/strategies/RamosStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/RamosStrategy.sol", + "filename_short": "contracts/v2/strategies/RamosStrategy.sol", + "is_dependency": false, + "lines": [181, 182, 183, 184, 185, 186, 187, 188], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "RamosStrategy", + "source_mapping": { + "start": 1131, + "length": 9320, + "filename_relative": "contracts/v2/strategies/RamosStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/RamosStrategy.sol", + "filename_short": "contracts/v2/strategies/RamosStrategy.sol", + "is_dependency": false, + "lines": [ + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, + 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, + 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, + 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, + 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, + 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, + 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, + 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, + 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, + 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, + 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, + 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "addLiquidity(IBalancerVault.JoinPoolRequest)" + } + } + }, + "additional_fields": { "underlying_type": "event" } + } + ], + "description": "Reentrancy in RamosStrategy.addLiquidity(IBalancerVault.JoinPoolRequest) (contracts/v2/strategies/RamosStrategy.sol#181-188):\n\tExternal calls:\n\t- (quoteTokenAmount,protocolTokenAmount,bptTokensStaked) = ramos.addLiquidity(_requestData) (contracts/v2/strategies/RamosStrategy.sol#182-186)\n\tEvent emitted after the call(s):\n\t- AddLiquidity(quoteTokenAmount,protocolTokenAmount,bptTokensStaked) (contracts/v2/strategies/RamosStrategy.sol#187)\n", + "markdown": "Reentrancy in [RamosStrategy.addLiquidity(IBalancerVault.JoinPoolRequest)](contracts/v2/strategies/RamosStrategy.sol#L181-L188):\n\tExternal calls:\n\t- [(quoteTokenAmount,protocolTokenAmount,bptTokensStaked) = ramos.addLiquidity(_requestData)](contracts/v2/strategies/RamosStrategy.sol#L182-L186)\n\tEvent emitted after the call(s):\n\t- [AddLiquidity(quoteTokenAmount,protocolTokenAmount,bptTokensStaked)](contracts/v2/strategies/RamosStrategy.sol#L187)\n", + "first_markdown_element": "contracts/v2/strategies/RamosStrategy.sol#L181-L188", + "id": "86c6739a14ef579509f4e0190b6310b585123eb008deed594e5fdc44ec40eefe", + "check": "reentrancy-events", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "borrowAndDeposit", + "source_mapping": { + "start": 7809, + "length": 246, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [195, 196, 197, 198, 199], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "DsrBaseStrategy", + "source_mapping": { + "start": 1041, + "length": 11744, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [ + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, + 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, + 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, + 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, + 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, + 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, + 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, + 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, + 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, + 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, + 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, + 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "borrowAndDeposit(uint256)" + } + }, + { + "type": "node", + "name": "treasuryReservesVault.borrow(daiToken,amount,address(this))", + "source_mapping": { + "start": 7958, + "length": 61, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [197], + "starting_column": 9, + "ending_column": 70 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "borrowAndDeposit", + "source_mapping": { + "start": 7809, + "length": 246, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [195, 196, 197, 198, 199], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "DsrBaseStrategy", + "source_mapping": { + "start": 1041, + "length": 11744, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [ + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, + 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, 305, 306 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "borrowAndDeposit(uint256)" + } + } + }, + "additional_fields": { "underlying_type": "external_calls" } + }, + { + "type": "node", + "name": "_dsrDeposit(amount)", + "source_mapping": { + "start": 8029, + "length": 19, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [198], + "starting_column": 9, + "ending_column": 28 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "borrowAndDeposit", + "source_mapping": { + "start": 7809, + "length": 246, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [195, 196, 197, 198, 199], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "DsrBaseStrategy", + "source_mapping": { + "start": 1041, + "length": 11744, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [ + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, + 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, 305, 306 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "borrowAndDeposit(uint256)" + } + } + }, + "additional_fields": { "underlying_type": "external_calls" } + }, + { + "type": "node", + "name": "daiJoin.join(address(this),amount)", + "source_mapping": { + "start": 8342, + "length": 35, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [207], + "starting_column": 9, + "ending_column": 44 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "_dsrDeposit", + "source_mapping": { + "start": 8061, + "length": 349, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [201, 202, 203, 204, 205, 206, 207, 208, 209], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "DsrBaseStrategy", + "source_mapping": { + "start": 1041, + "length": 11744, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [ + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, + 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, 305, 306 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "_dsrDeposit(uint256)" + } + } + }, + "additional_fields": { "underlying_type": "external_calls_sending_eth" } + }, + { + "type": "node", + "name": "chi = pot.drip()", + "source_mapping": { + "start": 5566, + "length": 60, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [142], + "starting_column": 9, + "ending_column": 69 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "_checkpointChi", + "source_mapping": { + "start": 5445, + "length": 188, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [140, 141, 142, 143], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "DsrBaseStrategy", + "source_mapping": { + "start": 1041, + "length": 11744, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [ + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, + 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, 305, 306 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "_checkpointChi()" + } + } + }, + "additional_fields": { "underlying_type": "external_calls_sending_eth" } + }, + { + "type": "node", + "name": "pot.join(shares)", + "source_mapping": { + "start": 8387, + "length": 16, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [208], + "starting_column": 9, + "ending_column": 25 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "_dsrDeposit", + "source_mapping": { + "start": 8061, + "length": 349, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [201, 202, 203, 204, 205, 206, 207, 208, 209], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "DsrBaseStrategy", + "source_mapping": { + "start": 1041, + "length": 11744, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [ + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, + 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, 305, 306 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "_dsrDeposit(uint256)" + } + } + }, + "additional_fields": { "underlying_type": "external_calls_sending_eth" } + }, + { + "type": "node", + "name": "DaiDeposited(amount)", + "source_mapping": { + "start": 8307, + "length": 25, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [206], + "starting_column": 9, + "ending_column": 34 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "_dsrDeposit", + "source_mapping": { + "start": 8061, + "length": 349, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [201, 202, 203, 204, 205, 206, 207, 208, 209], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "DsrBaseStrategy", + "source_mapping": { + "start": 1041, + "length": 11744, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [ + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, + 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, 305, 306 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "_dsrDeposit(uint256)" + } + } + }, + "additional_fields": { "underlying_type": "event" } + }, + { + "type": "node", + "name": "_dsrDeposit(amount)", + "source_mapping": { + "start": 8029, + "length": 19, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [198], + "starting_column": 9, + "ending_column": 28 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "borrowAndDeposit", + "source_mapping": { + "start": 7809, + "length": 246, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [195, 196, 197, 198, 199], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "DsrBaseStrategy", + "source_mapping": { + "start": 1041, + "length": 11744, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [ + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, + 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, 305, 306 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "borrowAndDeposit(uint256)" + } + } + }, + "additional_fields": { "underlying_type": "event" } + } + ], + "description": "Reentrancy in DsrBaseStrategy.borrowAndDeposit(uint256) (contracts/v2/strategies/DsrBaseStrategy.sol#195-199):\n\tExternal calls:\n\t- treasuryReservesVault.borrow(daiToken,amount,address(this)) (contracts/v2/strategies/DsrBaseStrategy.sol#197)\n\t- _dsrDeposit(amount) (contracts/v2/strategies/DsrBaseStrategy.sol#198)\n\t\t- daiJoin.join(address(this),amount) (contracts/v2/strategies/DsrBaseStrategy.sol#207)\n\t\t- chi = pot.drip() (contracts/v2/strategies/DsrBaseStrategy.sol#142)\n\t\t- pot.join(shares) (contracts/v2/strategies/DsrBaseStrategy.sol#208)\n\tEvent emitted after the call(s):\n\t- DaiDeposited(amount) (contracts/v2/strategies/DsrBaseStrategy.sol#206)\n\t\t- _dsrDeposit(amount) (contracts/v2/strategies/DsrBaseStrategy.sol#198)\n", + "markdown": "Reentrancy in [DsrBaseStrategy.borrowAndDeposit(uint256)](contracts/v2/strategies/DsrBaseStrategy.sol#L195-L199):\n\tExternal calls:\n\t- [treasuryReservesVault.borrow(daiToken,amount,address(this))](contracts/v2/strategies/DsrBaseStrategy.sol#L197)\n\t- [_dsrDeposit(amount)](contracts/v2/strategies/DsrBaseStrategy.sol#L198)\n\t\t- [daiJoin.join(address(this),amount)](contracts/v2/strategies/DsrBaseStrategy.sol#L207)\n\t\t- [chi = pot.drip()](contracts/v2/strategies/DsrBaseStrategy.sol#L142)\n\t\t- [pot.join(shares)](contracts/v2/strategies/DsrBaseStrategy.sol#L208)\n\tEvent emitted after the call(s):\n\t- [DaiDeposited(amount)](contracts/v2/strategies/DsrBaseStrategy.sol#L206)\n\t\t- [_dsrDeposit(amount)](contracts/v2/strategies/DsrBaseStrategy.sol#L198)\n", + "first_markdown_element": "contracts/v2/strategies/DsrBaseStrategy.sol#L195-L199", + "id": "6f150fd09fac2796a24b461a93dcda378e0b73d3d94cc538625af3f9b9d80747", + "check": "reentrancy-events", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "removeLiquidity", + "source_mapping": { + "start": 8140, + "length": 365, + "filename_relative": "contracts/v2/strategies/RamosStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/RamosStrategy.sol", + "filename_short": "contracts/v2/strategies/RamosStrategy.sol", + "is_dependency": false, + "lines": [209, 210, 211, 212, 213, 214, 215], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "RamosStrategy", + "source_mapping": { + "start": 1131, + "length": 9320, + "filename_relative": "contracts/v2/strategies/RamosStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/RamosStrategy.sol", + "filename_short": "contracts/v2/strategies/RamosStrategy.sol", + "is_dependency": false, + "lines": [ + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, + 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, + 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, + 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, + 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, + 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, + 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, + 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, + 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, + 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, + 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, + 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, + 257, 258, 259, 260, 261, 262, 263, 264, 265 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "removeLiquidity(IBalancerVault.ExitPoolRequest,uint256)" + } + }, + { + "type": "node", + "name": "(quoteTokenAmount,protocolTokenAmount) = ramos.removeLiquidity(_requestData,_bptAmount)", + "source_mapping": { + "start": 8277, + "length": 140, + "filename_relative": "contracts/v2/strategies/RamosStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/RamosStrategy.sol", + "filename_short": "contracts/v2/strategies/RamosStrategy.sol", + "is_dependency": false, + "lines": [210, 211, 212, 213], + "starting_column": 9, + "ending_column": 60 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "removeLiquidity", + "source_mapping": { + "start": 8140, + "length": 365, + "filename_relative": "contracts/v2/strategies/RamosStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/RamosStrategy.sol", + "filename_short": "contracts/v2/strategies/RamosStrategy.sol", + "is_dependency": false, + "lines": [209, 210, 211, 212, 213, 214, 215], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "RamosStrategy", + "source_mapping": { + "start": 1131, + "length": 9320, + "filename_relative": "contracts/v2/strategies/RamosStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/RamosStrategy.sol", + "filename_short": "contracts/v2/strategies/RamosStrategy.sol", + "is_dependency": false, + "lines": [ + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, + 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, + 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, + 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, + 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, + 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, + 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, + 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, + 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, + 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, + 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, + 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "removeLiquidity(IBalancerVault.ExitPoolRequest,uint256)" + } + } + }, + "additional_fields": { "underlying_type": "external_calls" } + }, + { + "type": "node", + "name": "RemoveLiquidity(quoteTokenAmount,protocolTokenAmount,_bptAmount)", + "source_mapping": { + "start": 8427, + "length": 71, + "filename_relative": "contracts/v2/strategies/RamosStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/RamosStrategy.sol", + "filename_short": "contracts/v2/strategies/RamosStrategy.sol", + "is_dependency": false, + "lines": [214], + "starting_column": 9, + "ending_column": 80 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "removeLiquidity", + "source_mapping": { + "start": 8140, + "length": 365, + "filename_relative": "contracts/v2/strategies/RamosStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/RamosStrategy.sol", + "filename_short": "contracts/v2/strategies/RamosStrategy.sol", + "is_dependency": false, + "lines": [209, 210, 211, 212, 213, 214, 215], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "RamosStrategy", + "source_mapping": { + "start": 1131, + "length": 9320, + "filename_relative": "contracts/v2/strategies/RamosStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/RamosStrategy.sol", + "filename_short": "contracts/v2/strategies/RamosStrategy.sol", + "is_dependency": false, + "lines": [ + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, + 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, + 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, + 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, + 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, + 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, + 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, + 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, + 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, + 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, + 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, + 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "removeLiquidity(IBalancerVault.ExitPoolRequest,uint256)" + } + } + }, + "additional_fields": { "underlying_type": "event" } + } + ], + "description": "Reentrancy in RamosStrategy.removeLiquidity(IBalancerVault.ExitPoolRequest,uint256) (contracts/v2/strategies/RamosStrategy.sol#209-215):\n\tExternal calls:\n\t- (quoteTokenAmount,protocolTokenAmount) = ramos.removeLiquidity(_requestData,_bptAmount) (contracts/v2/strategies/RamosStrategy.sol#210-213)\n\tEvent emitted after the call(s):\n\t- RemoveLiquidity(quoteTokenAmount,protocolTokenAmount,_bptAmount) (contracts/v2/strategies/RamosStrategy.sol#214)\n", + "markdown": "Reentrancy in [RamosStrategy.removeLiquidity(IBalancerVault.ExitPoolRequest,uint256)](contracts/v2/strategies/RamosStrategy.sol#L209-L215):\n\tExternal calls:\n\t- [(quoteTokenAmount,protocolTokenAmount) = ramos.removeLiquidity(_requestData,_bptAmount)](contracts/v2/strategies/RamosStrategy.sol#L210-L213)\n\tEvent emitted after the call(s):\n\t- [RemoveLiquidity(quoteTokenAmount,protocolTokenAmount,_bptAmount)](contracts/v2/strategies/RamosStrategy.sol#L214)\n", + "first_markdown_element": "contracts/v2/strategies/RamosStrategy.sol#L209-L215", + "id": "7c31093def50156c36e632afd1bdd7b3c7f967dee0aff539f837b6a8448615ae", + "check": "reentrancy-events", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "setTlcStrategy", + "source_mapping": { + "start": 15688, + "length": 875, + "filename_relative": "contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol", + "filename_short": "contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol", + "is_dependency": false, + "lines": [ + 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, + 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TempleLineOfCredit", + "source_mapping": { + "start": 1433, + "length": 31753, + "filename_relative": "contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol", + "filename_short": "contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol", + "is_dependency": false, + "lines": [ + 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, + 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, + 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, + 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, + 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, + 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, + 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, + 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, + 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, + 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, + 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, + 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, + 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, + 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, + 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, + 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, + 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, + 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, + 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, + 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, + 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, + 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, + 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, + 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, + 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, + 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, + 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, + 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, + 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, + 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, + 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, + 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, + 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, + 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, + 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, + 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, + 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, + 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, + 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, + 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, + 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, + 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, + 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, + 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, + 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, + 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, + 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, + 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, + 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, + 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, + 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, + 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, + 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, + 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, + 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, + 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, + 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, + 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 860, + 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, 871, 872, 873, + 874, 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, 885 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "setTlcStrategy(address)" + } + }, + { + "type": "node", + "name": "daiToken.safeApprove(previousTrv,0)", + "source_mapping": { + "start": 16002, + "length": 36, + "filename_relative": "contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol", + "filename_short": "contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol", + "is_dependency": false, + "lines": [394], + "starting_column": 13, + "ending_column": 49 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "setTlcStrategy", + "source_mapping": { + "start": 15688, + "length": 875, + "filename_relative": "contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol", + "filename_short": "contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol", + "is_dependency": false, + "lines": [ + 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, + 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TempleLineOfCredit", + "source_mapping": { + "start": 1433, + "length": 31753, + "filename_relative": "contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol", + "filename_short": "contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol", + "is_dependency": false, + "lines": [ + 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, + 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, + 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, + 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, + 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, + 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, + 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, + 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, + 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, + 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, + 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, + 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, + 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, + 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, + 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, + 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, + 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, + 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, + 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, + 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, + 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, + 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, + 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, + 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, + 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, + 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, + 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, + 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, + 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, + 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, + 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, + 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, + 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, + 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, + 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, + 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, + 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, + 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, + 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, + 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, + 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, + 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, + 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, + 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, + 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, + 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, + 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, + 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, + 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, + 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, + 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, + 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, + 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, + 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, + 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, + 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, + 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, + 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, + 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, + 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, + 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, + 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, + 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, + 871, 872, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, + 883, 884, 885 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "setTlcStrategy(address)" + } + } + }, + "additional_fields": { "underlying_type": "external_calls" } + }, + { + "type": "node", + "name": "daiToken.safeApprove(_trv,0)", + "source_mapping": { + "start": 16249, + "length": 29, + "filename_relative": "contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol", + "filename_short": "contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol", + "is_dependency": false, + "lines": [402], + "starting_column": 13, + "ending_column": 42 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "setTlcStrategy", + "source_mapping": { + "start": 15688, + "length": 875, + "filename_relative": "contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol", + "filename_short": "contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol", + "is_dependency": false, + "lines": [ + 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, + 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TempleLineOfCredit", + "source_mapping": { + "start": 1433, + "length": 31753, + "filename_relative": "contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol", + "filename_short": "contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol", + "is_dependency": false, + "lines": [ + 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, + 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, + 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, + 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, + 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, + 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, + 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, + 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, + 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, + 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, + 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, + 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, + 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, + 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, + 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, + 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, + 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, + 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, + 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, + 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, + 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, + 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, + 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, + 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, + 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, + 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, + 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, + 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, + 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, + 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, + 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, + 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, + 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, + 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, + 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, + 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, + 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, + 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, + 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, + 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, + 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, + 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, + 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, + 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, + 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, + 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, + 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, + 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, + 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, + 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, + 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, + 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, + 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, + 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, + 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, + 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, + 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, + 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, + 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, + 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, + 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, + 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, + 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, + 871, 872, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, + 883, 884, 885 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "setTlcStrategy(address)" + } + } + }, + "additional_fields": { "underlying_type": "external_calls" } + }, + { + "type": "node", + "name": "daiToken.safeIncreaseAllowance(_trv,type()(uint256).max)", + "source_mapping": { + "start": 16292, + "length": 55, + "filename_relative": "contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol", + "filename_short": "contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol", + "is_dependency": false, + "lines": [403], + "starting_column": 13, + "ending_column": 68 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "setTlcStrategy", + "source_mapping": { + "start": 15688, + "length": 875, + "filename_relative": "contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol", + "filename_short": "contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol", + "is_dependency": false, + "lines": [ + 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, + 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TempleLineOfCredit", + "source_mapping": { + "start": 1433, + "length": 31753, + "filename_relative": "contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol", + "filename_short": "contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol", + "is_dependency": false, + "lines": [ + 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, + 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, + 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, + 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, + 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, + 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, + 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, + 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, + 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, + 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, + 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, + 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, + 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, + 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, + 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, + 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, + 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, + 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, + 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, + 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, + 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, + 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, + 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, + 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, + 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, + 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, + 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, + 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, + 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, + 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, + 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, + 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, + 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, + 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, + 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, + 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, + 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, + 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, + 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, + 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, + 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, + 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, + 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, + 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, + 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, + 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, + 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, + 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, + 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, + 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, + 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, + 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, + 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, + 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, + 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, + 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, + 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, + 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, + 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, + 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, + 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, + 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, + 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, + 871, 872, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, + 883, 884, 885 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "setTlcStrategy(address)" + } + } + }, + "additional_fields": { "underlying_type": "external_calls" } + }, + { + "type": "node", + "name": "TlcStrategySet(newTlcStrategy,_trv)", + "source_mapping": { + "start": 16368, + "length": 41, + "filename_relative": "contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol", + "filename_short": "contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol", + "is_dependency": false, + "lines": [406], + "starting_column": 9, + "ending_column": 50 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "setTlcStrategy", + "source_mapping": { + "start": 15688, + "length": 875, + "filename_relative": "contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol", + "filename_short": "contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol", + "is_dependency": false, + "lines": [ + 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, + 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TempleLineOfCredit", + "source_mapping": { + "start": 1433, + "length": 31753, + "filename_relative": "contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol", + "filename_short": "contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol", + "is_dependency": false, + "lines": [ + 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, + 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, + 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, + 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, + 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, + 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, + 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, + 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, + 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, + 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, + 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, + 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, + 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, + 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, + 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, + 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, + 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, + 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, + 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, + 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, + 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, + 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, + 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, + 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, + 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, + 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, + 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, + 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, + 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, + 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, + 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, + 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, + 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, + 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, + 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, + 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, + 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, + 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, + 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, + 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, + 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, + 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, + 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, + 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, + 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, + 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, + 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, + 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, + 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, + 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, + 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, + 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, + 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, + 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, + 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, + 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, + 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, + 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, + 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, + 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, + 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, + 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, + 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, + 871, 872, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, + 883, 884, 885 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "setTlcStrategy(address)" + } + } + }, + "additional_fields": { "underlying_type": "event" } + } + ], + "description": "Reentrancy in TempleLineOfCredit.setTlcStrategy(address) (contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol#386-410):\n\tExternal calls:\n\t- daiToken.safeApprove(previousTrv,0) (contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol#394)\n\t- daiToken.safeApprove(_trv,0) (contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol#402)\n\t- daiToken.safeIncreaseAllowance(_trv,type()(uint256).max) (contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol#403)\n\tEvent emitted after the call(s):\n\t- TlcStrategySet(newTlcStrategy,_trv) (contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol#406)\n", + "markdown": "Reentrancy in [TempleLineOfCredit.setTlcStrategy(address)](contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol#L386-L410):\n\tExternal calls:\n\t- [daiToken.safeApprove(previousTrv,0)](contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol#L394)\n\t- [daiToken.safeApprove(_trv,0)](contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol#L402)\n\t- [daiToken.safeIncreaseAllowance(_trv,type()(uint256).max)](contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol#L403)\n\tEvent emitted after the call(s):\n\t- [TlcStrategySet(newTlcStrategy,_trv)](contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol#L406)\n", + "first_markdown_element": "contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol#L386-L410", + "id": "324c860350f8b013fe53e7e16c80f3c65372dc79913460521e82a2cd87c23a45", + "check": "reentrancy-events", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "shutdown", + "source_mapping": { + "start": 11822, + "length": 1632, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [ + 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, + 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, + 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TreasuryReservesVault", + "source_mapping": { + "start": 2150, + "length": 32023, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [ + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, + 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, + 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, + 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, + 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, + 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, + 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, + 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, + 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, + 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, + 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, + 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, + 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, + 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, + 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, + 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, + 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, + 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, + 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, + 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, + 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, + 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, + 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, + 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, + 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, + 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, + 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, + 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, + 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, + 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, + 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, + 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, + 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, + 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, + 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, + 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, + 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, + 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, + 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, + 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, + 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, + 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, + 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, + 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, + 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, + 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, + 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, + 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, + 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, + 771, 772, 773, 774, 775, 776, 777, 778, 779 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "shutdown(address)" + } + }, + { + "type": "node", + "name": "_outstandingDebt = borrowTokens[_token].dToken.burnAll(strategy)", + "source_mapping": { + "start": 12499, + "length": 64, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [296], + "starting_column": 13, + "ending_column": 77 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "shutdown", + "source_mapping": { + "start": 11822, + "length": 1632, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [ + 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, + 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, + 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TreasuryReservesVault", + "source_mapping": { + "start": 2150, + "length": 32023, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [ + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, + 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, + 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, + 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, + 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, + 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, + 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, + 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, + 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, + 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, + 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, + 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, + 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, + 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, + 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, + 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, + 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, + 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, + 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, + 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, + 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, + 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, + 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, + 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, + 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, + 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, + 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, + 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, + 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, + 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, + 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, + 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, + 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, + 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, + 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, + 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, + 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, + 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, + 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, + 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, + 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, + 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, + 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, + 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, + 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, + 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, + 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, + 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, + 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, + 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, + 777, 778, 779 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "shutdown(address)" + } + } + }, + "additional_fields": { "underlying_type": "external_calls" } + }, + { + "type": "node", + "name": "StrategyRemoved(strategy)", + "source_mapping": { + "start": 13162, + "length": 30, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [312], + "starting_column": 9, + "ending_column": 39 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "shutdown", + "source_mapping": { + "start": 11822, + "length": 1632, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [ + 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, + 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, + 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TreasuryReservesVault", + "source_mapping": { + "start": 2150, + "length": 32023, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [ + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, + 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, + 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, + 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, + 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, + 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, + 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, + 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, + 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, + 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, + 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, + 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, + 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, + 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, + 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, + 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, + 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, + 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, + 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, + 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, + 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, + 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, + 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, + 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, + 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, + 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, + 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, + 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, + 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, + 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, + 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, + 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, + 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, + 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, + 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, + 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, + 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, + 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, + 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, + 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, + 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, + 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, + 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, + 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, + 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, + 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, + 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, + 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, + 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, + 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, + 777, 778, 779 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "shutdown(address)" + } + } + }, + "additional_fields": { "underlying_type": "event" } + }, + { + "type": "node", + "name": "StrategyShutdownCreditAndDebt({strategy:strategy,token:address(_token),outstandingCredit:credits[_token],outstandingDebt:_outstandingDebt})", + "source_mapping": { + "start": 12577, + "length": 231, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [297, 298, 299, 300, 301, 302], + "starting_column": 13, + "ending_column": 15 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "shutdown", + "source_mapping": { + "start": 11822, + "length": 1632, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [ + 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, + 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, + 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TreasuryReservesVault", + "source_mapping": { + "start": 2150, + "length": 32023, + "filename_relative": "contracts/v2/TreasuryReservesVault.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TreasuryReservesVault.sol", + "filename_short": "contracts/v2/TreasuryReservesVault.sol", + "is_dependency": false, + "lines": [ + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, + 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, + 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, + 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, + 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, + 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, + 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, + 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, + 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, + 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, + 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, + 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, + 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, + 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, + 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, + 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, + 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, + 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, + 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, + 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, + 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, + 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, + 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, + 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, + 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, + 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, + 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, + 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, + 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, + 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, + 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, + 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, + 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, + 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, + 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, + 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, + 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, + 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, + 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, + 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, + 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, + 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, + 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, + 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, + 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, + 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, + 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, + 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, + 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, + 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, + 777, 778, 779 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "shutdown(address)" + } + } + }, + "additional_fields": { "underlying_type": "event" } + } + ], + "description": "Reentrancy in TreasuryReservesVault.shutdown(address) (contracts/v2/TreasuryReservesVault.sol#283-319):\n\tExternal calls:\n\t- _outstandingDebt = borrowTokens[_token].dToken.burnAll(strategy) (contracts/v2/TreasuryReservesVault.sol#296)\n\tEvent emitted after the call(s):\n\t- StrategyRemoved(strategy) (contracts/v2/TreasuryReservesVault.sol#312)\n\t- StrategyShutdownCreditAndDebt({strategy:strategy,token:address(_token),outstandingCredit:credits[_token],outstandingDebt:_outstandingDebt}) (contracts/v2/TreasuryReservesVault.sol#297-302)\n", + "markdown": "Reentrancy in [TreasuryReservesVault.shutdown(address)](contracts/v2/TreasuryReservesVault.sol#L283-L319):\n\tExternal calls:\n\t- [_outstandingDebt = borrowTokens[_token].dToken.burnAll(strategy)](contracts/v2/TreasuryReservesVault.sol#L296)\n\tEvent emitted after the call(s):\n\t- [StrategyRemoved(strategy)](contracts/v2/TreasuryReservesVault.sol#L312)\n\t- [StrategyShutdownCreditAndDebt({strategy:strategy,token:address(_token),outstandingCredit:credits[_token],outstandingDebt:_outstandingDebt})](contracts/v2/TreasuryReservesVault.sol#L297-L302)\n", + "first_markdown_element": "contracts/v2/TreasuryReservesVault.sol#L283-L319", + "id": "3770a3cd34d6db65975f14acb9170e3663edac9809964808500e613a8be2344e", + "check": "reentrancy-events", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "trvWithdraw", + "source_mapping": { + "start": 10560, + "length": 947, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [ + 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, + 270, 271, 272, 273, 274, 275, 276 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "DsrBaseStrategy", + "source_mapping": { + "start": 1041, + "length": 11744, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [ + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, + 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, + 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, + 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, + 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, + 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, + 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, + 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, + 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, + 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, + 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, + 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "trvWithdraw(uint256)" + } + }, + { + "type": "node", + "name": "(daiAvailable,chi,sharesAvailable) = _checkpointDaiBalance()", + "source_mapping": { + "start": 11010, + "length": 86, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [264], + "starting_column": 9, + "ending_column": 95 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "trvWithdraw", + "source_mapping": { + "start": 10560, + "length": 947, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [ + 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, + 270, 271, 272, 273, 274, 275, 276 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "DsrBaseStrategy", + "source_mapping": { + "start": 1041, + "length": 11744, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [ + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, + 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, 305, 306 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "trvWithdraw(uint256)" + } + } + }, + "additional_fields": { "underlying_type": "external_calls" } + }, + { + "type": "node", + "name": "chi = pot.drip()", + "source_mapping": { + "start": 5566, + "length": 60, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [142], + "starting_column": 9, + "ending_column": 69 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "_checkpointChi", + "source_mapping": { + "start": 5445, + "length": 188, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [140, 141, 142, 143], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "DsrBaseStrategy", + "source_mapping": { + "start": 1041, + "length": 11744, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [ + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, + 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, 305, 306 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "_checkpointChi()" + } + } + }, + "additional_fields": { "underlying_type": "external_calls_sending_eth" } + }, + { + "type": "node", + "name": "_dsrWithdrawal(sharesAmount,requestedAmount)", + "source_mapping": { + "start": 11365, + "length": 45, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [273], + "starting_column": 9, + "ending_column": 54 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "trvWithdraw", + "source_mapping": { + "start": 10560, + "length": 947, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [ + 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, + 270, 271, 272, 273, 274, 275, 276 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "DsrBaseStrategy", + "source_mapping": { + "start": 1041, + "length": 11744, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [ + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, + 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, 305, 306 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "trvWithdraw(uint256)" + } + } + }, + "additional_fields": { "underlying_type": "external_calls" } + }, + { + "type": "node", + "name": "pot.exit(sharesAmount)", + "source_mapping": { + "start": 11597, + "length": 22, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [279], + "starting_column": 9, + "ending_column": 31 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "_dsrWithdrawal", + "source_mapping": { + "start": 11513, + "length": 199, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [278, 279, 280, 281, 282], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "DsrBaseStrategy", + "source_mapping": { + "start": 1041, + "length": 11744, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [ + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, + 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, 305, 306 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "_dsrWithdrawal(uint256,uint256)" + } + } + }, + "additional_fields": { "underlying_type": "external_calls_sending_eth" } + }, + { + "type": "node", + "name": "daiJoin.exit(address(this),daiAmount)", + "source_mapping": { + "start": 11629, + "length": 38, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [280], + "starting_column": 9, + "ending_column": 47 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "_dsrWithdrawal", + "source_mapping": { + "start": 11513, + "length": 199, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [278, 279, 280, 281, 282], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "DsrBaseStrategy", + "source_mapping": { + "start": 1041, + "length": 11744, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [ + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, + 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, 305, 306 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "_dsrWithdrawal(uint256,uint256)" + } + } + }, + "additional_fields": { "underlying_type": "external_calls_sending_eth" } + }, + { + "type": "node", + "name": "DaiWithdrawn(daiAmount)", + "source_mapping": { + "start": 11677, + "length": 28, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [281], + "starting_column": 9, + "ending_column": 37 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "_dsrWithdrawal", + "source_mapping": { + "start": 11513, + "length": 199, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [278, 279, 280, 281, 282], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "DsrBaseStrategy", + "source_mapping": { + "start": 1041, + "length": 11744, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [ + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, + 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, 305, 306 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "_dsrWithdrawal(uint256,uint256)" + } + } + }, + "additional_fields": { "underlying_type": "event" } + }, + { + "type": "node", + "name": "_dsrWithdrawal(sharesAmount,requestedAmount)", + "source_mapping": { + "start": 11365, + "length": 45, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [273], + "starting_column": 9, + "ending_column": 54 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "trvWithdraw", + "source_mapping": { + "start": 10560, + "length": 947, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [ + 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, + 270, 271, 272, 273, 274, 275, 276 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "DsrBaseStrategy", + "source_mapping": { + "start": 1041, + "length": 11744, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [ + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, + 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, 305, 306 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "trvWithdraw(uint256)" + } + } + }, + "additional_fields": { "underlying_type": "event" } + } + ], + "description": "Reentrancy in DsrBaseStrategy.trvWithdraw(uint256) (contracts/v2/strategies/DsrBaseStrategy.sol#257-276):\n\tExternal calls:\n\t- (daiAvailable,chi,sharesAvailable) = _checkpointDaiBalance() (contracts/v2/strategies/DsrBaseStrategy.sol#264)\n\t\t- chi = pot.drip() (contracts/v2/strategies/DsrBaseStrategy.sol#142)\n\t- _dsrWithdrawal(sharesAmount,requestedAmount) (contracts/v2/strategies/DsrBaseStrategy.sol#273)\n\t\t- pot.exit(sharesAmount) (contracts/v2/strategies/DsrBaseStrategy.sol#279)\n\t\t- daiJoin.exit(address(this),daiAmount) (contracts/v2/strategies/DsrBaseStrategy.sol#280)\n\tEvent emitted after the call(s):\n\t- DaiWithdrawn(daiAmount) (contracts/v2/strategies/DsrBaseStrategy.sol#281)\n\t\t- _dsrWithdrawal(sharesAmount,requestedAmount) (contracts/v2/strategies/DsrBaseStrategy.sol#273)\n", + "markdown": "Reentrancy in [DsrBaseStrategy.trvWithdraw(uint256)](contracts/v2/strategies/DsrBaseStrategy.sol#L257-L276):\n\tExternal calls:\n\t- [(daiAvailable,chi,sharesAvailable) = _checkpointDaiBalance()](contracts/v2/strategies/DsrBaseStrategy.sol#L264)\n\t\t- [chi = pot.drip()](contracts/v2/strategies/DsrBaseStrategy.sol#L142)\n\t- [_dsrWithdrawal(sharesAmount,requestedAmount)](contracts/v2/strategies/DsrBaseStrategy.sol#L273)\n\t\t- [pot.exit(sharesAmount)](contracts/v2/strategies/DsrBaseStrategy.sol#L279)\n\t\t- [daiJoin.exit(address(this),daiAmount)](contracts/v2/strategies/DsrBaseStrategy.sol#L280)\n\tEvent emitted after the call(s):\n\t- [DaiWithdrawn(daiAmount)](contracts/v2/strategies/DsrBaseStrategy.sol#L281)\n\t\t- [_dsrWithdrawal(sharesAmount,requestedAmount)](contracts/v2/strategies/DsrBaseStrategy.sol#L273)\n", + "first_markdown_element": "contracts/v2/strategies/DsrBaseStrategy.sol#L257-L276", + "id": "0a4c8e86f10e88f7cdc66960b0dd281291f86c22d1d8b92e68909c1d477f23ac", + "check": "reentrancy-events", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "withdrawAndRepay", + "source_mapping": { + "start": 8509, + "length": 786, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [ + 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "DsrBaseStrategy", + "source_mapping": { + "start": 1041, + "length": 11744, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [ + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, + 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, + 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, + 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, + 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, + 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, + 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, + 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, + 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, + 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, + 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, + 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "withdrawAndRepay(uint256)" + } + }, + { + "type": "node", + "name": "(daiAvailable,chi) = _checkpointDaiBalance()", + "source_mapping": { + "start": 8690, + "length": 63, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [217], + "starting_column": 9, + "ending_column": 72 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "withdrawAndRepay", + "source_mapping": { + "start": 8509, + "length": 786, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [ + 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, + 227 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "DsrBaseStrategy", + "source_mapping": { + "start": 1041, + "length": 11744, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [ + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, + 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, 305, 306 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "withdrawAndRepay(uint256)" + } + } + }, + "additional_fields": { "underlying_type": "external_calls" } + }, + { + "type": "node", + "name": "chi = pot.drip()", + "source_mapping": { + "start": 5566, + "length": 60, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [142], + "starting_column": 9, + "ending_column": 69 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "_checkpointChi", + "source_mapping": { + "start": 5445, + "length": 188, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [140, 141, 142, 143], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "DsrBaseStrategy", + "source_mapping": { + "start": 1041, + "length": 11744, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [ + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, + 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, 305, 306 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "_checkpointChi()" + } + } + }, + "additional_fields": { "underlying_type": "external_calls_sending_eth" } + }, + { + "type": "node", + "name": "_dsrWithdrawal(sharesAmount,withdrawalAmount)", + "source_mapping": { + "start": 9025, + "length": 46, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [222], + "starting_column": 9, + "ending_column": 55 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "withdrawAndRepay", + "source_mapping": { + "start": 8509, + "length": 786, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [ + 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, + 227 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "DsrBaseStrategy", + "source_mapping": { + "start": 1041, + "length": 11744, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [ + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, + 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, 305, 306 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "withdrawAndRepay(uint256)" + } + } + }, + "additional_fields": { "underlying_type": "external_calls" } + }, + { + "type": "node", + "name": "pot.exit(sharesAmount)", + "source_mapping": { + "start": 11597, + "length": 22, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [279], + "starting_column": 9, + "ending_column": 31 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "_dsrWithdrawal", + "source_mapping": { + "start": 11513, + "length": 199, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [278, 279, 280, 281, 282], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "DsrBaseStrategy", + "source_mapping": { + "start": 1041, + "length": 11744, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [ + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, + 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, 305, 306 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "_dsrWithdrawal(uint256,uint256)" + } + } + }, + "additional_fields": { "underlying_type": "external_calls_sending_eth" } + }, + { + "type": "node", + "name": "daiJoin.exit(address(this),daiAmount)", + "source_mapping": { + "start": 11629, + "length": 38, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [280], + "starting_column": 9, + "ending_column": 47 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "_dsrWithdrawal", + "source_mapping": { + "start": 11513, + "length": 199, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [278, 279, 280, 281, 282], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "DsrBaseStrategy", + "source_mapping": { + "start": 1041, + "length": 11744, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [ + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, + 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, 305, 306 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "_dsrWithdrawal(uint256,uint256)" + } + } + }, + "additional_fields": { "underlying_type": "external_calls_sending_eth" } + }, + { + "type": "node", + "name": "DaiWithdrawn(daiAmount)", + "source_mapping": { + "start": 11677, + "length": 28, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [281], + "starting_column": 9, + "ending_column": 37 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "_dsrWithdrawal", + "source_mapping": { + "start": 11513, + "length": 199, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [278, 279, 280, 281, 282], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "DsrBaseStrategy", + "source_mapping": { + "start": 1041, + "length": 11744, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [ + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, + 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, 305, 306 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "_dsrWithdrawal(uint256,uint256)" + } + } + }, + "additional_fields": { "underlying_type": "event" } + }, + { + "type": "node", + "name": "_dsrWithdrawal(sharesAmount,withdrawalAmount)", + "source_mapping": { + "start": 9025, + "length": 46, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [222], + "starting_column": 9, + "ending_column": 55 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "withdrawAndRepay", + "source_mapping": { + "start": 8509, + "length": 786, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [ + 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, + 227 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "DsrBaseStrategy", + "source_mapping": { + "start": 1041, + "length": 11744, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [ + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, + 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, 305, 306 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "withdrawAndRepay(uint256)" + } + } + }, + "additional_fields": { "underlying_type": "event" } + } + ], + "description": "Reentrancy in DsrBaseStrategy.withdrawAndRepay(uint256) (contracts/v2/strategies/DsrBaseStrategy.sol#214-227):\n\tExternal calls:\n\t- (daiAvailable,chi) = _checkpointDaiBalance() (contracts/v2/strategies/DsrBaseStrategy.sol#217)\n\t\t- chi = pot.drip() (contracts/v2/strategies/DsrBaseStrategy.sol#142)\n\t- _dsrWithdrawal(sharesAmount,withdrawalAmount) (contracts/v2/strategies/DsrBaseStrategy.sol#222)\n\t\t- pot.exit(sharesAmount) (contracts/v2/strategies/DsrBaseStrategy.sol#279)\n\t\t- daiJoin.exit(address(this),daiAmount) (contracts/v2/strategies/DsrBaseStrategy.sol#280)\n\tEvent emitted after the call(s):\n\t- DaiWithdrawn(daiAmount) (contracts/v2/strategies/DsrBaseStrategy.sol#281)\n\t\t- _dsrWithdrawal(sharesAmount,withdrawalAmount) (contracts/v2/strategies/DsrBaseStrategy.sol#222)\n", + "markdown": "Reentrancy in [DsrBaseStrategy.withdrawAndRepay(uint256)](contracts/v2/strategies/DsrBaseStrategy.sol#L214-L227):\n\tExternal calls:\n\t- [(daiAvailable,chi) = _checkpointDaiBalance()](contracts/v2/strategies/DsrBaseStrategy.sol#L217)\n\t\t- [chi = pot.drip()](contracts/v2/strategies/DsrBaseStrategy.sol#L142)\n\t- [_dsrWithdrawal(sharesAmount,withdrawalAmount)](contracts/v2/strategies/DsrBaseStrategy.sol#L222)\n\t\t- [pot.exit(sharesAmount)](contracts/v2/strategies/DsrBaseStrategy.sol#L279)\n\t\t- [daiJoin.exit(address(this),daiAmount)](contracts/v2/strategies/DsrBaseStrategy.sol#L280)\n\tEvent emitted after the call(s):\n\t- [DaiWithdrawn(daiAmount)](contracts/v2/strategies/DsrBaseStrategy.sol#L281)\n\t\t- [_dsrWithdrawal(sharesAmount,withdrawalAmount)](contracts/v2/strategies/DsrBaseStrategy.sol#L222)\n", + "first_markdown_element": "contracts/v2/strategies/DsrBaseStrategy.sol#L214-L227", + "id": "38cb9f382307934e51255ca3f7d7f51604f44bc46a20af75d7f155182cf9bb95", + "check": "reentrancy-events", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "withdrawAndRepayAll", + "source_mapping": { + "start": 9412, + "length": 465, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [232, 233, 234, 235, 236, 237, 238, 239, 240], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "DsrBaseStrategy", + "source_mapping": { + "start": 1041, + "length": 11744, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [ + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, + 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, + 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, + 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, + 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, + 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, + 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, + 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, + 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, + 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, + 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, + 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "withdrawAndRepayAll()" + } + }, + { + "type": "node", + "name": "(daiAvailable,sharesAvailable) = _checkpointDaiBalance()", + "source_mapping": { + "start": 9499, + "length": 74, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [233], + "starting_column": 9, + "ending_column": 83 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "withdrawAndRepayAll", + "source_mapping": { + "start": 9412, + "length": 465, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [232, 233, 234, 235, 236, 237, 238, 239, 240], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "DsrBaseStrategy", + "source_mapping": { + "start": 1041, + "length": 11744, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [ + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, + 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, 305, 306 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "withdrawAndRepayAll()" + } + } + }, + "additional_fields": { "underlying_type": "external_calls" } + }, + { + "type": "node", + "name": "chi = pot.drip()", + "source_mapping": { + "start": 5566, + "length": 60, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [142], + "starting_column": 9, + "ending_column": 69 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "_checkpointChi", + "source_mapping": { + "start": 5445, + "length": 188, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [140, 141, 142, 143], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "DsrBaseStrategy", + "source_mapping": { + "start": 1041, + "length": 11744, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [ + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, + 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, 305, 306 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "_checkpointChi()" + } + } + }, + "additional_fields": { "underlying_type": "external_calls_sending_eth" } + }, + { + "type": "node", + "name": "_dsrWithdrawal(sharesAvailable,daiAvailable)", + "source_mapping": { + "start": 9583, + "length": 45, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [234], + "starting_column": 9, + "ending_column": 54 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "withdrawAndRepayAll", + "source_mapping": { + "start": 9412, + "length": 465, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [232, 233, 234, 235, 236, 237, 238, 239, 240], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "DsrBaseStrategy", + "source_mapping": { + "start": 1041, + "length": 11744, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [ + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, + 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, 305, 306 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "withdrawAndRepayAll()" + } + } + }, + "additional_fields": { "underlying_type": "external_calls" } + }, + { + "type": "node", + "name": "pot.exit(sharesAmount)", + "source_mapping": { + "start": 11597, + "length": 22, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [279], + "starting_column": 9, + "ending_column": 31 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "_dsrWithdrawal", + "source_mapping": { + "start": 11513, + "length": 199, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [278, 279, 280, 281, 282], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "DsrBaseStrategy", + "source_mapping": { + "start": 1041, + "length": 11744, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [ + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, + 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, 305, 306 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "_dsrWithdrawal(uint256,uint256)" + } + } + }, + "additional_fields": { "underlying_type": "external_calls_sending_eth" } + }, + { + "type": "node", + "name": "daiJoin.exit(address(this),daiAmount)", + "source_mapping": { + "start": 11629, + "length": 38, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [280], + "starting_column": 9, + "ending_column": 47 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "_dsrWithdrawal", + "source_mapping": { + "start": 11513, + "length": 199, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [278, 279, 280, 281, 282], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "DsrBaseStrategy", + "source_mapping": { + "start": 1041, + "length": 11744, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [ + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, + 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, 305, 306 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "_dsrWithdrawal(uint256,uint256)" + } + } + }, + "additional_fields": { "underlying_type": "external_calls_sending_eth" } + }, + { + "type": "node", + "name": "DaiWithdrawn(daiAmount)", + "source_mapping": { + "start": 11677, + "length": 28, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [281], + "starting_column": 9, + "ending_column": 37 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "_dsrWithdrawal", + "source_mapping": { + "start": 11513, + "length": 199, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [278, 279, 280, 281, 282], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "DsrBaseStrategy", + "source_mapping": { + "start": 1041, + "length": 11744, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [ + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, + 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, 305, 306 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "_dsrWithdrawal(uint256,uint256)" + } + } + }, + "additional_fields": { "underlying_type": "event" } + }, + { + "type": "node", + "name": "_dsrWithdrawal(sharesAvailable,daiAvailable)", + "source_mapping": { + "start": 9583, + "length": 45, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [234], + "starting_column": 9, + "ending_column": 54 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "withdrawAndRepayAll", + "source_mapping": { + "start": 9412, + "length": 465, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [232, 233, 234, 235, 236, 237, 238, 239, 240], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "DsrBaseStrategy", + "source_mapping": { + "start": 1041, + "length": 11744, + "filename_relative": "contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/strategies/DsrBaseStrategy.sol", + "filename_short": "contracts/v2/strategies/DsrBaseStrategy.sol", + "is_dependency": false, + "lines": [ + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, + 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, 305, 306 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "withdrawAndRepayAll()" + } + } + }, + "additional_fields": { "underlying_type": "event" } + } + ], + "description": "Reentrancy in DsrBaseStrategy.withdrawAndRepayAll() (contracts/v2/strategies/DsrBaseStrategy.sol#232-240):\n\tExternal calls:\n\t- (daiAvailable,sharesAvailable) = _checkpointDaiBalance() (contracts/v2/strategies/DsrBaseStrategy.sol#233)\n\t\t- chi = pot.drip() (contracts/v2/strategies/DsrBaseStrategy.sol#142)\n\t- _dsrWithdrawal(sharesAvailable,daiAvailable) (contracts/v2/strategies/DsrBaseStrategy.sol#234)\n\t\t- pot.exit(sharesAmount) (contracts/v2/strategies/DsrBaseStrategy.sol#279)\n\t\t- daiJoin.exit(address(this),daiAmount) (contracts/v2/strategies/DsrBaseStrategy.sol#280)\n\tEvent emitted after the call(s):\n\t- DaiWithdrawn(daiAmount) (contracts/v2/strategies/DsrBaseStrategy.sol#281)\n\t\t- _dsrWithdrawal(sharesAvailable,daiAvailable) (contracts/v2/strategies/DsrBaseStrategy.sol#234)\n", + "markdown": "Reentrancy in [DsrBaseStrategy.withdrawAndRepayAll()](contracts/v2/strategies/DsrBaseStrategy.sol#L232-L240):\n\tExternal calls:\n\t- [(daiAvailable,sharesAvailable) = _checkpointDaiBalance()](contracts/v2/strategies/DsrBaseStrategy.sol#L233)\n\t\t- [chi = pot.drip()](contracts/v2/strategies/DsrBaseStrategy.sol#L142)\n\t- [_dsrWithdrawal(sharesAvailable,daiAvailable)](contracts/v2/strategies/DsrBaseStrategy.sol#L234)\n\t\t- [pot.exit(sharesAmount)](contracts/v2/strategies/DsrBaseStrategy.sol#L279)\n\t\t- [daiJoin.exit(address(this),daiAmount)](contracts/v2/strategies/DsrBaseStrategy.sol#L280)\n\tEvent emitted after the call(s):\n\t- [DaiWithdrawn(daiAmount)](contracts/v2/strategies/DsrBaseStrategy.sol#L281)\n\t\t- [_dsrWithdrawal(sharesAvailable,daiAvailable)](contracts/v2/strategies/DsrBaseStrategy.sol#L234)\n", + "first_markdown_element": "contracts/v2/strategies/DsrBaseStrategy.sol#L232-L240", + "id": "4ba8e3c4596e10b0920e312a0648a8fa3ef9456ad23cffc62074dc7f78916f68", + "check": "reentrancy-events", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "_initBaseCache", + "source_mapping": { + "start": 26049, + "length": 748, + "filename_relative": "contracts/v2/TempleDebtToken.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TempleDebtToken.sol", + "filename_short": "contracts/v2/TempleDebtToken.sol", + "is_dependency": false, + "lines": [ + 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, + 610, 611, 612, 613, 614, 615, 616, 617 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TempleDebtToken", + "source_mapping": { + "start": 2202, + "length": 30641, + "filename_relative": "contracts/v2/TempleDebtToken.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TempleDebtToken.sol", + "filename_short": "contracts/v2/TempleDebtToken.sol", + "is_dependency": false, + "lines": [ + 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, + 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, + 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, + 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, + 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, + 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, + 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, + 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, + 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, + 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, + 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, + 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, + 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, + 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, + 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, + 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, + 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, + 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, + 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, + 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, + 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, + 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, + 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, + 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, + 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, + 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, + 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, + 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, + 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, + 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, + 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, + 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, + 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, + 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, + 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, + 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, + 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, + 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, + 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, + 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, + 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, + 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, + 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, + 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, + 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, + 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, + 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, + 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, + 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, + 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, + 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, + 778, 779, 780, 781, 782 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "_initBaseCache(TempleDebtToken.BaseCache)" + } + }, + { + "type": "node", + "name": "_timeElapsed > 0", + "source_mapping": { + "start": 26435, + "length": 16, + "filename_relative": "contracts/v2/TempleDebtToken.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TempleDebtToken.sol", + "filename_short": "contracts/v2/TempleDebtToken.sol", + "is_dependency": false, + "lines": [607], + "starting_column": 13, + "ending_column": 29 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "_initBaseCache", + "source_mapping": { + "start": 26049, + "length": 748, + "filename_relative": "contracts/v2/TempleDebtToken.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TempleDebtToken.sol", + "filename_short": "contracts/v2/TempleDebtToken.sol", + "is_dependency": false, + "lines": [ + 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, + 610, 611, 612, 613, 614, 615, 616, 617 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TempleDebtToken", + "source_mapping": { + "start": 2202, + "length": 30641, + "filename_relative": "contracts/v2/TempleDebtToken.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TempleDebtToken.sol", + "filename_short": "contracts/v2/TempleDebtToken.sol", + "is_dependency": false, + "lines": [ + 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, + 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, + 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, + 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, + 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, + 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, + 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, + 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, + 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, + 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, + 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, + 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, + 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, + 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, + 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, + 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, + 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, + 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, + 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, + 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, + 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, + 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, + 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, + 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, + 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, + 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, + 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, + 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, + 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, + 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, + 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, + 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, + 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, + 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, + 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, + 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, + 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, + 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, + 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, + 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, + 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, + 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, + 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, + 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, + 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, + 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, + 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, + 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, + 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, + 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, + 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, + 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, + 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, + 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, + 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "_initBaseCache(TempleDebtToken.BaseCache)" + } + } + } + } + ], + "description": "TempleDebtToken._initBaseCache(TempleDebtToken.BaseCache) (contracts/v2/TempleDebtToken.sol#597-617) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- _timeElapsed > 0 (contracts/v2/TempleDebtToken.sol#607)\n", + "markdown": "[TempleDebtToken._initBaseCache(TempleDebtToken.BaseCache)](contracts/v2/TempleDebtToken.sol#L597-L617) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- [_timeElapsed > 0](contracts/v2/TempleDebtToken.sol#L607)\n", + "first_markdown_element": "contracts/v2/TempleDebtToken.sol#L597-L617", + "id": "31468fb88b544bfa40953f9c670145ae2d6cc30a857f141027542b78efe5314e", + "check": "timestamp", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "_initDebtorCache", + "source_mapping": { + "start": 28507, + "length": 2281, + "filename_relative": "contracts/v2/TempleDebtToken.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TempleDebtToken.sol", + "filename_short": "contracts/v2/TempleDebtToken.sol", + "is_dependency": false, + "lines": [ + 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, + 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, + 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, + 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, + 724, 725, 726, 727 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TempleDebtToken", + "source_mapping": { + "start": 2202, + "length": 30641, + "filename_relative": "contracts/v2/TempleDebtToken.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TempleDebtToken.sol", + "filename_short": "contracts/v2/TempleDebtToken.sol", + "is_dependency": false, + "lines": [ + 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, + 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, + 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, + 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, + 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, + 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, + 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, + 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, + 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, + 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, + 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, + 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, + 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, + 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, + 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, + 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, + 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, + 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, + 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, + 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, + 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, + 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, + 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, + 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, + 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, + 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, + 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, + 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, + 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, + 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, + 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, + 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, + 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, + 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, + 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, + 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, + 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, + 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, + 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, + 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, + 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, + 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, + 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, + 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, + 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, + 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, + 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, + 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, + 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, + 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, + 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, + 778, 779, 780, 781, 782 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "_initDebtorCache(TempleDebtToken.BaseCache,ITempleDebtToken.Debtor,TempleDebtToken.DebtorCache,bool)" + } + }, + { + "type": "node", + "name": "_timeElapsed > 0", + "source_mapping": { + "start": 29667, + "length": 16, + "filename_relative": "contracts/v2/TempleDebtToken.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TempleDebtToken.sol", + "filename_short": "contracts/v2/TempleDebtToken.sol", + "is_dependency": false, + "lines": [703], + "starting_column": 13, + "ending_column": 29 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "_initDebtorCache", + "source_mapping": { + "start": 28507, + "length": 2281, + "filename_relative": "contracts/v2/TempleDebtToken.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TempleDebtToken.sol", + "filename_short": "contracts/v2/TempleDebtToken.sol", + "is_dependency": false, + "lines": [ + 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, + 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, + 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, + 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, + 724, 725, 726, 727 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TempleDebtToken", + "source_mapping": { + "start": 2202, + "length": 30641, + "filename_relative": "contracts/v2/TempleDebtToken.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/TempleDebtToken.sol", + "filename_short": "contracts/v2/TempleDebtToken.sol", + "is_dependency": false, + "lines": [ + 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, + 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, + 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, + 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, + 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, + 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, + 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, + 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, + 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, + 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, + 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, + 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, + 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, + 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, + 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, + 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, + 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, + 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, + 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, + 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, + 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, + 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, + 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, + 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, + 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, + 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, + 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, + 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, + 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, + 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, + 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, + 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, + 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, + 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, + 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, + 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, + 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, + 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, + 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, + 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, + 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, + 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, + 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, + 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, + 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, + 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, + 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, + 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, + 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, + 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, + 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, + 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, + 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, + 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, + 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "_initDebtorCache(TempleDebtToken.BaseCache,ITempleDebtToken.Debtor,TempleDebtToken.DebtorCache,bool)" + } + } + } + } + ], + "description": "TempleDebtToken._initDebtorCache(TempleDebtToken.BaseCache,ITempleDebtToken.Debtor,TempleDebtToken.DebtorCache,bool) (contracts/v2/TempleDebtToken.sol#672-727) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- _timeElapsed > 0 (contracts/v2/TempleDebtToken.sol#703)\n", + "markdown": "[TempleDebtToken._initDebtorCache(TempleDebtToken.BaseCache,ITempleDebtToken.Debtor,TempleDebtToken.DebtorCache,bool)](contracts/v2/TempleDebtToken.sol#L672-L727) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- [_timeElapsed > 0](contracts/v2/TempleDebtToken.sol#L703)\n", + "first_markdown_element": "contracts/v2/TempleDebtToken.sol#L672-L727", + "id": "a6d589cd4caf5ac6f228dd6218ef29c77e92ed66db618140855c2644b3b2cb10", + "check": "timestamp", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "_initDebtTokenCache", + "source_mapping": { + "start": 24259, + "length": 1450, + "filename_relative": "contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol", + "filename_short": "contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol", + "is_dependency": false, + "lines": [ + 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, + 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, + 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TempleLineOfCredit", + "source_mapping": { + "start": 1433, + "length": 31753, + "filename_relative": "contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol", + "filename_short": "contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol", + "is_dependency": false, + "lines": [ + 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, + 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, + 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, + 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, + 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, + 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, + 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, + 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, + 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, + 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, + 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, + 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, + 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, + 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, + 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, + 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, + 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, + 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, + 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, + 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, + 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, + 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, + 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, + 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, + 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, + 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, + 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, + 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, + 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, + 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, + 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, + 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, + 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, + 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, + 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, + 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, + 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, + 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, + 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, + 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, + 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, + 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, + 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, + 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, + 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, + 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, + 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, + 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, + 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, + 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, + 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, + 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, + 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, + 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, + 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, + 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, + 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, + 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 860, + 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, 871, 872, 873, + 874, 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, 885 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "_initDebtTokenCache(TempleLineOfCredit.DebtTokenCache)" + } + }, + { + "type": "node", + "name": "_timeElapsed > 0", + "source_mapping": { + "start": 25121, + "length": 16, + "filename_relative": "contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol", + "filename_short": "contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol", + "is_dependency": false, + "lines": [641], + "starting_column": 13, + "ending_column": 29 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "_initDebtTokenCache", + "source_mapping": { + "start": 24259, + "length": 1450, + "filename_relative": "contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol", + "filename_short": "contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol", + "is_dependency": false, + "lines": [ + 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, + 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, + 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, + 658 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TempleLineOfCredit", + "source_mapping": { + "start": 1433, + "length": 31753, + "filename_relative": "contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol", + "filename_short": "contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol", + "is_dependency": false, + "lines": [ + 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, + 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, + 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, + 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, + 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, + 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, + 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, + 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, + 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, + 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, + 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, + 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, + 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, + 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, + 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, + 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, + 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, + 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, + 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, + 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, + 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, + 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, + 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, + 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, + 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, + 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, + 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, + 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, + 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, + 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, + 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, + 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, + 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, + 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, + 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, + 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, + 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, + 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, + 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, + 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, + 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, + 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, + 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, + 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, + 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, + 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, + 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, + 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, + 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, + 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, + 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, + 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, + 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, + 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, + 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, + 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, + 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, + 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, + 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, + 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, + 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, + 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, + 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, + 871, 872, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, + 883, 884, 885 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "_initDebtTokenCache(TempleLineOfCredit.DebtTokenCache)" + } + } + } + } + ], + "description": "TempleLineOfCredit._initDebtTokenCache(TempleLineOfCredit.DebtTokenCache) (contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol#619-658) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- _timeElapsed > 0 (contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol#641)\n", + "markdown": "[TempleLineOfCredit._initDebtTokenCache(TempleLineOfCredit.DebtTokenCache)](contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol#L619-L658) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- [_timeElapsed > 0](contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol#L641)\n", + "first_markdown_element": "contracts/v2/templeLineOfCredit/TempleLineOfCredit.sol#L619-L658", + "id": "1d9fb732d9369c4da234795950c435996e1f5d0b0c4fd71e2ad0007ec6f7558b", + "check": "timestamp", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "pragma", + "name": "0.8.19", + "source_mapping": { + "start": 0, + "length": 23, + "filename_relative": "contracts/core/OtcOffer.sol", + "filename_absolute": "/Users/frontier/git/temple-2/protocol/contracts/core/OtcOffer.sol", + "filename_short": "contracts/core/OtcOffer.sol", + "is_dependency": false, + "lines": [1], + "starting_column": 1, + "ending_column": 24 + }, + "type_specific_fields": { "directive": ["solidity", "0.8", ".19"] } + } + ], + "description": "Pragma version0.8.19 (contracts/core/OtcOffer.sol#1) necessitates a version too recent to be trusted. Consider deploying with 0.8.18.\n", + "markdown": "Pragma version[0.8.19](contracts/core/OtcOffer.sol#L1) necessitates a version too recent to be trusted. Consider deploying with 0.8.18.\n", + "first_markdown_element": "contracts/core/OtcOffer.sol#L1", + "id": "2940a3848f7667cc3706f80c2537856ed07e8563cbff86311c852b3f61815e74", + "check": "solc-version", + "impact": "Informational", + "confidence": "High" + }, { "elements": [ { diff --git a/protocol/slither.requirements.txt b/protocol/slither.requirements.txt index 1cdcbdf20..164ba8ade 100644 --- a/protocol/slither.requirements.txt +++ b/protocol/slither.requirements.txt @@ -1,2 +1,2 @@ solc-select==1.0.4 -slither-analyzer==0.9.6 +slither-analyzer==0.10.0 diff --git a/protocol/test/forge/v2/strategies/RamosStrategy.t.sol b/protocol/test/forge/v2/strategies/RamosStrategy.t.sol index ac3b230c0..aa1f08ad3 100644 --- a/protocol/test/forge/v2/strategies/RamosStrategy.t.sol +++ b/protocol/test/forge/v2/strategies/RamosStrategy.t.sol @@ -216,7 +216,7 @@ contract RamosStrategyTestAdmin is RamosStrategyTestBase { assertEq(strategy.rescuer(), rescuer); assertEq(strategy.apiVersion(), "1.0.0"); assertEq(strategy.strategyName(), "RamosStrategy"); - assertEq(strategy.strategyVersion(), "1.0.0"); + assertEq(strategy.strategyVersion(), "1.0.1"); assertEq(address(strategy.treasuryReservesVault()), address(trv)); assertEq(address(strategy.quoteToken()), address(dai)); ITempleStrategy.AssetBalanceDelta[] memory adjs = strategy.manualAdjustments(); @@ -496,11 +496,13 @@ contract RamosStrategyTestBalances is RamosStrategyTestBase { _setUp(); } - function checkBalance(uint256 expected) internal { + function checkBalance(uint256 expectedDai, uint256 expectedTemple) internal { ITempleStrategy.AssetBalance[] memory assetBalances = strategy.latestAssetBalances(); - assertEq(assetBalances.length, 1); + assertEq(assetBalances.length, 2); assertEq(assetBalances[0].asset, address(dai)); - assertEq(assetBalances[0].balance, expected); + assertEq(assetBalances[0].balance, expectedDai); + assertEq(assetBalances[1].asset, address(temple)); + assertEq(assetBalances[1].balance, expectedTemple); } function test_latestAssetBalances() public { @@ -512,14 +514,14 @@ contract RamosStrategyTestBalances is RamosStrategyTestBase { assertEq(initialBalances.ramosStable, 5872605221247683475983439); // Assets set, no balances - checkBalance(initialBalances.ramosStable); + checkBalance(initialBalances.ramosStable, initialBalances.ramosTemple); // Deal some assets to the strategy - no change { deal(address(dai), address(strategy), 5e18, true); deal(address(aura), address(strategy), 100e18, true); deal(address(bal), address(strategy), 200e18, true); - checkBalance(initialBalances.ramosStable); + checkBalance(initialBalances.ramosStable, initialBalances.ramosTemple); } // Deal some BPTs to the `amoStaking` -- balance changes because Ramos didn't @@ -534,8 +536,9 @@ contract RamosStrategyTestBalances is RamosStrategyTestBase { // Balancer takes a portion of fees - the total supply isn't exactly an extra 10k expectedTotalBpt += extraBpt + 0.020752113873203652e18; - uint256 expected = initialBalances.totalStable * expectedRamosBpt / expectedTotalBpt; - checkBalance(expected); + uint256 expectedDai = initialBalances.totalStable * expectedRamosBpt / expectedTotalBpt; + uint256 expectedTemple = initialBalances.totalTemple * expectedRamosBpt / expectedTotalBpt; + checkBalance(expectedDai, expectedTemple); } // Add some BPTs to the user, Ramos' balance of stables changes as the ratio changes @@ -546,8 +549,9 @@ contract RamosStrategyTestBalances is RamosStrategyTestBase { // Balancer takes a portion of fees - the total supply isn't exactly an extra 10k expectedTotalBpt += extraBpt + 0.020752113873203652e18; - uint256 expected = initialBalances.totalStable * expectedRamosBpt / expectedTotalBpt; - checkBalance(expected); + uint256 expectedDai = initialBalances.totalStable * expectedRamosBpt / expectedTotalBpt; + uint256 expectedTemple = initialBalances.totalTemple * expectedRamosBpt / expectedTotalBpt; + checkBalance(expectedDai, expectedTemple); } } } @@ -581,10 +585,10 @@ contract RamosStrategyTestBorrowAndRepay is RamosStrategyTestBase { Balances memory balancesBefore = getRamosBalances(); assetBalances = strategy.latestAssetBalances(); uint256 daiBalanceBefore = assetBalances[0].balance; + uint256 templeBalanceBefore = assetBalances[1].balance; (uint256 templeAmount, uint256 bptOut,, IBalancerVault.JoinPoolRequest memory requestData) = strategy.proportionalAddLiquidityQuote(amount, slippageBps); - vm.prank(executor); { vm.expectEmit(address(trv)); @@ -610,6 +614,7 @@ contract RamosStrategyTestBorrowAndRepay is RamosStrategyTestBase { assetBalances = strategy.latestAssetBalances(); uint256 daiBalanceAfter = assetBalances[0].balance; + uint256 templeBalanceAfter = assetBalances[1].balance; assertEq(dai.balanceOf(address(strategy)), 0); assertEq(dai.balanceOf(address(trv)), TRV_STARTING_BALANCE-amount); @@ -620,6 +625,7 @@ contract RamosStrategyTestBorrowAndRepay is RamosStrategyTestBase { // Thus, the share is decreased and the token balances corresponding to the share are also decreased // check the balance with delta. 1e18 = 100% assertApproxEqRel(daiBalanceAfter-daiBalanceBefore, amount, 1e5); + assertApproxEqRel(templeBalanceAfter-templeBalanceBefore, templeAmount, 1e5); assertEq(dUSD.balanceOf(address(strategy)), amount); assertEq(dUSD.balanceOf(address(trv)), 0); @@ -652,6 +658,7 @@ contract RamosStrategyTestBorrowAndRepay is RamosStrategyTestBase { Balances memory balancesBefore = getRamosBalances(); ITempleStrategy.AssetBalance[] memory assetBalances = strategy.latestAssetBalances(); uint256 daiBalanceBefore = assetBalances[0].balance; + uint256 templeBalanceBefore = assetBalances[1].balance; // Remove liquidity and repay (uint256 burnTempleAmount, uint256 repayDaiAmount,,, IBalancerVault.ExitPoolRequest memory requestDataForRemoveLiquidity) = strategy.proportionalRemoveLiquidityQuote(bptToRemove, slippageBps); @@ -673,15 +680,18 @@ contract RamosStrategyTestBorrowAndRepay is RamosStrategyTestBase { strategy.removeLiquidity(requestDataForRemoveLiquidity, bptToRemove); } - assetBalances = strategy.latestAssetBalances(); - uint256 daiBalanceAfter = assetBalances[0].balance; - assertEq(dai.balanceOf(address(strategy)), 0); assertEq(dai.balanceOf(address(trv)), TRV_STARTING_BALANCE+repayDaiAmount); // When removing liquidity, some tokens are transferred to the protocol fee collector address as a protocol fee. // https://etherscan.io/tx/0xa8680834644a6fedfa72d6fd819fe605fe55577f9116a739ffce0f88c21539e9 // check the balance with delta. 1e18 = 100% - assertApproxEqRel(daiBalanceBefore-daiBalanceAfter, repayDaiAmount, 1e5); + { + assetBalances = strategy.latestAssetBalances(); + uint256 daiBalanceAfter = assetBalances[0].balance; + uint256 templeBalanceAfter = assetBalances[1].balance; + assertApproxEqRel(daiBalanceBefore-daiBalanceAfter, repayDaiAmount, 1e5); + assertApproxEqRel(templeBalanceBefore-templeBalanceAfter, burnTempleAmount, 1e5); + } // The full debt was paid off uint256 expectedDusdBalance = dusdAmount-repayDaiAmount;