Add arbitrary decimal precision exp, log, pow to the AVM
By 1m1 (@1m1-github) • Session 1 • Awarded 8/31/2023
About the Proposal
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: https://github.com/algorandfoundation/specs/pull/79 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.
Claim This Proposal
Progress Updates
Checking team membership...
Milestones
Proposal Planning
Define proposal scope and requirements
Completed: 11/24/2024
Phase 1
Implement core functionality for phase 1
Completed: 12/24/2024
Phase 2
Implement core functionality for phase 2
Completed: 1/23/2025
Final Delivery
Complete all deliverables and documentation
Completed: 2/22/2025
Comments
Please sign in to leave a comment.
No comments yet. Be the first to comment!
Proposal Summary
Team
1m1 (@1m1-github)
View all proposals by this team