Return to site
Return to site

Mentorship Series #13

0xfirefirst - Day 12

· Mentorship

We continued the Mento V3 contest on Cantina.

Lesson Summary:

  • expectedAmountIn comes from amountOut. If the fee is 1% and I want to get 100, I should get 99. But here I think I should just return 101(fee included);
  • protocol fee is also applied to amountIn, so it looks good for now;
  • newReserveValue already removed protocol fee(_swapCheck), because the protocol fee was transferred out and the reserves were updated before checking the swap;
  • In the check, why are they taking both fees when they already took the protol fee and reset the reserves?
  • Should the fees be taken on amount in? Or it should be on amount out?
  • Make sure totalFeeInToken1 is correct.

Subscribe
Previous
Mentorship Series #12
Next
Mentorship Series #14
 Return to site
Cookie Use
We use cookies to improve browsing experience, security, and data collection. By accepting, you agree to the use of cookies for advertising and analytics. You can change your cookie settings at any time. Learn More
Accept all
Settings
Decline All
Cookie Settings
Necessary Cookies
These cookies enable core functionality such as security, network management, and accessibility. These cookies can’t be switched off.
Analytics Cookies
These cookies help us better understand how visitors interact with our website and help us discover errors.
Preferences Cookies
These cookies allow the website to remember choices you've made to provide enhanced functionality and personalization.
Save