Open shamilsan opened 2 years ago
I also think it's necessary to add reading of contracts state off-chain (in fungible-token and curve-amm). Then in fungible-token contract in functions mint
, burn
, transfer
, approve
you need to check the msg::source()
. And maybe it's even better to reduce arguments in these functions (for example sender
in transfer
function can be removed and replaced with msg::source()
).
In curve amm there are comments TODO
and usage of mutex, which is only needed to test the contract. But there should not be in the finished contract.
Originally posted by @LouiseMedova in https://github.com/gear-tech/apps/issues/7#issuecomment-1004831783
burn()
has issue about how it handles amount > user's balance. Thanks to @LouiseMedova for testing and reporting!
@vivekvpandya Maybe it's better to make Curve-Amm a library? Because when developing dex, curve liquidity pools will be used many times. I also think for a better understanding of program logic it would be better to make mathematical calculations in separate files
Originally posted by @LouiseMedova in https://github.com/gear-tech/apps/issues/7#issuecomment-1004776528