Author 1m1 (1m1-github)
Category AVM
Focus Defi, Science, Math
Open-Source Yes
ALGO Requested 200000
Abstract
This would expand the AVM capabilities (uniquely?) to enable much more complex kinds of dApps, needed for Financial, Scientific or Mathematical use cases.
This would allow Algorand to have balancer.fi style smart contracts, e.g. to represent a “FairTreasury”, which is missed by every project.
Even basic financial contracts need roots, e.g. to convert yearly to daily volatility.
Such functionality can be easily tested with 100% correctness.
Normally, opcodes are kept basic in assembly language due to hardware limitations. The AVM however is a virtual machine and hence not bound by such limitations.
Hence there is nothing stopping us from adding such super powers to the AVM. It would invite a lot more innovation.
The details and an MVP have been written up in the following PR, which has been shown to be popular in the community:
Btw, Consensys has shown interest to me privately to similarly arithmetize the EVM.
The AVM already allows for some decimal math; this change would complete it to add full decimal precision including negative numbers.
The current (e.g. b+) decimal math is based on (positive only) binary representations, which cannot even represent 0.1 exactly. The proposed is a decimal float type (not floating point), which represents any decimal value exactly, thus allowing for arbitrary precision math.
Link for details
