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

Rainbow token contract update #460

Open
wants to merge 18 commits into
base: master
Choose a base branch
from

Conversation

chuck-h
Copy link
Collaborator

@chuck-h chuck-h commented Apr 20, 2022

Bugfix, minor feature add (enable burning tokens without releasing staked resources), tests.

Also replaced "staking" terminology throughout with "backing".

Added "pay to play" fee for issuer to create token (100 SEEDS); old behavior (issuer pays RAM) available with #ifdef

@chuck-h chuck-h requested a review from n13 April 20, 2022 21:45
*
* @param owner - the account containing tokens to retire,
* @param quantity - the quantity of tokens to retire,
* @param burn - if true, staked tokens are left in escrow,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm... I don't understand what burn parameter does. You'd think it burns token if this is true. But.... that's not what it does?

Copy link
Collaborator Author

@chuck-h chuck-h Apr 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The retire action on an ordinary token would just burn it, basically destroying value. But with "staked" or "backed" tokens, a retire action releases the staked value to the token holder and is more of a conversion of value. By setting the burn flag, a staked token is retired (value destroyed) but the staked value remains in escrow and is not released. Burn flag is a NOP on a plain token with no backing.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can call it force_burn?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or... do_not_redeem?
Hmm.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

redeem_for_backing == true -> (burn == false)

? maybe describe the inverse, the positive ... so if the flag is true, the token holder receives the backing token for their retired tokens
?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"burn" flag is now "do_redeem" with inverted logic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants