Giter Site home page Giter Site logo

Changing Fees - Issue about dip20 HOT 1 OPEN

psychedelic avatar psychedelic commented on July 30, 2024
Changing Fees - Issue

from dip20.

Comments (1)

ferencdg avatar ferencdg commented on July 30, 2024

'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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.