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

Reasons for Discontinuance #367

Closed
caramboleyo opened this issue Nov 2, 2023 · 9 comments
Closed

Reasons for Discontinuance #367

caramboleyo opened this issue Nov 2, 2023 · 9 comments

Comments

@caramboleyo
Copy link

May I ask why it was discontinued?

@ChewingGlass
Copy link
Contributor

@caramboleyo
Copy link
Author

Thanks, would have been nice if you had returned the tokens before shutting down.

@ChewingGlass
Copy link
Contributor

ChewingGlass commented Dec 26, 2023

Returned what tokens? All tokens are either (a) in bonding curves which still function or (b) were returned here https://github.com/StrataFoundation/strata/blob/master/packages/docs/blog/2022-1-19-wumbo-beta-open-dist/index.mdx and here https://github.com/StrataFoundation/strata/blob/master/packages/docs/blog/2022-08-25-sunsetting-wumbo/index.mdx

Users of Wumbo had almost a year to exchange social tokens and OPEN for SOL before the blog site was taken down, and the tokens are still in the contracts (now immutable) so they can claim them at any later point.

@caramboleyo
Copy link
Author

Whats bondingcurve?
Whats wumbo?
i used strata homepage i think launchpad or something and now tokens are here:
https://solscan.io/account/GLq5gk4EKGXm5sKqst8MqW9iJsuM4zGAE65sNv59RWq3

@ChewingGlass
Copy link
Contributor

That's the address of a fungible entangler. Assuming you hold the wallet HwYygM56SzHtWTM3GquLjB5qQirFHctrDEeqhd3NJzzn, you can close it out and get the funds back:

https://github.com/StrataFoundation/strata/blob/master/programs/fungible-entangler/src/instructions/close_fungible_parent_entangler_v0.rs
https://github.com/StrataFoundation/strata/blob/master/programs/fungible-entangler/src/instructions/close_fungible_child_entangler_v0.rs

Example SDK usage here: https://github.com/StrataFoundation/strata/blob/master/tests/fungible-entangler.ts

The contract is immutable and that wallet holds the authority, meaning I can't do this for you.

@caramboleyo
Copy link
Author

After two days in dependency hell and back to old require style i got it working:

const anchor = require("@project-serum/anchor");
const { FungibleEntangler } = require("../packages/fungible-entangler/lib/cjs");
const { PublicKey } = require("@solana/web3.js");

anchor.setProvider(anchor.AnchorProvider.local('https://api.mainnet-beta.solana.com'));
var provider = anchor.getProvider();
var program = anchor.workspace.FungibleEntangler;
var fungibleEntanglerProgram = new FungibleEntangler(provider, program);

async function transferAndClose() {
	await fungibleEntanglerProgram.transfer({
		parentEntangler: new PublicKey('GLq5gk4EKGXm5sKqst8MqW9iJsuM4zGAE65sNv59RWq3'),
		amount: 10000000,
	});
	await fungibleEntanglerProgram.close({
		childEntangler: new PublicKey('HK1vum4KFizCSV9ACcdFDxF3tqQbyZNxMW6q2KXwT49V'),
	});
	await fungibleEntanglerProgram.close({
		parentEntangler: new PublicKey('GLq5gk4EKGXm5sKqst8MqW9iJsuM4zGAE65sNv59RWq3'),
	});
}
transferAndClose();

The needed addresses i got from the initital transaction:
https://solscan.io/tx/3rPdWHW7FRFq4vhGGGx2XGgmPzL7mTGq9xB7JvawewyZNcuK1PeHLfkqhU1SshsVzMiz816Mb4gsCSzDAwKxLSXD

I understand now why there are so many blockchains. Working with this is hell. I guess anyone wants to create something easier to work with (me now too ;-P)
The result is only 20 lines, but what it took me to get there!

@caramboleyo
Copy link
Author

I seemed to have tried to create a coin with strata some while ago:
https://solscan.io/token/FD8i2pkWqPFHKMuLLyvHJ6YL5p9JuNj1CGdrR19s3pBn#txs

the setup is very entangled and i do not seem to have the authority over the token.
It created a separate account that has TBondmkCYxaPCKG4CHYfVTcwQ8on31xnJrPzk8F8WsS as owner
for metaplex it set 1118dzdRSxAgSHL3KB315EEwH7fvL1cHsDBneX3YfU8 as updateAuthority and hAY8haPeaE8xvUi9rnUj3gG6kdDb1NXuWzVGruWue3h as mint.

there seems to be a createMetadata happening in the bonding stuff, how was it supposed to be updated?
(i am just looking for a way to rename the coin, and change description and image so it wont be confused with the real one later)

i guess everything was supposed to run through your program?

@ChewingGlass
Copy link
Contributor

The token sale setup was an amalgamation of two different smart contracts -- the bonding curve and the fungible entangler.

The issue is that a bonding curve takes tokens into a treasury on one side, then mints new tokens on the other. It has great pricing mechanics, but it has to control the mint authority. That's not always ideal.

The way we fixed this was by having the output token of a bonding curve be a kind of shadow token. It's not used for anything but to exchange for the real token in the fungible entangler.

It's a bit complicated, yes. But I wouldn't worry about tokens with the same name. People will create spam tokens with the same name of your token, it's unavoidable.

The bonding curve has a reserveAuthority on it which is allowed to claim the entire reserves of the bonding curve. The fungible entangler has a similar authority.

https://github.com/StrataFoundation/strata/blob/master/packages/marketplace-sdk/src/index.ts#L429

You may find this code useful for disbursing and closing both.

@ChewingGlass
Copy link
Contributor

Whoever created the token should be the authority on the token metadata

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

No branches or pull requests

2 participants