Margin funding is calculated based on the number of seconds that funding was provided/taken:
Margin funding earnings:
For instance, if you have an active $10,000 USD offer at 0.06% you would earn $6.00 USD per day. On those $6.00 USD a 15% fee is charged, so $0.90 USD. You will receive $5.10 USD per day that the offer is active.
Margin funding interest to pay:
Please also note in an effort to dissuade manipulative funding behaviour and ensure fair platform use for all, Bitfinex will charge one full day’s interest to the borrower on any funding that is borrowed and subsequently returned without being used in a financed position.
The user that has provided the loan to this user will not receive full-day earnings. They will receive interest depending on the number of seconds that they provided the funding.
If you have any questions contact the support team for further explanations, by providing as much information as you believe is relevant