Comments (1)
'can cause issues for downstream applications who may send more tokens than is necessary if a fee is changed by the owner'
if userA sends 100 to userB, then userB will always receive 100, regardless of the owner changed the fee or not. I think what you mean is that the cost for the downstream system is 100 + fee, and because the fee can change, the downstream system cannot be sure how much the total cost was.
your first suggested solution is: fee + transfer value <= limit wouldn't really solve the problem, if the owner decided to decrease the fee: the downstream system would still not know how much the fee was
your second suggested solution is to have the amount transferred to be inclusive of fee. Unfortunately that also cannot work. If userA wants to transfer 100 to userB, and fee is inclusive, then userA would need to transfer 102 to userB. However as you said fee can change and userA wants to transfer the exact 100 amount.
solution 1
let the transfer method return the fee deducted (and keep the fee as exclusive).
solution 2
change method signatures like transfer(from,to,amount,expectedFee), and the method should fail if the currentFee is not the expectedFee
from dip20.
Related Issues (7)
- Update the motoko implementation HOT 1
- IC CDK Storage bug HOT 2
- During canister install token : Invalid data: Unable to serialize Candid values: wrong number of argument values HOT 2
- dip20 fails cargo audit with RUSTSEC-2022-0013 and RUSTSEC-2021-0127
- Add support for ICRC1 standard to DIP20 HOT 2
- rust example build failed HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dip20.