Resolved: SOL-USDC Farming

Issue Recap and Compensation Details

APRICOT FINANCE
3 min readOct 22, 2021

TL;DR

  • A bug in our systems caused some portion of the SOL-USDC LP farming rewards to go into the USDT-USDC LP pool
  • The bug has been fixed. No funds were lost.
  • We have compensated 110% for what our users should have earned during the period when the bug was present

Recap of What Actually Happened 📝

At 3:00am EST Oct 21st, 2021, we identified a bug that was causing a portion of the farming rewards that should go into our SOL-USDC pool to instead go into our USDC-USDT pool.

This bug existed from the launch of our SOL-USDC pool (10:00am EST Oct 19th, 2021) to approximately 40 hours after the launch (4:00am EST Oct 21st, 2021). As a result, the amount earned by users farming SOL-USDC during this period of time was less than would have been earned under normal circumstances.

Resolution 🛡️

We confirmed the existence of the issue at approximately 3:00am EST Oct 21st, and immediately applied a temporary fix to the reward flow such that by 4:00am EST, the two LP pools (SOL-USDC and USDC-USDT) were correctly receiving rewards.

Later that day, a permanent fix for the bug that affected the distribution of rewards was applied. As a result, we have put in safeguards to prevent this from happening again in the future. LP payouts for our SOL-USDC and USDC-USDT pools went back to normal.

We have compensated our users who farmed SOL-USDC LP during this period of time. To achieve this, our dev team used the backend logs to compute the correct amount of rewards that each wallet should have received, and already sent out the USDC equivalent of the missing rewards to the respective wallets.

No funds were lost, and we have compensated 110% for what our users who farmed SOL-USDC LP during this period of time should’ve earned. You can find out the details below to deep dive into how we have calculated the missing rewards and reimbursed the affected wallets.

Compensation 💰

We firstly computed the exact amount of rewards each SOL-USDC wallet should have received as per the following rules:

For each farming duration (with a different SOL-USDC LP farming amount, and up to 4:00am EST Oct 21st, 2021), we computed:   - Value of SOL-USDC LP the user is farming, multiplied by,    - Reward rate of 0.08 ORCA / $1000 / day, multiplied by,    - Farming duration in days (e.g. 0.532 days), multiplied by   - $12.8 USDC / ORCA (highest price of ORCA during those 40    hours), multiplied by,   - 1.1 (a multiplier of 1.1 is applied to compensate for the inconvenience caused in this process)

These numbers are then summed across all of the user’s farming durations to compute the final amount of compensation the user should receive.

If you have been farming SOL-USDC from 10:00am EST Oct 19th, to 4:00am EST Oct 21st, you may find in the file below the specific information regarding compensation:

  • Affected wallet (only showing first 5 letters for privacy considerations)
  • Compensated amount in USDC
  • Transaction ID (only showing first 10 letters for privacy considerations)

Link to transfer details

Additional notes about our compensation :

  • Only users who have been missing at least $0.01 USD reward have been compensated. Users who farmed SOL-USDC but whose missing reward was less $0.01 USD have not been compensated.
  • To speed up transactions, we combined some relatively small transfers into a single transaction. These transfers therefore share the same Transaction ID.
  • If you have additional questions, please reach out to us in discord #sol-usdc channel

At Last 💖…

We want to thank all of the users who have shown patience throughout this process and offer our sincere apologies for any inconvenience caused.

--

--

APRICOT FINANCE

A next-generation lending protocol that offers cross-margin leveraged yield farming with downside protection