argotorg / argotorg/act

Fixed point types

Open
#36 0 comments 1 reaction 0 assignees View on GitHub
enhancement
Dominant language
Haskell
Stars
279
Forks
51
Avg merge
17h 42m
Merged PRs (30d)
1

Description

Almost all real world smart contracts make use of fixed point arithmetic in some form. Current limitations in Solidity mean that these operations have to be carried out directly on integers, a fiddly and error prone procedure that often results in bugs (most recently causing the failure of `YAM`). It would be nice if we could use act to verify the correctness of these calculations.

Fixed point types are already an atomic abi type, but operations on them are not supported in solidity. Would it make sense to reuse these types in `act`? They are represented in the abi encoding as simple `int`s or `uint`s depending on their signedness, but the name of the type is used when calculating the function selector.

Since these types are not currently useful in solidity smart contracts, any solidity implementation would have to use `uint`s or `int`s directly, including in the interface, meaning that we would probably have to implicitly convert the types to their underlying representation (`int`/`uint`) when computing function selectors and the like in bytecode proofs, which feels a little dirty...

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue names no files, tests, or entry points. Start by tracing how fixed-point ABI types are represented and how function selectors and bytecode proofs handle their underlying int or uint representation. Done means fixed-point operations can be verified while selector behavior remains correct.

Written by the indexing model from the issue text.

Assessment

Tech stack
solidity
Domain
blockchain
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.