Skip to content

CHIP-0056 Fee CATs#194

Open
cameroncooper wants to merge 4 commits intoChia-Network:mainfrom
cameroncooper:fee-cat
Open

CHIP-0056 Fee CATs#194
cameroncooper wants to merge 4 commits intoChia-Network:mainfrom
cameroncooper:fee-cat

Conversation

@cameroncooper
Copy link

This CHIP adds Fee Layer support to CATs for CAT tokens to pay transaction fees to issuers.


All fee parameters (`fee_basis_points`, `min_fee`, `issuer_fee_puzzle_hash`, `allow_zero_price`, `allow_revoke_fee_bypass`) are curried into the puzzle at issuance time and cannot be changed. This guarantees to holders that the fee terms will never change after they acquire the token. If an issuer wants to change fee parameters, they must issue a new token.

### The `allow_zero_price` flag
Copy link
Contributor

Choose a reason for hiding this comment

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

Will set to false mean that users need to pay the fee in order to transfer between their own wallets?

Copy link
Contributor

Choose a reason for hiding this comment

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

Same q for coin combining / splitting

├────── Inner puzzle (the p2 puzzle, e.g. p2_delegated_puzzle_or_hidden_puzzle)
```

All four supported permutations are valid:
Copy link
Contributor

Choose a reason for hiding this comment

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

If cr cats are brought back would those also support the fee layer similarly?


### Settlement puzzle hash reconstruction

For trades quoted in XCH, the fee layer asserts an announcement from the well-known `SETTLEMENT_PAYMENT_HASH`. For trades quoted in CATs, the settlement puzzle is wrapped in additional layers (CAT layer, and potentially revocation and/or fee layers of the *quote* asset). The fee layer reconstructs the expected settlement puzzle hash on-chain from a trade price descriptor provided in the solution.
Copy link
Contributor

Choose a reason for hiding this comment

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

Will this trade price have similar issues to NFTs with malicious wallets being able to circumvent royalties? (i.e. set trade price lower than actual)

|---|---|---|
| `issuer_fee_puzzle_hash` | `Bytes32` | Fee destination of the quote asset's fee layer |
| `fee_basis_points` | `Int` | Quote asset's fee percentage |
| `min_fee` | `Int` | Quote asset's minimum fee |
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the min fee required?

When constructing an offer involving a fee CAT:

1. The offer maker's wallet calculates the fee amounts for each trade price.
2. Additional settlement payments are included in the offer for each fee (one per fee CAT involved in the trade).
Copy link
Contributor

Choose a reason for hiding this comment

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

How are NFT <-> Fee CAT offers handled?

@danieljperry
Copy link
Contributor

CHIP-56 is now a Draft. It describes a type of CAT in which fees are sent to the issuer with each trade.

Please leave your reviews here, and feel free to discuss it in the #chips channel of our Discord.

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.

3 participants