numotrade / numo

🤖 Smart contract suite for Numo.
https://docs.numo.trade
Other
0 stars 0 forks source link

Round up swap fee calculation #5

Open robertleifke opened 2 months ago

robertleifke commented 2 months ago

Description:

The current implementation of the swap fee calculates the amount using the mulDiv function, so the amounts accrued are rounded down instead of rounded up. Thus, any dust from the calculation is given to the user instead of to the protocol.