Skip to content

Commit

Permalink
fix: calculations
Browse files Browse the repository at this point in the history
  • Loading branch information
fborello-lambda committed Dec 30, 2024
1 parent dd78168 commit d6221ed
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/l2/tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ async fn testito() -> Result<(), Box<dyn std::error::Error>> {
let total_locked_l2_value =
deposit_value - withdraw_value - fees_transfer.total_fees - fees_withdraw.total_fees;
let total_locked_l2_value_with_recoverable_fees =
total_locked_l2_value + fees_transfer.recoverable_fees + fees_transfer.recoverable_fees;
total_locked_l2_value + fees_transfer.recoverable_fees + fees_withdraw.recoverable_fees;

let total_burned_fees = fees_transfer.burned_fees + fees_withdraw.burned_fees;
println!("TOTAL Locked L2 value: {total_locked_l2_value}");
Expand All @@ -307,6 +307,8 @@ async fn testito() -> Result<(), Box<dyn std::error::Error>> {
);
println!("BURNED FEES L2: {total_burned_fees}");

println!("The total locked value by the CommonBridge contract doesn't take burned fees into account, also the deposit transactions \"gives\" some tokens (from fees) to the coinbase address. This behavior shouldn't happen.");

// Check that we only have the amount left after the withdrawal
assert_eq!(common_bridge_locked_balance, deposit_value - withdraw_value);

Expand Down

0 comments on commit d6221ed

Please sign in to comment.