Skip to content

royalty issue with swaps #7

@benjamin-wilson

Description

@benjamin-wilson

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions