Skip to content

[AIP-X][Discussion] Signed Integers in Aptos Standard Library #608

@0xAnto

Description

@0xAnto

AIP Discussion

This proposal introduces signed integer types (i64, i128) to the Aptos standard library. Currently, Move only supports unsigned integers, which limits the expressiveness of smart contracts—particularly for financial applications that require negative numbers (e.g., representing debts or funding rates).

The implementation has been developed and tested in an external repository, 0xAnto/move-integers, with community contributions. Integrating this into the Aptos standard library will increase visibility, encourage broader usage, and benefit from additional security reviews.

The initial implementation will be written entirely in Move. Once native support for signed integers is introduced, we can replace the current logic with native functions internally. At that point, the i64 and i128 modules will serve as wrappers, similar to the math64 and math128 modules.

Read more about it here: https://github.com/0xAnto/AIPs/blob/main/aips/signed-integers.md
(Note: link to AIP will be updated once approved and merged)

Metadata

Metadata

Assignees

No one assigned

    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