Rari-Capital / nova

Read and write to L1 with minimal latency and no trust tradeoffs.
GNU Affero General Public License v3.0
216 stars 18 forks source link

🔒 [C02 & C03 & C04 & C07] Secure `claimInputTokens` and `withdrawTokens` #24

Closed transmissions11 closed 3 years ago

transmissions11 commented 3 years ago
  1. claimInputTokens doesn't check that inputTokenRecipientData has a recipient so anyone could burn a request's input tokens

  2. claimInputTokens doesn't update inputTokenRecipientData.isClaimed

  3. withdrawTokens doesn't set inputTokenRecipientData.recipient, which means a request with tokens withdrawn isn't picked up by areTokensRemoved (as it checks if the recipient == address(0))

coveralls commented 3 years ago

Pull Request Test Coverage Report for Build 912452761


Changes Missing Coverage Covered Lines Changed/Added Lines %
contracts/L2_NovaRegistry.sol 0 5 0.0%
<!-- Total: 0 5 0.0% -->
Totals Coverage Status
Change from base Build 872426476: -0.5%
Covered Lines: 24
Relevant Lines: 124

💛 - Coveralls