Algorand development challenges

Hi!
We’ve developed a game prototype in Algorand two months ago, and we faced a number of challenges.
I want to check what is the state of these challenges today and if there are plans to address them.

  1. No float and negative number support in Teal. We used a workaround for float numbers with multiplying every number to 100, but it makes debugging harder. Are there any plans for native support or a standard practice to follow?

  2. No support for complex data types. Again we used a workaround to serialize objects to binary and store them and deserialize for reuse. Currently, serialization is not very efficient and uses a lot of gas which makes contract call expensive.

  3. Very limited contract cost (execution) budget. Complex contract calls has a lot of computation and although it’s possible to make a group transaction to increase cost budget, it’s not practical to do so. There’s also a limit on program size (max 8 KB). For reference, look here and also here.

  4. Mandatory opt-in for receiving every new Token/NFT. As games use a lot of NFTs, it doubles the transaction needed to receive a group of them. For example, 10 transactions are needed for receiving 5 NFTs. Is there a better way to do it?

  5. Extremely difficult contract debugging. PyTeal is essentially a wrapper around Teal, and after you go into debugging, you need to face it. You actually need to know Teal inside out in order to effectively debug your contract, which questions the usability of PyTeal.

Thanks in advance.

3. Very limited gas budget

From my understanding, gas is not really a term used in Algorand. Algorand uses the term fees, which are very cheap per transaction. For instance, most Payment transactions require 1000 microalgos, which is less than $0.10 at the current market price. You can have one transaction in your grouped transaction pay for all of the fees in the grouped transaction.

See this post: Dealing with fees in smart contracts - #4 by javier0rosas, where @fabrice explains how to deal with fees in grouped transactions.

1 Like

Oh, thanks for mentioning it. I should clarify that I was referring to App computational cost limit which is 700 for a single contract call, which can be increased with group transaction.

I also forgot something else :sweat_smile:, which was the program size limit at 2 KB that can increase to 8 KB (still very limited for a game contract).

Adding for reference:

Yeah those some of the limitations of the AVM 1.0.

You could also create additional smart logic sigs or smart contracts that can pair with your main smart contract to increase the budget that way. You would need to include checks in your main smart contract to make sure that the other smart contracts or smart logic sigs are also getting called in a grouped transaction.

ApplicationCalls from inner transactions are probably going to be supported by the AVM soon, so that is something to look forward to.

1 Like

Regarding the floating points support -
The main issue with supporting floating points is that the hardware implementation for these tend to be non-deterministic. This limit the AVM from using these hardware instructions.

The method that you’ve taken ( multiplying by a constant ) is a very common way to work around that exact limitation. Given that the AVM does support 64 bit integers, it could work well.

1 Like

Thanks for clarifying.
Do you know if there is a roadmap for next AVM improvements? I couldn’t find any.

Look for a Betanet release in the next few days including a significant AVM upgrade - more to come over the next several weeks as well.

1 Like

Is PyTeal going to be updated as soon as the next version of the AVM is released?

1 Like

Hi Javier,

This release is not focused on PyTEAL, but we are working on several usability improvements based off community engagement/feedback.

-Gary

2 Likes