Skip to content

Commit d17c774

Browse files
committed
feat: mock stable debt token
1 parent ec33f4f commit d17c774

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/contracts/instances/PoolInstance.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {IPoolAddressesProvider} from '../interfaces/IPoolAddressesProvider.sol';
66
import {Errors} from '../protocol/libraries/helpers/Errors.sol';
77

88
contract PoolInstance is Pool {
9-
uint256 public constant POOL_REVISION = 5;
9+
uint256 public constant POOL_REVISION = 6;
1010

1111
constructor(IPoolAddressesProvider provider) Pool(provider) {}
1212

src/contracts/protocol/pool/Pool.sol

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,10 @@ abstract contract Pool is VersionedInitializable, PoolStorage, IPool {
450450
res.accruedToTreasury = reserve.accruedToTreasury;
451451
res.unbacked = reserve.unbacked;
452452
res.isolationModeTotalDebt = reserve.isolationModeTotalDebt;
453+
// This is a temporary workaround for integrations that are broken by Aave 3.2
454+
// While the new pool data provider is backward compatible, some integrations hard-code an old implementation
455+
// To allow them to unlock the funds, the pool address provider is setting a stable debt token, so balanceOf() and totalSupply() will return zero instead of reverting
456+
res.stableDebtTokenAddress = ADDRESSES_PROVIDER.getAddress(bytes32('MOCK_STABLE_DEBT'));
453457
return res;
454458
}
455459

0 commit comments

Comments
 (0)