You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit efdf97a
Browse filesBrowse the repository at this point in the historyBrowse files
request.setRepaid(); // Enables PT/YT holders to redeem
190
203
```
191
204
192
-
The `pullFunds()` function can be called multiple times by the owner during the funding phase. The `setRepaid()` function toggles the withdrawal lock, enabling PT/YT holders to redeem their tokens for the underlying assets held by the contract.
205
+
**Puller Role:**
206
+
- The puller role is set during contract initialization via the factory
207
+
- Only addresses with the puller role can call `pullFunds()`
208
+
- Funds are always transferred to `msg.sender` (the puller), not a separate recipient
209
+
- The puller can be a smart contract implementing `IPositionManagerRequestCallback` for automated fund management
210
+
211
+
**Callback Interface:**
212
+
213
+
Position managers implementing automated strategies can implement `IPositionManagerRequestCallback`:
214
+
215
+
```solidity
216
+
interface IPositionManagerRequestCallback {
217
+
function onPullFunds(uint256 amount, bytes calldata data) external;
218
+
}
219
+
```
220
+
221
+
The callback is invoked **after** funds are transferred, allowing the position manager to:
222
+
- Open positions in DeFi protocols
223
+
- Update internal accounting
224
+
- Execute automated strategies based on the provided data
225
+
226
+
The `pullFunds()` function can be called multiple times by the puller during the funding phase. The `setRepaid()` function toggles the withdrawal lock, enabling PT/YT holders to redeem their tokens for the underlying assets held by the contract.
193
227
194
228
## RequestFactory
195
229
@@ -231,6 +265,7 @@ RequestFactory factory = new RequestFactory(beaconOwner);
0 commit comments