-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(contracts/xapps): addressed rlusd audit findings (#3096)
The rlusd audit report was delivered and there were a variety of relevant findings that needed to be addressed: - Centralisation Risk For Bridge Address Configuration (OMRL-04) - Use A Caller-Determined Refund Recipient (OMRL-05) - No Mechanism For Deleting Routes (OMRL-06) - Missing Check For Routes (OMRL-07) - Unnecessary Approval For Lockbox (OMRL-09) - Pausing and Unpausing Have The Same Role (OMRL-11) - Optimising Redundant Condition Checks For lockbox_ (OMRL-12) We already addressed these primary findings in PRs #2985 and #3074: - Paused Token Leads to Loss of Funds (OMRL-01) - Insufficient Gas For receiveToken() (OMRL-02) Findings that are not relevant and do not need to be addressed are: - Risks Of Source And Destination Chain Configuration Mismatch (OMRL-03) - No Support For Rebasing Or Fee Tokens (OMRL-08) - New EVM Version May Be Unsupported (OMRL-10) issue: #3095
- Loading branch information
Showing
17 changed files
with
621 additions
and
163 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,31 @@ | ||
DepositTest:test_depositTo_other_succeeds() (gas: 153450) | ||
DepositTest:test_depositTo_self_succeeds() (gas: 142560) | ||
DepositTest:test_deposit_succeeds() (gas: 142215) | ||
DepositTest:test_deposits_reverts() (gas: 168237) | ||
GeneralBridgeTest:test_initialize_reverts() (gas: 3411964) | ||
GeneralBridgeTest:test_setRoutes_reverts() (gas: 66844) | ||
GeneralBridgeTest:test_setRoutes_succeeds() (gas: 47347) | ||
GeneralLockboxest:test_initialize_reverts() (gas: 1396931) | ||
DepositTest:test_deposit_succeeds() (gas: 142237) | ||
DepositTest:test_deposits_reverts() (gas: 172259) | ||
GeneralBridgeTest:test_authorizeRoutes_succeeds() (gas: 60040) | ||
GeneralBridgeTest:test_initialize_reverts() (gas: 3784860) | ||
GeneralBridgeTest:test_setRoutes_reverts() (gas: 56513) | ||
GeneralBridgeTest:test_setRoutes_succeeds() (gas: 47010) | ||
GeneralLockboxest:test_initialize_reverts() (gas: 1463389) | ||
PledgeTest:test_pledge_reverts() (gas: 22501) | ||
PledgeTest:test_pledge_success() (gas: 51984) | ||
ReceiveTokenTest:test_receiveToken_reverts() (gas: 135510) | ||
ReceiveTokenTest:test_receiveToken_succeeds_insolvent_lockbox() (gas: 193040) | ||
ReceiveTokenTest:test_receiveToken_succeeds_no_lockbox() (gas: 136444) | ||
ReceiveTokenTest:test_receiveToken_succeeds_paused() (gas: 300446) | ||
ReceiveTokenTest:test_receiveToken_succeeds_solvent_lockbox() (gas: 214028) | ||
RetryTransferTest:test_receiveToken_caches_tokens_when_mint_reverts() (gas: 210880) | ||
RetryTransferTest:test_retryTransfer_reverts() (gas: 116449) | ||
RetryTransferTest:test_retryTransfer_succeeds() (gas: 414477) | ||
SendTokenTest:test_sendToken_empty_lockbox_succeeds() (gas: 661109) | ||
SendTokenTest:test_sendToken_fee_overpayment_refunded() (gas: 372568) | ||
SendTokenTest:test_sendToken_reverts() (gas: 643995) | ||
SendTokenTest:test_sendToken_withLockbox_token_succeeds() (gas: 321729) | ||
SendTokenTest:test_sendToken_withLockbox_wrapper_succeeds() (gas: 301487) | ||
SendTokenTest:test_sendToken_withoutLockbox_wrapper_succeeds() (gas: 314544) | ||
SendTokenTest:test_sendToken_wrapper_overdrafted_lockbox_succeeds() (gas: 543610) | ||
WithdrawTest:test_withdrawTo_other_succeeds() (gas: 151100) | ||
WithdrawTest:test_withdrawTo_self_succeeds() (gas: 124918) | ||
WithdrawTest:test_withdraw_succeeds() (gas: 124780) | ||
WithdrawTest:test_withdraws_reverts() (gas: 173148) | ||
ReceiveTokenTest:test_receiveToken_reverts() (gas: 119272) | ||
ReceiveTokenTest:test_receiveToken_succeeds_insolvent_lockbox() (gas: 193199) | ||
ReceiveTokenTest:test_receiveToken_succeeds_no_lockbox() (gas: 136586) | ||
ReceiveTokenTest:test_receiveToken_succeeds_paused() (gas: 300659) | ||
ReceiveTokenTest:test_receiveToken_succeeds_solvent_lockbox() (gas: 214204) | ||
RetryTransferTest:test_receiveToken_caches_tokens_when_mint_reverts() (gas: 219978) | ||
RetryTransferTest:test_retryTransfer_reverts() (gas: 187338) | ||
RetryTransferTest:test_retryTransfer_succeeds() (gas: 418184) | ||
SendTokenTest:test_sendToken_empty_lockbox_succeeds() (gas: 662095) | ||
SendTokenTest:test_sendToken_fee_overpayment_refunded() (gas: 373086) | ||
SendTokenTest:test_sendToken_fee_overpayment_refunded_refundTo() (gas: 394480) | ||
SendTokenTest:test_sendToken_reverts() (gas: 663501) | ||
SendTokenTest:test_sendToken_withLockbox_token_succeeds() (gas: 322046) | ||
SendTokenTest:test_sendToken_withLockbox_wrapper_succeeds() (gas: 301839) | ||
SendTokenTest:test_sendToken_withoutLockbox_wrapper_succeeds() (gas: 314914) | ||
SendTokenTest:test_sendToken_wrapper_overdrafted_lockbox_succeeds() (gas: 544261) | ||
WithdrawTest:test_withdrawTo_other_succeeds() (gas: 151135) | ||
WithdrawTest:test_withdrawTo_self_succeeds() (gas: 124953) | ||
WithdrawTest:test_withdraw_succeeds() (gas: 124744) | ||
WithdrawTest:test_withdraws_reverts() (gas: 177058) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.