File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -201,3 +201,27 @@ test synth_amount_round_trip() {
201201 let synth = compute_expected_synth_amount (lovelaces, 70_000_000 , - 8 )
202202 synth == 700_000
203203}
204+
205+ // compute_expected_synth_amount (Burn — valor negativo) -----------------------
206+
207+ // Burn 1 ADA: -1_000_000 lovelaces → -700_000 micro-USD (synth a quemar)
208+ test synth_amount_burn_1_ada () {
209+ compute_expected_synth_amount (- 1_000_000 , 70_000_000 , - 8 ) == - 700_000
210+ }
211+
212+ // Burn 2 ADA: -2_000_000 lovelaces → -1_400_000 micro-USD
213+ test synth_amount_burn_2_ada () {
214+ compute_expected_synth_amount (- 2_000_000 , 70_000_000 , - 8 ) == - 1_400_000
215+ }
216+
217+ // Burn 1.5 ADA: -1_500_000 lovelaces → -1_050_000 micro-USD
218+ test synth_amount_burn_1_5_ada () {
219+ compute_expected_synth_amount (- 1_500_000 , 70_000_000 , - 8 ) == - 1_050_000
220+ }
221+
222+ // Simetría: mint y burn deben ser exactamente opuestos
223+ test synth_amount_mint_burn_symmetry () {
224+ let mint = compute_expected_synth_amount (1_000_000 , 70_000_000 , - 8 )
225+ let burn = compute_expected_synth_amount (- 1_000_000 , 70_000_000 , - 8 )
226+ mint == - burn
227+ }
You can’t perform that action at this time.
0 commit comments