Skip to content

Add referral fee ppm to auction server#527

Merged
danimhr merged 6 commits into
mainfrom
feat/referral-fee-ppm
Apr 28, 2025
Merged

Add referral fee ppm to auction server#527
danimhr merged 6 commits into
mainfrom
feat/referral-fee-ppm

Conversation

@danimhr
Copy link
Copy Markdown
Contributor

@danimhr danimhr commented Apr 28, 2025

This PR aims to add referral fee ppm to auction server quote apis

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 28, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
swap-staging ⬜️ Ignored (Inspect) Visit Preview Apr 28, 2025 1:08pm

Comment thread auction-server/api-types/src/opportunity.rs
Comment thread auction-server/src/api.rs Outdated
referral_fee_info.referral_fee_ppm,
);

let referral_fee_bps =
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

maybe the TODO note about deleting this should live here...

Copy link
Copy Markdown
Contributor Author

@danimhr danimhr Apr 28, 2025

Choose a reason for hiding this comment

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

I think if we delete the other place, then the compiler will raise error and we'll delete this as well

);

let referral_fee_bps =
u16::try_from(referral_fee_info.referral_fee_ppm / FEE_BPS_TO_PPM)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this should technically be ceiling divide, right?

Copy link
Copy Markdown
Contributor Author

@danimhr danimhr Apr 28, 2025

Choose a reason for hiding this comment

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

I'm not sure about this. Hopefully this will never happen, but I prefer less fees during conversions. Is it gonna produce bug anywhere?

Comment thread contracts/svm/programs/express_relay/src/swap.rs Outdated
@danimhr danimhr merged commit 41baea8 into main Apr 28, 2025
4 checks passed
@danimhr danimhr deleted the feat/referral-fee-ppm branch April 28, 2025 13:08
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