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

royalty issue with swaps #7

Open
benjamin-wilson opened this issue Aug 6, 2021 · 1 comment
Open

royalty issue with swaps #7

benjamin-wilson opened this issue Aug 6, 2021 · 1 comment

Comments

@benjamin-wilson
Copy link

benjamin-wilson commented Aug 6, 2021

I was reviewing objkt-swap_v2_1.py and noticed that by specifying the swap royalties and creator via input parameters could result in either stiffing the creator fees or redirecting the fees to the address of the swappers choosing.

def swap(self, params):
...
self.data.swaps[self.data.counter] = ... royalties=params.royalties, creator=params.creator)
def collect(self, params):
...
self.royalties = self.data.swaps[params.swap_id].royalties * self.fee / (self.data.swaps[params.swap_id].royalties + self.data.fee)
            
# send royalties to NFT creator
sp.send(self.data.swaps[params.swap_id].creator, sp.utils.nat_to_mutez(self.royalties))

This should instead reference the royalty fees and creator address set on the minter
(Hic et Nunc Minter (OBJKT Swap v1): KT1Hkg5qeNhfwpKW4fXvq7HGZB9z2EnmCCA9)

@crzypatchwork
Copy link
Contributor

crzypatchwork commented Sep 1, 2021

the dApp UI enforces that the input (royalties/creator) must be valid for us to support/endorse/display such swap. if one doesn't follows parameters specified during minting the swap won't be supported. there is no way to access the royalty info from the minter as there were no on-chain views at the time on Tezos). Practically it would still be the same thing from the objkt swap v1.

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