<!-- canonical: https://0xsimao.com/findings/gaib-pre-deposit-work-usdt -->

# `PreDepositVault` will not work for USDT

Medium · Sherlock · AI compute financing · 28th March, 2025

Finding M-1 of the GAIB Pre-Vaults security review.

- Protocol: https://gaib.ai/
- Report: /reports/gaib
- Source: https://4221781861-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLXNTW9blcTeiKZrMFhab%2Fuploads%2FQMsETA4dRNo2auiUSeOX%2FAIDa%20Vault%20Audit_20250411.pdf?alt=media&token=5e2f84ea-9698-4fa7-81ef-503771d234aa

---

## Summary

`PreDepositVault::constructor()` uses `.approve()`, but this doesn't work for `USDT` as it does not return true.

## Vulnerability Detail

USDT does not return on approval, which makes the EVM revert as it has return length checks and it expects it to return true.

## Impact

Deployment of `PreDepositVault` for USDT fails.

## Code Snippet

https://github.com/sherlock-audit/2025-03-gaib/blob/main/pre-vaults/contracts/pre-vaults/gpdUSDT.sol#L47

## Tool Used

Manual Review

## Recommendation

Use `.forceApprove()` from `SafeERC20`.

---

Related findings:

- [`ManagedLeveragedVault::decreaseLeverage()` will not work when it goes below the minimum debt](https://0xsimao.com/findings/beraborrow-i-decrease-goes-below-debt): Beraborrow Managed Dens
- [`ManagedLeveragedVault::increaseLeverage()` will never work in Recovery mode](https://0xsimao.com/findings/beraborrow-i-leverage-work-recovery-mode): Beraborrow Managed Dens
- [`ManagedLeveragedVault::executeWithdrawalEpoch()` will never work because `cd.prevICR` is not set](https://0xsimao.com/findings/beraborrow-i-withdrawal-epoch-prev-icr): Beraborrow Managed Dens
- [`ManagedLeveragedVault::deposit()` slippage control on `collVaultShares` is not intuitive](https://0xsimao.com/findings/beraborrow-i-deposit-slippage-control-shares): Beraborrow Managed Dens
