Skip to content

Feat/qpay - #977

Open
double-k-3033 wants to merge 7 commits into
qubic:developfrom
double-k-3033:feat/Qpay
Open

Feat/qpay#977
double-k-3033 wants to merge 7 commits into
qubic:developfrom
double-k-3033:feat/Qpay

Conversation

@double-k-3033

Copy link
Copy Markdown
Contributor

No description provided.

Adds operator/recovery-gated promo pricing (SetPromoRate/RemovePromoRate/ChangeOperator/GetPromoRate), ported and adapted from profitphil/qubic-x402 PR #3 after a security review of the access-control and rate-bound logic. Discounted rates are clamped to [0.25%, 0.75%] and can never exceed the standard fee. Adds matching GoogleTest coverage for the new procedures.
Adds affiliateRegistrarId-gated referral links (SetAffiliate/RemoveAffiliate/ChangeAffiliateRegistrar/GetAffiliate), ported and adapted from profitphil/qubic-x402 PR #3 after a security review. A referrer earns 5% of a referred seller's fee for 52 epochs (~1 year), taken out of the fee (never the seller's net or buyer's payment). Self-referral is blocked, first-attribution-wins, and the link expires/purges the same way receipts do. affiliateRegistrarId is a separate admin role from operatorId so a compromised key only ever touches one surface; recoveryId can reassign either. Adds matching GoogleTest coverage.
@fnordspace

Copy link
Copy Markdown
Contributor

Please let us know when this PR is ready for review. Also please add a description of the PR before that.

@double-k-3033

Copy link
Copy Markdown
Contributor Author

Please let us know when this PR is ready for review. Also please add a description of the PR before that.

https://github.com/profitphil/Proposal-deploy-QPAY-smart-contract

@fnordspace

Copy link
Copy Markdown
Contributor

https://github.com/profitphil/Proposal-deploy-QPAY-smart-contract

Thanks, short notice the link at the end goes 404: https://github.com/profitphil/qubic-x402

@double-k-3033

Copy link
Copy Markdown
Contributor Author

https://github.com/profitphil/Proposal-deploy-QPAY-smart-contract

Thanks, short notice the link at the end goes 404: https://github.com/profitphil/qubic-x402

invited you. plz check again

@fnordspace

Copy link
Copy Markdown
Contributor

Sadly the test suits runs into some errors on my machine:

[  FAILED  ] 3 tests, listed below:
[  FAILED  ] ContractQPayhub.EndEpochDistributesFeePoolAboveReserveToSharesAndTokenHolders
[  FAILED  ] ContractQPayhub.NotifyQuUsdPriceReplyWithValidResolvedReplyUpdatesState
[  FAILED  ] ContractQPayhub.NotifyQuUsdPriceReplyWithInvalidResolvedReplyIsIgnored

Please double check on your side.

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