The Account trait verifies that the account exists, the UncheckedAccount does not let you retrieve account data when initialized within the instruction.
I suggest having either an annotation on the context that specifies that the account requires creation or a lazy context that lets the program dev manage when to create the account. The former could make the code more compact but requires more contexts, the latter could be more efficient by allowing the dev to make some checks before allocating the account.
The
Account
trait verifies that the account exists, theUncheckedAccount
does not let you retrieve account data when initialized within the instruction.I suggest having either an annotation on the context that specifies that the account requires creation or a lazy context that lets the program dev manage when to create the account. The former could make the code more compact but requires more contexts, the latter could be more efficient by allowing the dev to make some checks before allocating the account.