Skip to content

autoOffset fails if the target pool's balance of the lowest scored TCO2 is zero #31

Open
@danceratopz

Description

@danceratopz

Since 0x7f91...604c in block 31487844 (Aug-03-2022 10:11:10 PM +UTC), the lowest scored TCO2 in the NCT pool (TCO2-VCS-1052-2012) has balance zero. This state was previously created on Jul-11-2022 08:11:25 PM +UTC in 0xb402...7573 but subsequently reverted. These transactions, with the subsequent deposit of the TCO2 to the BCT pool, are listed here.

If the array of scoredTCO2s in the NCT storage has not been (manually) updated to reflect the fact that the NCT pool's balance of the lowest scored TCO2 is zero the autoOffset* functions in the OffsetHelper fail:

  1. autoRedeem() returns arrays of TCO2 addresses and amounts that were redeemed as returned by autoRedeem2(). These arrays contain entries corresponding to the TCO2 with the lowest score from scoredTCO2s (even though the lowest scored TCO2 is not present in the NCT pool).
  2. autoRetire() then tries to retire tokens from the lowest scored TCO2, even though the amount redeemed was zero, and the transaction is reverted.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions