dapphub / chai

ERC20 wrapper over the Dai Savings Rate
https://chai.money
GNU Affero General Public License v3.0
147 stars 26 forks source link

add move function for transferring in terms of dai amounts #2

Closed livnev closed 4 years ago

livnev commented 4 years ago

move can be used for transfers where the transferor wishes to remit a given dai amount to the recipient.

move(src, dst, wad) has the property that chai.dai(dst) increases by at least wad. Note that this is difficult to achieve without a contract wrapper/proxy because chi at tx execution time is not known in advance.

MrChico commented 4 years ago

It seems reasonable to include another exit function which takes dai as an argument as well. That would otherwise require a contract wrapping otherwise by the same argument