Reporting an Exploit From a Malicious Third Party
--
* Para Versión en Español, desplazate hacia abajo.*
Hey Nimbus Community,
A lot has been happening in the Nimbus world recently. And now it comes to our attention that a malicious user has been exploiting particular logic in our contracts to extract tokens.
Here’s What Happened?
A malicious user took a loan from DODO and Biswap valued at 75,477 BNB and used it to purchase NIMB and GNIMB tokens via Nimbus Swap Machine functionality, raising the price of both tokens.
The user then staked all the purchased NIMB and GNIMB tokens with a price much higher than usual and withdrew the rewards. This operation was repeated several times. It was possible because the GNIMB-NIMB and GNIMB-BNB-NIMB rate is calculated directly from the Swap Machine.
The total amount of his NIMB stakings was sold through the Swap Machine for 75,735 BNB. The user wasn’t able to extract more due to security practices. Therefore, the scope of liquidity breached is not at an alarming size.
The user then returned the loan of 75,477 BNB in the same transaction the loan was taken from, and the difference between the loan amount and NIMB tokens sold was an approximate value of 278 WBNB (≈76 000 USD). NOTE: Only liquidity inside the pool was affected by this amount.
Details of the transaction https://bscscan.com/tx/0x42f56d3e86fb47e1edffa59222b33b73e7407d4b5bb05e23b83cb1771790f6c1
The exploit didn’t compromise Nimbus’ contracts and user funds. They remain safe. Nimbus Platform is operating fine, and we’ve quickly caught the issue . The exploit was possible due to prices across the platform using the Nimbus Swap prices.
How We’re Currently Fixing The Issue:
We are fine-tuning the logic in the contract so that the price data used across the platform comes from the Price Feed instead of the swap machine. This will prevent malicious users from manipulating the price to cause pumps and dumps. Our Price Feed will have an algorithm that takes into account previous transactions so a realistic price is returned and no new exploits are possible using flash loans. The price given on the swap machine will no longer influence staking and rewards logic.
Our steps to making the changes:
- Publishing 2 contracts that can be inserted with a safe script.
- Running the script in the testnet.
- Making tests.
- Running the script in the mainnet.
- Switching the Price Feed on this script on contracts.
SUMMARY: All courses on the platform take prices from the Price Feed, and not from the swap machine.
We’ve already started maintenance and are working fast to resolve the issue. In the meantime, staking are temporarily paused as we make the changes.
It won’t be possible to create stakes and withdraw the deposit and rewards for a few hours from now. Staking will be back online when the problem is solved.
We thank you for your patience and look forward to updating you soon.
---
Información sobre un exploit de un tercero malicioso
Hola, comunidad de Nimbus
Últimamente han sucedido muchas cosas en el mundo de Nimbus. Y ahora nos llama la atención que un usuario malicioso ha estado explotando una lógica particular en nuestros contratos para extraer tokens.
¿Qué es lo que pasó?
Un usuario malintencionado tomó un préstamo de DODO y Biswap valorado en 75.477 BNB y lo usó para comprar tokens NIMB y GNIMB a través de la funcionalidad Nimbus Swap Machine, lo que elevó el precio de ambos tokens.
Luego, el usuario añadió a Staking todos los tokens NIMB y GNIMB comprados a un precio mucho más alto de lo habitual y retiró las recompensas. Esta operación se repitió varias veces. Fue posible porque el ratio entre GNIMB-NIMB y GNIMB-BNB-NIMB se calcula directamente desde la Swap Machine.
El monto total de su staking en NIMB se vendió a través de la Swap Machine por 75.735 BNB. El usuario no pudo extraer más debido a prácticas de seguridad. Por lo tanto, el alcance de la liquidez violada no tiene un tamaño alarmante.
Luego, el usuario devolvió el préstamo de 75.477 BNB en la misma transacción de la que tomó el préstamo, y la diferencia entre el monto del préstamo y los tokens NIMB vendidos fue un valor aproximado de 278 WBNB (≈76.000 USD). NOTA: Solo la liquidez dentro del pool se vio afectada por este monto.
Detalles de la transacción https://bscscan.com/tx/0x42f56d3e86fb47e1edffa59222b33b73e7407d4b5bb05e23b83cb1771790f6c1
El exploit no comprometió los contratos de Nimbus ni los fondos de los usuarios. Permanecen a salvo. La plataforma Nimbus funciona bien y detectamos el problema rápidamente. El exploit fue posible debido a los precios en toda la plataforma estaban utilizando los precios del Nimbus Swap.
Cómo estamos solucionando el problema actualmente:
estamos ajustando la lógica del contrato para que los datos de precios utilizados en la plataforma provengan de Price Feed en lugar de la máquina de intercambio. Esto evitará que los usuarios maliciosos manipulen el precio para provocar “pumps & dumps”. Nuestro Feed de precios tendrá un algoritmo que tiene en cuenta las transacciones anteriores, por lo que se devuelve un precio realista y no es posible hacer nuevos exploits utilizando préstamos flash. El precio dado en la Swap Machine ya no influirá en la lógica de staking ni de las recompensas.
Nuestros pasos para realizar los cambios:
- Publicación de 2 contratos que se pueden insertar con un script.
- Ejecución del script en la red de prueba.
- Realización de pruebas.
- Ejecución del script en la red principal.
- Cambio del feed de precios de este script en los contratos.
RESUMEN: Todos los procesos en la plataforma toman precios de Price Feed, y no de la Swap Machine.
Ya comenzamos el mantenimiento y estamos trabajando rápidamente para resolver el problema. Mientras tanto, el staking se pausan temporalmente mientras realizamos los cambios.
No será posible crear stakes y retirar el depósito y las recompensas durante unas horas a partir de ahora. El staking volverá a estar en línea cuando se resuelva el problema.
Les agradecemos su paciencia y esperamos actualizarlos pronto.