Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write the Base Asset contract for Fuel #4111

Open
nfurfaro opened this issue Feb 16, 2023 · 2 comments
Open

Write the Base Asset contract for Fuel #4111

nfurfaro opened this issue Feb 16, 2023 · 2 comments
Labels
enhancement New feature or request P: critical Should be looked at before anything else

Comments

@nfurfaro
Copy link
Contributor

We need to have a contract written , tested and ready to "deploy" to ContractId 0x000...000.

Assuming this contract will NOT be upgradeable, we'll need to decide whether we want to make the base asset flash-mintable or flash-loanable.

Otherwise, it will probably look like a fairly standard Fungibl token contract, with mint(), burn(), and transfer() functionality.
Access control will be critical, and we should probably have a spec for the base asset before trying to write the contract.

cc @adlerjohn @simonr0204

@nfurfaro nfurfaro added enhancement New feature or request P: critical Should be looked at before anything else labels Feb 16, 2023
@simonr0204
Copy link
Contributor

simonr0204 commented Feb 17, 2023

Flash-minting the base asset would be a nice trick. I don't think there's any reason not to support it, if we're confident in the implementation. (Note: the same could be said of the bridge fungible token )

I think we'd want to use the lowest-level API for that, which will only really become ergonomic to use once the SDK/tooling catches up, but is the most flexible in terms of not locking in anything that we might want to change later (see: the other functions in the low_level_call library). E.g we wouldn't even be enshrining the layout of the payload.

@nfurfaro
Copy link
Contributor Author

nfurfaro commented Feb 22, 2023

After discussing this with @pixelcircuits, the only thing this contract would be used for that I can currently think of is flash-minting/flash loans.
For all other usage of the base assets on Fuel, the tokens will exist only as bridged tokens (UTXo's) and this is handled by the protocol. So for "normal" usage, there will never be a need to mint/burn tokens.

Given the number of high-priority tasks that need to be done before mainnet, this contract could be introduced at a later time, in between POA and POS mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request P: critical Should be looked at before anything else
Projects
Status: Todo
Development

No branches or pull requests

2 participants