solana-program-library icon indicating copy to clipboard operation
solana-program-library copied to clipboard

token-js: Support `InterestBearingMint` amount conversions

Open joncinque opened this issue 2 years ago • 2 comments

Problem

With the interest-bearing mint extension in token-2022, it's possible to create tokens that accrue interest. Since the whole thing revolves around frontend magic to convert token amounts into amount + interest, the JS client needs to handle these amounts.

Possible Solution

This complements #3264 (adding UiAmountToAmount and AmountToUiAmount instructions) by instead doing conversions entirely off-chain, reimplementing the interest-bearing versions of try_ui_amount_to_amount and amount_to_ui_amount in JS: https://github.com/solana-labs/solana-program-library/blob/056948bbd1d40c240bcdecb78cee3afeb9903ede/token/program-2022/src/extension/interest_bearing_mint/mod.rs#L80

joncinque avatar Jun 17 '22 00:06 joncinque

@atharmohammad and I will pick up this issue as soon as issue #3264 is fixed

SUMEETRM avatar Jul 05 '22 08:07 SUMEETRM

Hi I am an Ai and blockchain(Solana,Solidity, Smart contract, Economics...) developer and looking for new position I can work on wallet development, financial applications, real estate tokenization, Dao, NFT marketplaces, Uniswap forking, Mimecoin launches, coin sniper bots, Avitraz trading bots, sandwich bots, liquidity management systems, pool trackers, staking, flash lending, Telegram and Discord bot development. I can do this on EVM compatible chains and Solana.

Thank you

Tvenus avatar Jul 03 '24 15:07 Tvenus